X-Original-To: pgsql-committers@postgresql.org Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by postgresql.org (Postfix) with ESMTP id A35F547592C for ; Mon, 10 Mar 2003 23:12:05 -0500 (EST) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id B90FF21068; Mon, 10 Mar 2003 20:11:33 -0800 (PST) Date: Mon, 10 Mar 2003 20:11:33 -0800 From: Sean Chittenden To: "Marc G. Fournier" Cc: Tom Lane , Christopher Kings-Lynne , pgsql-committers@postgresql.org Subject: Re: pgsql-server/ /configure /configure.in rc/incl ... Message-ID: <20030311041133.GC79234@perrin.int.nxad.com> References: <20030306031656.1876F4762E0@postgresql.org> <032f01c2e390$b1842b20$6500a8c0@fhp.internal> <11077.1046921667@sss.pgh.pa.us> <033f01c2e392$71476570$6500a8c0@fhp.internal> <12228.1046922471@sss.pgh.pa.us> <20030306094117.GA79234@perrin.int.nxad.com> <20030310224706.T35660@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030310224706.T35660@hub.org> User-Agent: Mutt/1.4i X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ X-Archive-Number: 200303/58 X-Sequence-Number: 9301 > > Heh, kqueue is _the_ reason to use FreeBSD. > > > > http://www.kegel.com/dkftpbench/Poller_bench.html#results > > > > I've toyed with the idea of adding this because it is monstrously more > > efficient than select()/poll() in basically every way, shape, and > > form. > > I would personally be interested in seeing patches ... what would be > involved? Whoa! Surprisingly, much less than I expected!!! A small shim would have to be put in place to abstract away returning valid file descriptors that are ready to be read()/write(). What's really cool, is there are only a handful of places that'd have to be updated (as far as I can tell): src/backend/access/transam/xact.c src/backend/postmaster/pgstat.c src/backend/postmaster/postmaster.c src/backend/storage/lmgr/s_lock.c src/bin/pg_dump/pg_dump.c src/interfaces/libpq/fe-misc.c Then it'd be possible to have clients/servers switch between kqueue, poll, select, or whatever the new flavor of alerting from available IO fd's. I've added it to my personal TODO list of things to work on. If someone beats me to it, cool, it's just something that one day I'll get to (hopefully). -sc -- Sean Chittenden