Re: What is the posix_memalign() equivalent for the PostgreSQL? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: What is the posix_memalign() equivalent for the PostgreSQL?
Date
Msg-id 20160902171749.ykdjdu55usvjojxg@alap3.anarazel.de
Whole thread Raw
In response to Re: What is the posix_memalign() equivalent for the PostgreSQL?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: What is the posix_memalign() equivalent for the PostgreSQL?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2016-09-02 13:05:37 -0400, Tom Lane wrote:
> Anderson Carniel <accarniel@gmail.com> writes:
> > If not, according to your experience, is there a
> > significance difference between the performance of the O_DIRECT or not?
> 
> AFAIK, nobody's really bothered to measure whether that would be useful
> for Postgres.  The results would probably be quite platform-specific
> anyway.

I've played with patches to make postgres use O_DIRECT. On linux, it's
rather beneficial for some workloads (fits into memory), but it also
works really badly for some others, because our IO code isn't
intelligent enough.  We pretty much rely on write() being nearly
instantaneous when done by normal backends (during buffer replacement),
we rely on readahead, we rely on the kernel to stopgap some bad
replacement decisions we're making.

Andres



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: What is the posix_memalign() equivalent for the PostgreSQL?
Next
From: Andres Freund
Date:
Subject: Re: Logical decoding slots can go backwards when used from SQL, docs are wrong