Re: [PATCHES] O_DIRECT for WAL writes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] O_DIRECT for WAL writes
Date: 2005-06-21 13:23:39
Message-ID: 1856.1119360219@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp> writes:
> I tested two combinations,
> - fsync_direct: O_DIRECT+fsync()
> - open_direct: O_DIRECT+O_SYNC
> to compare them with O_DIRECT on my linux machine.
> The pgbench results still shows a performance win:

> scale| DBsize | open_sync | fsync=false | O_DIRECT only| fsync_direct | open_direct
> -----+--------+-----------+--------------+--------------+--------------+---------------
> 10 | 150MB | 252.6 tps | 263.5(+ 4.3%)| 253.4(+ 0.3%)| 253.6(+ 0.4%)| 253.3(+ 0.3%)
> 100 | 1.5GB | 102.7 tps | 117.8(+14.7%)| 147.6(+43.7%)| 148.9(+45.0%)| 150.8(+46.8%)
> 60runs * pgbench -c 10 -t 1000
> on one Pentium4, 1GB mem, 2 ATA disks, Linux 2.6.8

Unfortunately, I cannot believe these numbers --- the near equality of
fsync off and fsync on means there is something very wrong with the
measurements. What I suspect is that your ATA drives are doing write
caching and thus the "fsyncs" are not really waiting for I/O at all.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-06-21 13:34:08 Re: thousands comma numeric formatting in psql
Previous Message Mag Gam 2005-06-21 13:16:34 Re: Compiling tsearch2 on AIX

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2005-06-21 13:34:08 Re: thousands comma numeric formatting in psql
Previous Message Eugen Nedelcu 2005-06-21 13:03:43 Re: thousands comma numeric formatting in psql