Connections on the varnishbox
Dag-Erling Smørgrav
des at linpro.no
Fri Oct 26 13:39:50 CEST 2007
"Poul-Henning Kamp" <phk at phk.freebsd.dk> 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.?
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. Since the kernel always picks the lowest-
numbered descriptor available, we would always reuse the most recently
used thread, or almost always; using a socket descriptor for a backend
requests would lock out the corresponding worker for the duration of
the request, but that should not be an issue as long as the cache hit
ratio is reasonably high.
DES
--
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
More information about the varnish-misc
mailing list