Re: Filesystem Direct I/O and WAL sync option

From: Dimitri <dimitrik(dot)fr(at)gmail(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "PostgreSQL Performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Filesystem Direct I/O and WAL sync option
Date: 2007-07-10 12:53:18
Message-ID: 5482c80a0707100553y36fed046v2dc1bf5050d42eec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Yes, I tried all WAL sync methods, but there was no difference...
However, there was a huge difference when I run the same tests under
Solaris10 - 'fdatasync' option gave the best performance level. On the
same time direct I/O did not make difference on Solaris 10 :)

So the main rule - there is no universal rule :)
just adapt system options according your workload...

Direct I/O will generally speed-up write operation due avoiding buffer
flashing overhead as well concurrent writing (breaking POSIX
limitation of single writer per given file on the same time). But on
the same time it may slow-down your read operations, and you may need
64bit PG version to use big cache to still keep same performance level
on SELECT queries. And again, there are other file systems like QFS
(for ex.) which may give you the best of both worlds: direct write and
buffered read on the same time! etc. etc. etc. :)

Rgds,
-Dimitri

On 7/9/07, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
> On 7/9/07, Jim C. Nasby <decibel(at)decibel(dot)org> wrote:
> > BTW, it might be worth trying the different wal_sync_methods. IIRC,
> > Jonah's seen some good results from open_datasync.
>
> On Linux, using ext3, reiser, or jfs, I've seen open_sync perform
> quite better than fsync/fdatasync in most of my tests. But, I haven't
> done significant testing with direct I/O lately.
>
> --
> Jonah H. Harris, Software Architect | phone: 732.331.1324
> EnterpriseDB Corporation | fax: 732.331.1301
> 33 Wood Ave S, 3rd Floor | jharris(at)enterprisedb(dot)com
> Iselin, New Jersey 08830 | http://www.enterprisedb.com/
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Gauri Kanekar 2007-07-10 14:47:05 Query Analyser
Previous Message Heiko W.Rupp 2007-07-10 08:00:43 Re: PostgreSQL publishes first real benchmark