Re: O_DIRECT setting

From: Mark Wong <markw(at)osdl(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, Guy Thornley <guy(at)esphion(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: O_DIRECT setting
Date: 2004-09-30 01:45:10
Message-ID: 20040929184510.B15723@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Sep 23, 2004 at 10:57:41AM -0400, Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-09-30 03:03:38 Re: O_DIRECT setting
Previous Message Gaetano Mendola 2004-09-29 22:00:44 Re: Interest in perf testing?