From: Stephen D. <sd...@gm...> - 2006-01-02 05:22:52
|
On 1/1/06, Vlad Seryakov <vl...@cr...> wrote: > Another solution to reduce locking, just to allocate maxconn structures > with its own mutex and perform locking for particular struct only, so > writers will not block other writers, only writer/reader. More memory > but less concurrency. > > I will try this tomorrow. But how do you get access to the right conn structure? You'll have to use a hash table of URLs, which will have to be locked. That's one lock/unlock at the start and end of each upload, and one lock/unlock for every query of the upload progress, say one per second or so. The thing about building upload tracking into the server is that it doesn't help solve other problems, such as the extra control needed before permitting a large upload. If hooks are added for that, then upload tracking could be implemented using the same mechanism. It would allow you to track uniqueness of the uploader via cookie for example. |