From owner-freebsd-hackers Thu Apr 3 15:53:24 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA27560 for hackers-outgoing; Thu, 3 Apr 1997 15:53:24 -0800 (PST) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA27552 for ; Thu, 3 Apr 1997 15:53:22 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by root.com (8.8.5/8.6.5) with SMTP id PAA05634; Thu, 3 Apr 1997 15:54:17 -0800 (PST) Message-Id: <199704032354.PAA05634@root.com> X-Authentication-Warning: implode.root.com: localhost [127.0.0.1] didn't use HELO protocol To: Bakul Shah cc: Guido van Rooij , FreeBSD-hackers@freebsd.org (FreeBSD-hackers) Subject: Re: apache like preforking apps and high loads In-reply-to: Your message of "Thu, 03 Apr 1997 11:53:34 EST." <199704031653.LAA20772@chai.plexuscom.com> From: David Greenman Reply-To: dg@root.com Date: Thu, 03 Apr 1997 15:54:17 -0800 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> >When looking at Apacha like applications, one often sees extermely high >> >load averages. Apache preforks a number of processes that all block >> >on accept(). When a request comes in, all process are woken up and the >> >scheduler chooses one of the now runnable processes taht will succeed in >> >the accept(). The other go back to sleep. >> >> Not any more. I changed this a few days ago. Now only one process is >> woken up. > >Fairness is probably not an issue when an app. consists of a number >of anonymous servers but in general one would want to make sure that >if N processes are waiting on accept() on the same socket, no one >process is starved of accepting. How do you ensure that? The processes blocked on accept are handled in a round-robin fashion, oldest first. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project