Re: fsync vs open_sync

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql(at)mohawksoft(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: fsync vs open_sync
Date: 2004-08-10 05:29:46
Message-ID: 41185D4A.8090906@colorfullife.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>pgsql(at)mohawksoft(dot)com writes:
>
>
>>The improvements were REALLY astounding, and I would like to know if other
>>Linux users see this performance increase, I mean, it is almost 8~10 times
>>faster than using fsync.
>>Furthermore, it seems to also have the added benefit of reducing the I/O
>>storm at checkpoints over a system running with fsync off.
>>
>>
>
>What size transactions are you using in your tests?
>
>For a system with small transactions (not much more than 1 page worth of
>WAL traffic per transaction) I'd be pretty surprised if there was any
>real difference at all. There certainly should not be any difference in
>terms of the number of physical writes. We have seen some platforms
>where fsync() is inefficiently implemented and requires more kernel
>overhead than is reasonable --- not for I/O, but just to look through
>the kernel buffers and confirm that none of them need flushing. But I
>didn't think Linux was one of these.
>
>
>
IDE or scsi? If IDE: Write cache on or off? Which 2.4 kernel?
The numbers are very high - it could be a side effect of write caching
by the disks. I think some Suse 2.4 kernels have partial support for
reliable fsync even if the write cache is on (i.e. fsync issues a cache
flush command to the disk), but not all code paths are handled. Perhaps
fsync is handled and O_SYNC is not handled.
I could try to find the details.

--
Manfred

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Brown 2004-08-10 06:43:14 Re: Tablespace issues (comment on ,moving indexes)
Previous Message Tom Lane 2004-08-10 04:43:52 Re: Can't figure out column type dependencies