X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6FF449DCAD4 for ; Tue, 29 Nov 2005 18:19:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32920-04 for ; Tue, 29 Nov 2005 18:19:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp.nildram.co.uk (smtp.nildram.co.uk [195.112.4.54]) by postgresql.org (Postfix) with ESMTP id CECCA9DCAB3 for ; Tue, 29 Nov 2005 18:19:25 -0400 (AST) Received: from [192.168.0.4] (213-208-104-206.dyn.gotadsl.co.uk [213.208.104.206]) by smtp.nildram.co.uk (Postfix) with ESMTP id E64D525065F; Tue, 29 Nov 2005 22:19:23 +0000 (GMT) Subject: Re: ice-broker scan thread From: Simon Riggs To: Gavin Sherry Cc: David Boreham , pgsql-hackers@postgresql.org In-Reply-To: References: <20051129110214.GA31333@svana.org> <438C76DA.4060801@boreham.org> <20051129164651.GF31333@svana.org> <438C8FD9.3090302@boreham.org> Content-Type: text/plain Date: Tue, 29 Nov 2005 22:19:27 +0000 Message-Id: <1133302767.2906.462.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/1501 X-Sequence-Number: 76783 On Wed, 2005-11-30 at 08:30 +1100, Gavin Sherry wrote: > On Tue, 29 Nov 2005, David Boreham wrote: > > > > > >By default when you use aio you get the version in libc (-lrt IIRC) > > >which has the issue I mentioned, probably because it's probably > > >optimised for the lots-of-network-connections type program where > > >multiple outstanding requests on a single fd are not meaningful. You > > >can however link in some other library which gives you kernel support. > > >However, I don't have a new enough kernel to have the kernel support so > > >I havn't tested that. > > > > > > > > Actually, after reading up on the current state of things, I'm not sure you > > can even get POSIX aio on top of kernel aio in Linux. There are also a > > few limitations in the 2.6 aio implementation that might prove troublesome: > > for example it only works with O_DIRECT. > > > > libaio gives userland access to the kernel aio api (which is different > > from POSIX aio). > > Yes. The O_DIRECT issue is my biggest concern about Linux at the moment. > That being said, the plan is to only pre-fetch the next N blocks, where N > < 32, and to read them into the local buffer cache. In a situation where > space in the cache low (and prefetched pages might be pushed out before we > even get to read them), we need to provide such information to the > readahead mechanism so that it can reduce the number of blocks which it > prefetches. My understanding was that Linux at least has a reasonable readahead mechanism that works on the scale you suggest. I think its fair to assume that anybody that wants this can afford sufficient memory to make it worthwhile. Multiple processes per scan implies (low numbers of users or I/O overkill). Best Regards, Simon Riggs