Re: Why O_SYNC is faster than fsync on ext3

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Yusuf Goolamabbas <yusufg(at)outblaze(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why O_SYNC is faster than fsync on ext3
Date: 2004-03-21 10:45:18
Message-ID: 405D723E.3050309@colorfullife.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yusuf Goolamabbas wrote:

>I sent this to Bruce but forgot to cc pgsql-hackers, The patches are
>likely to go into 2.6.6. People interested in extremely safe fsync
>writes should also follow the IDE barrier thread and the true fsync() in
>Linux on IDE thread
>
>
Actually the most interesting part of the thread was the initial post
from Peter Zaitsev on a fcntl(fd, F_FULLSYNC, NULL): He wrote that this
is necessary for Mac OS X to force a flush of the write caches in the
disks. Unfortunately I can't find anything about this flag with google.

Another interesting point is that right now, ide write caches must be
disabled for reliable fsync operations with Linux. Recent suse kernels
contain partial support. If the existing patches are completed and
merged, it will be safe to enable write caching.

Perhaps Bruce's cache flush test could be modified slightly to check
that the OS isn't lying about fsync: if fsync is faster than the
rotational delay of the disks, then the setup is not suitable for
postgres. This could be recommended as a setup test in the install document.

--
Manfred

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2004-03-21 16:06:00 Unbalanced Btree Indices ...
Previous Message Yusuf Goolamabbas 2004-03-21 04:37:36 Why O_SYNC is faster than fsync on ext3