In message <[EMAIL PROTECTED]>, =?iso-8859-1?Q?Dag-Erling_Sm=F8rg rav?= writes: >"Poul-Henning Kamp" <[EMAIL PROTECTED]> writes: >> In retrospect, I am not convinced that idea/implementation of >> multiple thread pools is sufficiently sound. Its one area that >> we will have to impove somehow. >> >> Under no circumstances should more than a few pools (< 5) be created. > >I wonder... > >Why do we have a complex setup with pools, workers within pools etc.?
The idea was to reduce lock contention on the pool mutex. >If we just used the socket descriptor as a direct index into an array >of workers, no locking would be necessary since the descriptor itself >would act as a semaphore. The majority of time the descriptor is idle, and your proposal essentially parks one thread per descriptor, so if we did that, a lot of code could be simplified, but at a massive expansion in the number of threads and a drastic reduction in CPU cache efficiency. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. _______________________________________________ varnish-misc mailing list [email protected] http://projects.linpro.no/mailman/listinfo/varnish-misc
