X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4BFC932A1E9 for ; Thu, 30 Sep 2004 02:46:06 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72835-10 for ; Thu, 30 Sep 2004 01:45:48 +0000 (GMT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by svr1.postgresql.org (Postfix) with ESMTP id E2E9132A049 for ; Thu, 30 Sep 2004 02:45:46 +0100 (BST) Received: (from markw@localhost) by mail.osdl.org (8.11.6/8.11.6) id i8U1jAG20493; Wed, 29 Sep 2004 18:45:10 -0700 Date: Wed, 29 Sep 2004 18:45:10 -0700 From: Mark Wong To: Tom Lane Cc: Bruce Momjian , Neil Conway , Guy Thornley , pgsql-performance@postgresql.org Subject: Re: O_DIRECT setting Message-ID: <20040929184510.B15723@osdl.org> References: <200409231335.i8NDZjR21993@candle.pha.pa.us> <26123.1095951461@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <26123.1095951461@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Thu, Sep 23, 2004 at 10:57:41AM -0400 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/332 X-Sequence-Number: 8460 On Thu, Sep 23, 2004 at 10:57:41AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > TODO has: > > * Consider use of open/fcntl(O_DIRECT) to minimize OS caching > > Should the item be removed? > > I think it's fine ;-) ... it says "consider it", not "do it". The point > is that we could do with more research in this area, even if O_DIRECT > per se is not useful. Maybe you could generalize the entry to > "investigate ways of fine-tuning OS caching behavior". > > regards, tom lane > I talked to Jan a little about this during OSCon since Linux filesystems (ext2, ext3, etc) let you use O_DIRECT. He felt the only place where PostgreSQL may benefit from this now, without managing its own buffer first, would be with the log writer. I'm probably going to get this wrong, but he thought it would be interesting to try an experiment by taking X number of pages to be flushed, sort them (by age? where they go on disk?) and write them out. He thought this would be a relatively easy thing to try, a day or two of work. We'd really love to experiment with it. Mark