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 2CEA432A179 for ; Thu, 30 Sep 2004 04:03:59 +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 94847-10 for ; Thu, 30 Sep 2004 03:03:53 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8313232A172 for ; Thu, 30 Sep 2004 04:03:51 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i8U33cRH008907; Wed, 29 Sep 2004 23:03:38 -0400 (EDT) To: Mark Wong Cc: Bruce Momjian , Neil Conway , Guy Thornley , pgsql-performance@postgresql.org Subject: Re: O_DIRECT setting In-reply-to: <20040929184510.B15723@osdl.org> References: <200409231335.i8NDZjR21993@candle.pha.pa.us> <26123.1095951461@sss.pgh.pa.us> <20040929184510.B15723@osdl.org> Comments: In-reply-to Mark Wong message dated "Wed, 29 Sep 2004 18:45:10 -0700" Date: Wed, 29 Sep 2004 23:03:38 -0400 Message-ID: <8906.1096513418@sss.pgh.pa.us> From: Tom Lane 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/333 X-Sequence-Number: 8461 Mark Wong writes: > 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. Hmm. Most of the time the log writer has little choice about page write order --- certainly if all your transactions are small it's not going to have any choice. I think this would mainly be equivalent to O_SYNC with the extra feature of stopping the kernel from buffering the WAL data in its own buffer cache. Which is probably useful, but I doubt it's going to make a huge difference. regards, tom lane