["Stephen C. Tweedie" <sct@redhat.com>] Re: O_DSYNC flag for open
Just a quick delurk to pass along this tidbit from linux-kernel on
Linux *sync() behavior, since we've been talking about it a lot...
-Doug
Doug McNaught <doug@wireboard.com> forwards:
2.4's O_SYNC actually does a fdatasync internally. This is also the
default behaviour of HPUX, which requires you to set a sysctl variable
if you want O_SYNC to flush timestamp changes to disk.
Well, that guy might know all about Linux, but he doesn't know anything
about HPUX (at least not any version I've ever run). O_SYNC is
distinctly different from O_DSYNC around here.
regards, tom lane
Tom Lane <tgl@sss.pgh.pa.us> writes:
Doug McNaught <doug@wireboard.com> forwards:
2.4's O_SYNC actually does a fdatasync internally. This is also the
default behaviour of HPUX, which requires you to set a sysctl variable
if you want O_SYNC to flush timestamp changes to disk.Well, that guy might know all about Linux, but he doesn't know anything
about HPUX (at least not any version I've ever run). O_SYNC is
distinctly different from O_DSYNC around here.
Y'know, I figured that might be the case. ;) He's a well-respected
Linux filesystem hacker, so I trust him on the Linux stuff.
So are we still thinking about preallocating log files as a
performance hack? It does seem that using preallocated files along
with O_DATASYNC will eliminate pretty much all metadata writes under
Linux in future...
[NOT suggesting we try to add anything to 7.1, I'm eagerly awaiting RC1]
-Doug
Import Notes
Reply to msg id not found: TomLanesmessageofFri16Mar2001105553-0500
Doug McNaught <doug@wireboard.com> writes:
So are we still thinking about preallocating log files as a
performance hack?
We're not just thinking about it, we're doing it in current sources ...
regards, tom lane
So are we still thinking about preallocating log files as a
performance hack? It does seem that using preallocated files along
with O_DATASYNC will eliminate pretty much all metadata writes under
Linux in future...[NOT suggesting we try to add anything to 7.1, I'm eagerly awaiting RC1]
I am pretty sure that is done.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
[ Drifting off topic ... ]
Well, that guy might know all about Linux, but he doesn't know anything
about HPUX (at least not any version I've ever run). O_SYNC is
distinctly different from O_DSYNC around here.
There is a HP_UX kernel flag 'o_sync_is_o_dsync' which will cause
O_DSYNC to be treated as O_SYNC. It defaults to being off -- it
is/was a backward compatibility "feature" since HP-UX 9.X (which is
history now) had implemented O_SYNC as O_DSYNC.
http://docs.hp.com/cgi-bin/otsearch/getfile?id=/hpux/onlinedocs/os/KCparam.OsyncIsOdsync.html
Regards,
Giles
There is a HP_UX kernel flag 'o_sync_is_o_dsync' which will cause
O_DSYNC to be treated as O_SYNC. It defaults to being off -- it
... other way around there, of course. Trying to clarify and
adding confusion instead. :-(
is/was a backward compatibility "feature" since HP-UX 9.X (which is
history now) had implemented O_SYNC as O_DSYNC.
Muttering,
Giles