effects of posix_fadvise on WAL logs

From: Mark Wong <markwkm(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: effects of posix_fadvise on WAL logs
Date: 2009-05-27 01:56:47
Message-ID: 70c01d1d0905261856j7178dbb7j366334365c147fcb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Does anyone have any tests that showcase benefits from the
posix_fadvise changes in xlog.c? I tried running some tests with dbt2
to see if any performance changes could be seen with 8.4beta2. I
thought an OLTP type test with a lot of inserts and updates would be a
good test. Unfortunately, I don't think I see anything interesting.
I was hoping to see less page cache activity, but maybe I'm not
looking correctly. Maybe there isn't enough activity to the WAL
relative to the rest of the database to show anything interesting?
Here are the tests I ran:

Baseline on 8.4beta2, using wal_sync_method=fsync:
http://207.173.203.223/~markwkm/community6/dbt2/m1500-8.4beta2/m1500.8.4beta2.2/report/

Next set wal_sync_method=open_sync for postix_fadvise:
http://207.173.203.223/~markwkm/community6/dbt2/m1500-8.4beta2/m1500.8.4beta2.osync1/report/

Now using the attached patch, with wal_sync_method=open_sync:
http://207.173.203.223/~markwkm/community6/dbt2/m1500-8.4beta2/m1500.8.4beta2.osync2/report/

I created the patch because currently posix_fadvise is used right
before the file handle to the WAL log is closed. I think
posix_fadvise needs to be called when the file is opened.

Regards,
Mark Wong

Attachment Content-Type Size
pgsql-xlog-posix_fadvise-20090425.patch application/octet-stream 2.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2009-05-27 02:08:21 Re: effects of posix_fadvise on WAL logs
Previous Message Joe Conway 2009-05-27 01:51:08 dblink patches for comment