Skip site navigation (1) Skip section navigation (2)

Re: O_DIRECT for WAL writes

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: O_DIRECT for WAL writes
Date: 2005-05-30 01:59:59
Message-ID: 20050530094517.3DD8.ITAGAKI.TAKAHIRO@lab.ntt.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Neil Conway <neilc(at)samurai(dot)com> wrote:

> > The patch adds a new choice "open_direct" to wal_sync_method.
> Have you looked at what the performance difference of this option is? 

Yes, I've tested pgbench and dbt2 and their performances have improved.
The two results are as follows:

1. pgbench -s 100 on one Pentium4, 1GB mem, 2 ATA disks, Linux 2.6.8
   (attached image)
  tps  | wal_sync_method
-------+-------------------------------------------------------
 147.0 | open_direct + write multipage (previous patch)
 147.2 | open_direct (this patch)
 109.9 | open_sync

2. dbt2 100WH on two opterons, 8GB mem, 12 SATA-RAID disks, Linux 2.4.20
  tpm   | wal_sync_method
--------+------------------------------------------------------
 1183.9 | open_direct (this patch)
  911.3 | fsync



> http://www.mail-archive.com/pgsql-patches(at)postgresql(dot)org/msg07186.html
> Is this data still applicable to the revised patch?

Direct-IO might be good on some machines, and bad on others.
This data is another reason that I revised the patch;
If you don't use open_direct, WAL writer behaves quite similarly to former.

However, the performances did not go down at least on my benchmarks.
I have no idea why the above data was bad...

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories


Attachment: pgbench-result.png
Description: image/png (26.4 KB) (inlined above)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-05-30 02:33:39
Subject: Re: locks in CREATE TRIGGER, ADD FK
Previous:From: Neil ConwayDate: 2005-05-30 01:52:55
Subject: Re: locks in CREATE TRIGGER, ADD FK

pgsql-patches by date

Next:From: Neil ConwayDate: 2005-05-30 02:55:16
Subject: Re: skip FK trigger on UPDATE
Previous:From: Tom LaneDate: 2005-05-30 01:06:39
Subject: Re: skip FK trigger on UPDATE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group