Thanks, Rob pal!
What means "multi-cpu scalability" or "scale to multiple CPU's"
in your reply? I think they mean the threads can not run on muiti-CPU
system. But I am not sure about it. Am I correct?
Can you give me a simple explanation?
Best regards,
George Ma
----- Original Message -----
From: Robert Collins
To: maer727@sohu.com ;squid-dev@squid-cache.org
Cc: squid-dev@squid-cache.org
Subject: RE: What to know detail about why Squid use single process.
Sent: Tue Apr 23 15:57:36 CST 2002
>
>
> > -----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 - 20:29:48 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:19 MST