Re: linux 2.2.19pre and thttpd (VM-global problem?)

From: Jakob Østergaard (jakob@unthought.net)
Date: Fri Dec 29 2000 - 17:40:48 EST


On Fri, Dec 29, 2000 at 08:06:57PM +0100, Andrea Arcangeli wrote:
> On Fri, Dec 29, 2000 at 06:50:18PM +0000, Alan Cox wrote:
> > Your cgi will keep the other CPU occupied, or run two of them. thttpd has
> > superb scaling properties compared to say apache.
>
> I think with 8 CPUs and 8 NICs (usual benchmark setup) you want more than 1 cpu
> serving static data and it should be more efficient if it's threaded and
> sleeping in accept() instead of running eight of them (starting from sharing
> tlb entries and avoiding flushes probably without the need of CPU binding).

Ok - my point was (and maybe I'm just misunderstanding something):

Multiple threads do send() etc. -> this gets serialized by the kernel
anyway, as TCP checksums are done in the kernel as well as the NIC
driving etc. If the TCP layer cannot parallelize checksum calculation.

One thread does many send()'s -> this also gets serialized by the
kernel.

Or: one thread vs. many threads reading from the disk -> makes no difference
since there is *one* buffer layer, one driver, one disk etc. etc.

My question is: Does it change anything in the way the TCP stack
can crank out packets, if I change the number of threads in user-space
making the system calls ?

Does the fine-grained locking allow multiple user-space threads to
actually have TCP checksums etc. done on multiple CPUs concurrently,
and is it true that this will not happen if I have one user-space
thread doing non-blocking send() calls ?

Thanks,

-- 
................................................................
:   jakob@unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Dec 31 2000 - 21:00:13 EST