Re: We really ought to do something about O_DIRECT and data=journalled on ext4

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: We really ought to do something about O_DIRECT and data=journalled on ext4
Date: 2010-12-06 23:56:26
Message-ID: 4CFD782A.5020205@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> The various testing that's been reported so far is all for
> Linux and thus doesn't directly address the question of whether other
> kernels will have similar performance properties.

Survey of some popular platforms:

Linux: don't want O_DIRECT by default for reliability reasons, and
there's no clear performance win in the default config with small
wal_buffers

Solaris: O_DIRECT doesn't work, there's another API support has never
been added for; see
http://blogs.sun.com/jkshah/entry/postgresql_wal_sync_method_and

Windows: Small reported gains for O_DIRECT, i.e 10% at
http://archives.postgresql.org/pgsql-hackers/2007-03/msg01615.php

FreeBSD: It probably works there, but I've never seen good performance
tests of it on this platform.

Mac OS X: Like Solaris, there's a similar mechanism but it's not
O_DIRECT; see
http://stackoverflow.com/questions/2299402/how-does-one-do-raw-io-on-mac-os-x-ie-equivalent-to-linuxs-o-direct-flag
for notes about the F_NOCACHE feature used. Same basic situation as
Solaris; there's an API, but PostgreSQL doesn't use it yet.

So my guess is that some small percentage of Windows users might notice
a change here, and some testing on FreeBSD would be useful too. That's
about it for platforms that I think anybody needs to worry about.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-07 00:22:09 Re: WIP patch for parallel pg_dump
Previous Message Josh Berkus 2010-12-06 22:46:31 Re: WIP patch for parallel pg_dump