Re: O_DIRECT and performance

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: O_DIRECT and performance
Date: 2001-09-28 00:40:17
Message-ID: 200109280040.f8S0eHM23002@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Well, O_DIRECT has finally made it into the Linux kernel. It lets you
> open a file in such a way that reads and writes don't go to the buffer
> cache but straight to the disk. Accesses must be aligned on
> filesystem block boundaries.
>
> Is there any case where PG would benefit from this? I can see it
> reducing memory pressure and duplication of data between PG shared
> buffers and the block buffer cache. OTOH, it does require that writes
> be batched up for decent performance, since each write has an implicit
> fsync() involved (just as with O_SYNC).
>
> Anyone played with this on systems that already support it (Solaris?)

I have heard there are many cases there O_DIRECT on Solaris is slower
for databases than normal I/O. I think bulk copy was faster but not
normal operation. Probably not something we are going to get into soon.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-09-28 00:56:39 Re: Problem with the accents
Previous Message Mike Rogers 2001-09-27 21:22:14 Re: [PHP] [BUGS] PostgreSQL / PHP Overrun Error