From: Gaetano Mendola <mendola@bigfoot.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Re: Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
Date: Mon, 13 Sep 2004 22:28:05 +0200
Message-ID: <414602D5.3000506@bigfoot.com> (raw)
In-Reply-To: <200409131438.i8DEc8r04384@candle.pha.pa.us>
References: <1095055866.414539fadb90d@webmail.rawbw.com>
<200409131438.i8DEc8r04384@candle.pha.pa.us>
Bruce Momjian wrote:
> Have you seen /src/tools/fsync?
>
Now that the argument is already open, why postgres choose
on linux fdatasync? I'm understanding from other posts that
on this platform open_sync is better than fdatasync.
However I choose open_sync. During initdb why don't detect
this parameter ?
Regards
Gaetano Mendola
These are my times:
kernel 2.4.9-e.24smp ( RAID SCSI ):
Simple write timing:
write 0.011544
Compare fsync times on write() and non-write() descriptor:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
write, fsync, close 1.233312
write, close, fsync 1.242086
Compare one o_sync write to two:
one 16k o_sync write 0.517633
two 8k o_sync writes 0.824603
Compare file sync methods with one 8k write:
(o_dsync unavailable)
open o_sync, write 0.438580
write, fdatasync 1.239377
write, fsync, 1.178017
Compare file sync methods with 2 8k writes:
(o_dsync unavailable)
open o_sync, write 0.818720
write, fdatasync 1.395602
write, fsync, 1.351214
kernel 2.4.22-1.2199.nptlsmp (single EIDE disk):
Simple write timing:
write 0.023697
Compare fsync times on write() and non-write() descriptor:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
write, fsync, close 0.688765
write, close, fsync 0.702166
Compare one o_sync write to two:
one 16k o_sync write 0.498296
two 8k o_sync writes 0.543956
Compare file sync methods with one 8k write:
(o_dsync unavailable)
open o_sync, write 0.259664
write, fdatasync 0.971712
write, fsync, 1.006096
Compare file sync methods with 2 8k writes:
(o_dsync unavailable)
open o_sync, write 0.536882
write, fdatasync 1.160347
write, fsync, 1.189699
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mendola@bigfoot.com, pgman@candle.pha.pa.us
Subject: Re: Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
In-Reply-To: <414602D5.3000506@bigfoot.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox