From: Robert Haas [mailto:robertmhaas@gmail.com]> On Thu, Jan 25, 2018 at 7:08 PM, Tsunakawa, Takayuki
> <tsunakawa.takay@jp.fujitsu.com> wrote:
> > No, I'm not saying we should make the persistent memory mode the default.
> I'm simply asking whether it's time to make open_datasync the default
> setting. We can write a notice in the release note for users who still
> use ext3 etc. on old systems. If there's no objection, I'll submit a patch
> for the next CF.
>
> Well, like I said, I think that will degrade performance for users of SSDs
> or spinning disks.
As I showed previously, regular file writes on PCIe flash, *not writes using PMDK on persistent memory*, was 20% faster
withopen_datasync than with fdatasync.
In addition, regular file writes on HDD with ext4 was also 10% faster:
--------------------------------------------------
5 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.
Compare file sync methods using one 8kB write:
(in wal_sync_method preference order, except fdatasync is Linux's default)
open_datasync 3408.905 ops/sec 293 usecs/op
fdatasync 3111.621 ops/sec 321 usecs/op
fsync 3609.940 ops/sec 277 usecs/op
fsync_writethrough n/a
open_sync 3356.362 ops/sec 298 usecs/op
Compare file sync methods using two 8kB writes:
(in wal_sync_method preference order, except fdatasync is Linux's default)
open_datasync 1892.157 ops/sec 528 usecs/op
fdatasync 3284.278 ops/sec 304 usecs/op
fsync 3066.655 ops/sec 326 usecs/op
fsync_writethrough n/a
open_sync 1853.415 ops/sec 540 usecs/op
--------------------------------------------------
And you said open_datasync was significantly faster than fdatasync. Could you show your results? What device and
filesystemdid you use?
Regards
Takayuki Tsunakawa