Re: O_DIRECT setting

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Wong <markw(at)osdl(dot)org>
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 03:03:38
Message-ID: 8906.1096513418@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark Wong <markw(at)osdl(dot)org> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Guy Thornley 2004-09-30 07:02:32 Re: O_DIRECT setting
Previous Message Mark Wong 2004-09-30 01:45:10 Re: O_DIRECT setting