From owner-freebsd-net@FreeBSD.ORG Wed Jul 16 07:19:26 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 308A91065682; Wed, 16 Jul 2008 07:19:26 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (mail.bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id 179448FC15; Wed, 16 Jul 2008 07:19:25 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 2F8145B4D; Wed, 16 Jul 2008 00:19:25 -0700 (PDT) To: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= In-reply-to: Your message of "Tue, 15 Jul 2008 16:37:00 PDT." Date: Wed, 16 Jul 2008 00:19:25 -0700 From: Bakul Shah Message-Id: <20080716071925.2F8145B4D@mail.bitblocks.com> Cc: freebsd-net@freebsd.org, Kris Kennaway , Thomas Vogt Subject: Re: too many open file descriptors messages since bind 9.4.2-P1 (port dns94) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 07:19:26 -0000 On Tue, 15 Jul 2008 16:37:00 PDT JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= wrote: > > Perhaps You're probably confused poll(2) with /dev/poll. The latter > behaves as you described (but is not portable as poll(2)). Indeed I am confused. Not sure where I got that idea. On Tue, 15 Jul 2008 16:17:04 PDT Julian Elischer wrote: > Bakul Shah wrote: > > ... > > Presumably kqueue has a lower cpu usage until the system gets > > loaded at which point polling might win. > > I don't think so, since kqueue only runs code associated with events > that have actually happened, and then only once until it's processed > where las I looked poll had more to do on each call. Yes. poll/select overhead of scanning the entire list is incurred on each system call + the kernel overhead (as Alfred pointed out later). On Wed, 16 Jul 2008 09:42:54 +1000 Peter Jeremy wrote: > Note that, based on sys_generic.c in 7.x and -CURRENT, poll(2) is > limited to checking FD_SETSIZE descriptors, whilst select(2) has > no upper limit. I strike out here as well. I should've read the code much more carefully or tested select() before opening my mouth. All in all it was not a good idea to post anything. My apologies for wasting everyone's time. And thanks all for correcting me without any flaming!