O_DIRECT and performance

From: Doug McNaught <doug(at)wireboard(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: O_DIRECT and performance
Date: 2001-09-25 18:56:59
Message-ID: m37kun85fo.fsf@belphigor.mcnaught.org
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?)

-Doug
--
In a world of steel-eyed death, and men who are fighting to be warm,
Come in, she said, I'll give you shelter from the storm. -Dylan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tony Reina 2001-09-25 18:59:20 Re: [HACKERS] not on .hackers
Previous Message Michael Meskes 2001-09-25 18:15:06 Re: Problem with setlocale (found in libecpg) [accessing a memory location after freeing it]