Re: [HACKERS] fsync method checking

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>
Cc: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, pgsql-performance(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] fsync method checking
Date: 2004-03-18 17:34:36
Message-ID: 200403181734.i2IHYaR29308@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance


I have updated my program with your suggested changes and put in
src/tools/fsync. Please see how you like it.

---------------------------------------------------------------------------

Zeugswetter Andreas SB SD wrote:
>
> > Running the attached test program shows on BSD/OS 4.3:
> >
> > write 0.000360
> > write & fsync 0.001391
>
> I think the "write & fsync" pays for the previous "write" test (same filename).
>
> > write, close & fsync 0.001308
> > open o_fsync, write 0.000924
>
> I have tried to modify the program to more closely resemble WAL
> writes (all writes to WAL are 8k), the file is usually already open,
> and test larger (16k) transactions.
>
> zeu(at)a82101002:~> test_sync1
> write 0.000625
> write & fsync 0.016748
> write & fdatasync 0.006650
> write, close & fsync 0.017084
> write, close & fdatasync 0.006890
> open o_dsync, write 0.015997
> open o_dsync, one write 0.007128
>
> For the last line xlog.c would need to be modified, but the measurements
> seem to imply that it is only worth it on platforms that have O_DSYNC
> but not fdatasync.
>
> Andreas

Content-Description: test_sync1.c

[ Attachment, skipping... ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-03-18 17:46:13 Re: [HACKERS] fsync method checking
Previous Message Jon Jensen 2004-03-18 17:05:12 Re: Further thoughts about warning for costly FK checks

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2004-03-18 17:46:13 Re: [HACKERS] fsync method checking
Previous Message Stephan Szabo 2004-03-18 16:56:03 Re: PostgreSQL Disk Usage and Page Size