Re: fsync method checking - Mailing list pgsql-hackers

From Manfred Spraul
Subject Re: fsync method checking
Date
Msg-id 3FDA2B0A.1060709@colorfullife.com
Whole thread Raw
In response to fsync method checking  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: fsync method checking
List pgsql-hackers
Bruce Momjian wrote:

>    write                  0.000360
>    write & fsync          0.001391
>    write, close & fsync   0.001308
>    open o_fsync, write    0.000924
>
>
That's 1 milliseconds vs. 1.3 milliseconds. Neither value is realistic -
I guess the hw cache on and the os doesn't issue cache flush commands.
Realistic values are probably 5 ms vs 5.3 ms - 6%, not 30%. How large is
the syscall latency with BSD/OS 4.3?

One advantage of a seperate write and fsync call is better performance
for the writes that are triggered within AdvanceXLInsertBuffer: I'm not
sure how often that's necessary, but it's a write while holding both the
WALWriteLock and WALInsertLock. If every write contains an implicit
sync, that call would be much more expensive than necessary.

--
    Manfred


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Resurrecting pg_upgrade
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: Resurrecting pg_upgrade