> -----Original Message-----
> From: maer727@sohu.com [mailto:maer727@sohu.com]
> Sent: Tuesday, April 23, 2002 5:50 PM
> I am very interested in the field and want to know details about what
> is the shortcoming of multi-process/thread. Why Squid choose single
> process? Are there any detailed documents?
There are not any detailed documents, but this has been discussed here
before.
Some important points:
* One of the main reasons to use threads is for multi-cpu scalability.
* user mode threads, such as those on FreeBSD, do not allow applications
to scale to multiple CPU's.
* Until relatively recently there wasn't even a standard for threads
interface calls. (There is now - pthreads).
* Writing good quality, robust, easy to maintain threaded C code is
hard.
As for multi-process, there are two main multi-process models.
1) fork() per requests. This suffers from various overheads, the most
problematic being the stampeding horde problem where you have 100's of
concurrent process's each 100's of Megabytes in size, but only have a
few kilobytes of different data in each.
2) co-operative process's. Squid uses these (see the diskd store, or the
way helpers work).
Rob
Received on Tue Apr 23 2002 - 01:57:38 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:18 MST