>> This is what we have discovered. AFAIK, all other major databases or
>> other similar apps (like exchange or AD) all open files with
>> FILE_FLAG_WRITE_THROUGH and do *not* use fsync. It might
>give noticably
>> better performance with an O_DIRECT style WAL logging at
>least. But I'm
>> unsure if the current code for O_DIRECT works on win32 - I think it
>> needs some fixing for that. Which might be worth looking at for 8.1.
>
>Doesn't Windows support O_SYNC (or even better O_DSYNC) flag to open()?
>That should be the Posixy spelling of FILE_FLAG_WRITE_THROUGH, if the
>latter means what I suppose it does.
They should, but someone said it didn't work. I haven't followed up on
it, though, so it is quite possible it works. If so, it is definitly
worth trying.
>> Not much to do about the bgwriter, the way it is designed it *has* to
>> fsync during checkpoint.
>
>Theoretically at least, the fsync during checkpoints should not be a
>performance killer.
If you run a tight benchmark past a checkpoint, it will make an effect
if the fsync takes twice as long as it does on unix. If the checkpoint
happens when other I/O is fairly low then it shuold not have an effect.
Merlin, was that by any chance you? We've been talking about these
things quite a lot :-)
>So: try O_SYNC instead of fsync for WAL, ie, wal_sync_method =
>open_sync or open_datasync.
Definitly worth cehcking out.
//Magnus