Re: Postgres performance on Veritas VxVM

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: River Tarnell <river(at)loreley(dot)flyingparchment(dot)org(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres performance on Veritas VxVM
Date: 2009-12-02 09:57:54
Message-ID: 4B163A22.6070905@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

River Tarnell wrote:
> My configuration was a VxFS filesystem mounted at /sql, 'noatime,cio',
> and another mounted at /sql/pg_xlog,
> 'noatime,cio,mincache=direct,convosync=direct'. This forced direct I/O
> for the WAL. Without VxVM, these filesystems were on plain disk slices.
> With VxVM, I added the single disk to a diskgroup and created two
> volumes on it for the filesystems, layout=concat, with the default
> options.
>
That convosync trick only does what you want here if you also change
wal_sync_method=open_sync (or open_data_sync). As it is, you're still
calling fsync all the time despite what you did with the mount options,
and you're not getting direct writes because you're not writing
synchronously to trigger the conversion.

What you should do is the following:

postgresql.conf: wal_sync_method = open_datasync
/sql/pg_xlog: 'noatime,cio,mincache=direct,convosync=direct

That should work quite well. See
http://www.westnet.com/~gsmith/content/postgresql/TuningPGWAL.htm for a
lot more details about the various options for VxFS tuning of WAL
writes. Note that I only recommend open_sync for VxFS there because
that will work on Linux too. Since you're on Solaris, you should be
able to get the smaller open_datasync writes and some improvements from
using direct writes too stack on top of one another.

--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-12-02 10:00:40 Re: Build universal binary on Mac OS X 10.6?
Previous Message Dave Page 2009-12-02 09:14:22 Re: how to install just client libraries on windows?