Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 12707 invoked by uid 6000); 11 May 1999 13:58:13 -0000 Received: (qmail 12700 invoked from network); 11 May 1999 13:58:11 -0000 Received: from server.noc.demon.net (HELO noc.demon.net) (193.195.224.4) by taz.hyperreal.org with SMTP; 11 May 1999 13:58:11 -0000 Received: by noc.demon.net; id OAA10115; Tue, 11 May 1999 14:58:09 +0100 (BST) Received: from fanf.noc.demon.net(195.11.55.83) by inside.noc.demon.net via smap (3.2) id xmad10095; Tue, 11 May 99 14:57:58 +0100 Received: from fanf by fanf.noc.demon.net with local (Exim 1.73 #2) id 10hD2j-0001sp-00; Tue, 11 May 1999 14:57:57 +0100 To: new-httpd@apache.org From: Tony Finch Subject: Re: Proposal: Get rid of most accept mutex calls on hybrid server. In-Reply-To: References: Message-Id: Date: Tue, 11 May 1999 14:57:57 +0100 Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Dean Gaudet wrote: >On Mon, 10 May 1999, Tony Finch wrote: >> Dean Gaudet wrote: >> > >> >Actually, I suspect that we don't really want to interprocess lock at all >> >in the multithreaded server. We use non-blocking listening sockets, and >> >pay the wake-all cost for the small number of processes (we're talking >> >like 8 processes, right?) >> >> If there's a select collision isn't *every* process woken up (not >> just the httpds)? > >I'm not sure what you mean... if a kernel had only one global sleeping >queue, yeah... but then there'd be no way for us to avoid thundering herd, >since everything would be awakened at all times. But kernels typically >have a lot of sleeping queues... including one on every socket. Sorry, I was too terse. The BSD network stack only has space for keeping track of one pid select()ing on each socket. If more than one child select()s on a listen socket at the same time the kernel cannot keep track of them so it doesn't even try: it just marks a collision and when a connection arrives on that socket it wakes up every process in select(). Tony. -- f.a.n.finch dot@dotat.at fanf@demon.net Arthur: "Oh, that sounds better, have you worked out the controls?" Ford: "No, we just stopped playing with them."