From owner-freebsd-hackers Wed Feb 13 3:15:27 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.nsu.ru (mx.nsu.ru [193.124.215.71]) by hub.freebsd.org (Postfix) with ESMTP id E8B3737B405 for ; Wed, 13 Feb 2002 03:15:19 -0800 (PST) Received: from regency.nsu.ru ([193.124.210.26] helo=cytherea.weblab.nsu.ru) by mail.nsu.ru with esmtp (Exim 3.20 #1) id 16axNc-0000Q1-00; Wed, 13 Feb 2002 17:15:16 +0600 Received: (from danfe@localhost) by cytherea.weblab.nsu.ru (8.11.6/8.11.6) id g1DBEsU22856; Wed, 13 Feb 2002 17:14:54 +0600 (NOVT) (envelope-from danfe) Date: Wed, 13 Feb 2002 17:14:54 +0600 From: Alexey Dokuchaev To: Kip Macy Cc: thttpd@acme.com, hackers@FreeBSD.ORG Subject: Re: THTTPD web server: problems with KQUEUE on FreeBSD 4.5-STABLE Message-ID: <20020213171454.D14414@cytherea.weblab.nsu.ru> References: <20020213160014.A97359@cytherea.weblab.nsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from kmacy@netapp.com on Wed, Feb 13, 2002 at 02:29:30AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 13, 2002 at 02:29:30AM -0800, Kip Macy wrote: > > > I still wonder, whether this problem occurs because of how thttpd does > > things, or how FreeBSD implements kqueue stuff, however, I am not sure > > I take it you don't have any logs for 4.4? > You mean, webserver logs on FreeBSD 4.4? I don't have them, however, this problem did take place, and it persisted after upgrading to 4.5. Sad but true :( > > > And one more question: out of kqread()/poll()/select() methods, which one > > is more likely to perform better, both under normal server access, and > > Under normal load it doesn't matter. Under heavy load there can be no > comparison. > see: > http://www.kegel.com/dkftpbench/Poller_bench.html > > This excerpt is the FreeBSD relevant portion: > > > With 1 active socket amongst 100, 1000, or 10000 total sockets, > waitAndDispatchEvents takes the following amount of wall-clock time, in > microseconds (lower is faster): > > On a single processor 600Mhz Pentium-III with 512MB of memory, running FreeBSD > 4.x-STABLE (results contributed by Jonathan Lemon): > > pipes 100 1000 10000 30000 > select 54 - - - > poll 50 552 11559 35178 > kqueue 8 8 8 8 > > (Note: Jonathan also varied the number of active pipes, and found that kqueue's > time scaled linearly with that number, whereas poll's time scaled linearly with > number of total pipes.) > Hmm... It looks like kqueue is really the way to go... I think I should do a bit further investigation on this subject, since poll() does not satisfy me anymore :) Regards, Alexey D. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message