Re: What to know detail about why Squid use single process.

From: Joe Cooper <>
Date: Wed, 24 Apr 2002 11:37:46 -0500

David Luyer wrote:
> Has anyone investigated extending the squid model to use multiple
> threads, without a complete redesign?
> One approach which occurred to me was to have some kind of
> "eventAddImmediate", and have commselect/commpoll call that when they
> find an fd is ready, and then have some 'worker threads' which pick
> up pending events. Basically one 'master' thread and a number of
> 'worker' threads.
> It would mean making some parts of the code more thread-safe, however
> on a 4+ CPU machine I'd expect a speedup. On less than that, diskd,
> the kernel, etc should be efficiently using the resources already.

Actually Squid doesn't even use two processors effectively (even with
aufs or diskd). More like 15%-20% or so. It would be very nifty to
have a 'thread per CPU' model, and it would take Squid into a new level
of scalability for MP machines. I don't have a real solid idea of how
difficult or intrusive such code changes would be, though.

Joe Cooper <>
Web Caching Appliances and Support
Received on Wed Apr 24 2002 - 10:41:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:19 MST