Re: O_DIRECT setting - Mailing list pgsql-performance

From Mark Wong
Subject Re: O_DIRECT setting
Date
Msg-id 20040929184510.B15723@osdl.org
Whole thread Raw
In response to Re: O_DIRECT setting  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: O_DIRECT setting
List pgsql-performance
On Thu, Sep 23, 2004 at 10:57:41AM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> 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

pgsql-performance by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Interest in perf testing?
Next
From: Tom Lane
Date:
Subject: Re: O_DIRECT setting