Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 13218 invoked by uid 6000); 14 Dec 1998 04:33:15 -0000 Received: (qmail 13206 invoked from network); 14 Dec 1998 04:33:13 -0000 Received: from twinlark.arctic.org (204.62.130.91) by taz.hyperreal.org with SMTP; 14 Dec 1998 04:33:13 -0000 Received: (qmail 26481 invoked by uid 500); 14 Dec 1998 04:33:55 -0000 Date: Sun, 13 Dec 1998 20:33:55 -0800 (PST) From: Dean Gaudet To: new-httpd mailing list Subject: Re: [Fwd: Pthread library benchmarks] In-Reply-To: <36746048.9D9130DB@humanfactor.com> Message-ID: X-Comment: Visit http://www.arctic.org/~dgaudet/legal for information regarding copyright and disclaimer. MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY=------------17FD16B47234DE838BB7F957 Content-ID: Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --------------17FD16B47234DE838BB7F957 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-ID: On Sun, 13 Dec 1998, Scott Dybiec wrote: > You may want to take the high cost of creating and context switching > with LinuxThreads into consideration when building the threaded version > of Apache for Linux. PMPthreads is the user-based pthread library used > for comparison. The linuxthreads creation cost is high because of lacking functionality in clone() which essentially requires a context switch into a "master" thread to create a new thread. There's a few proposals to fix this. Comparing the context switch cost of a pure user threads packages against a pure kernel threads package is somewhat unfair. The user threads package has to simulate all blocking i/o using non-blocking i/o. For the kernel solution the "i/o cost" is part of the context switch overhead. To provide a more balanced comparison you'd need some benchmark that does i/o. Threads within apache will almost always context switch due to blocking on i/o... rather than blocking on semaphores or using up a timeslice. Which makes it even more interesting to know the effects of i/o on the pmpthreads package. At any rate, given that pmpthreads looks like pthreads to the programmer, it shouldn't be hard to just link against it instead of linuxthreads... so I don't think we need to worry much about it. No? Dean --------------17FD16B47234DE838BB7F957--