Re: Windows now has fdatasync() - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Windows now has fdatasync()
Date
Msg-id CA+hUKG+uLZcB+b+w0OcN5i4pDLiA0Nao2oSMb+HE8j3ZuRCDyQ@mail.gmail.com
Whole thread Raw
In response to Re: Windows now has fdatasync()  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Windows now has fdatasync()  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Sun, Feb 6, 2022 at 7:20 PM Michael Paquier <michael@paquier.xyz> wrote:
> On Sun, Dec 12, 2021 at 03:48:10PM +1300, Thomas Munro wrote:
> > I tried out a quick POC patch and it runs a bit faster than fsync(), as
> > expected.
>
> Good news, as a too high difference would be suspect :)
>
> How much difference does it make in % and are the numbers rather
> reproducible?  Just wondering..

I've only tested on a qemu/kvm virtual machine with a virtual SATA
disk device, so take this with a bucket of salt, but I think that's
enough to see the impact of 'slow' SATA commands hitting the device
and being waited for, and what I see is that wal_sync_method=fdatasync
does about 25% more TPS than wal_sync_method=fsync, and
wal_sync_method=open_datasync is a wildly higher number that I don't
believe (ie I don't believe it waited for power loss durability and
the links above support that understanding), but tumbles back to earth
and almost exactly matches the wal_sync_method=fdatasync number when
the write cache is disabled.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: generic plans and "initial" pruning
Next
From: Andres Freund
Date:
Subject: Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To: