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 1B27F9DCBC3 for ; Wed, 30 Nov 2005 10:33:18 -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 21586-01 for ; Wed, 30 Nov 2005 10:33:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from toad.mtbrook.bozemanpass.com (toad.mtbrook.bozemanpass.com [69.145.82.195]) by postgresql.org (Postfix) with ESMTP id 5AE609DCAB1 for ; Wed, 30 Nov 2005 10:33:15 -0400 (AST) Received: from [69.145.82.253] (unknown [69.145.82.253]) by toad.mtbrook.bozemanpass.com (Postfix) with ESMTP id 3C99211027B for ; Wed, 30 Nov 2005 06:33:17 -0800 (PST) Message-ID: <438DB82E.7060507@boreham.org> Date: Wed, 30 Nov 2005 07:33:18 -0700 From: David Boreham User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-hackers@postgresql.org Subject: Re: ice-broker scan thread References: <20051129110214.GA31333@svana.org> <438C76DA.4060801@boreham.org> <20051129164651.GF31333@svana.org> <438C8FD9.3090302@boreham.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.018 required=5 tests=[AWL=0.018] X-Spam-Score: 0.018 X-Spam-Level: X-Archive-Number: 200511/1532 X-Sequence-Number: 76814 >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. > > > > Would you open a separate handle O_DIRECT, just for the prefetch ? My experience with O_DIRECT and databases in the past has not been great : what you gain with being able to control your own caching you loose (and more) in other ways. BTW, has anyone tried O_DIRECT and the prefetch idea on Linux ? I'm wondering if it may not work (because the read data won't get cached in the fs cache due to O_DIRECT).