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

From: Henrik Nordstrom <>
Date: Tue, 23 Apr 2002 17:58:37 +0200 wrote:

> Why you say mono-thread decision is very heavy constraining, can you
> give me a more detailed description? Or, if it is boring and wasting
> time, can you introduce me some articles about the topic?
> Another question, do you mean that if the Squid project starts today,
> the group will choose multi-process? Do you have some articles that
> compare muiti-thread with single-thread?

If I were to write Squid today it would be a hybrid.

A few threads to allow for scaling and offloading of complex tasks into a
thread. Each thread handling many clients using non-blocking-io as is done
today, or variants thereof utilizing the more fancy event mechanisms of
modern OS:es (beyond POSIX). Giving the best of both worlds plus more.

From the perspective of designing a good performing proxy, threads is no
better than the single process design. Both approaches have their respective
strength and weaknesses. The thread design may be easier to get started in,
but quickly runs into code scalability issues, in many senses similar to how
a singleprocess design runs into CPU scalability issues..

Received on Tue Apr 23 2002 - 09:58:49 MDT

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