From owner-freebsd-hackers Wed Feb 13 2:28:59 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from bugz.infotecs.ru (bugz.infotecs.ru [195.210.139.22]) by hub.freebsd.org (Postfix) with ESMTP id 9D68D37B400 for ; Wed, 13 Feb 2002 02:28:55 -0800 (PST) Received: (from root@localhost) by bugz.infotecs.ru (8.11.6/8.11.4) id g1DASTY88632; Wed, 13 Feb 2002 13:28:29 +0300 (MSK) (envelope-from vel) From: "Eugene L. Vorokov" Message-Id: <200202131028.g1DASTY88632@bugz.infotecs.ru> Subject: Re: THTTPD web server: problems with KQUEUE on FreeBSD 4.5-STABLE To: danfe@cytherea.weblab.nsu.ru (Alexey Dokuchaev) Date: Wed, 13 Feb 2002 13:28:29 +0300 (MSK) Cc: freebsd-hackers@freebsd.org In-Reply-To: <20020213160014.A97359@cytherea.weblab.nsu.ru> from "Alexey Dokuchaev" at Feb 13, 2002 04:00:14 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > I still wonder, whether this problem occurs because of how thttpd does > things, or how FreeBSD implements kqueue stuff, however, I am not sure > that I will have enough time to dig deep into this. Right now I'm pretty > happy with the fact that I got thttpd working again, and those "200 0" > messages are no longer in my logs. However, it is still an issue to > worry about, I believe, and I will be a lot more happy if my experience > helps either folks to find and fix some probable bugs (if any) in their > excellent software. Hm, there is no such thing as kqread() I think. There are kqueue() and kevent(). You didn't show the piece of code that uses it, so it's hard to say what the problem is. I recommend you to read jlemon's paper at http://www.freebsd.org/~jlemon/kqueue.pdf to see how to you should work with kqueue() and kevent(). As for performance, I can confirm that kqueue() functions is better than select()/poll() at least in situations where we have to do non-blocking i/o on some large number of fd's (say, several thousands), and actually each time we see some activity only on small number of them (say, several hundred). That's how ircd usually works, and system load goes down significantly with kqueue() comparing to select(). Regards, Eugene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message