RE: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Robert Haas' <robertmhaas(at)gmail(dot)com>
Cc: Yoshimi Ichiyanagi <ichiyanagi(dot)yoshimi(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "menjo(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp" <menjo(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>, "ishizaki(dot)teruaki(at)lab(dot)ntt(dot)co(dot)jp" <ishizaki(dot)teruaki(at)lab(dot)ntt(dot)co(dot)jp>
Subject: RE: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory
Date: 2018-01-26 01:32:42
Message-ID: 0A3221C70F24FB45833433255569204D1F8A570E@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]> On Thu, Jan 25, 2018 at 7:08 PM, Tsunakawa, Takayuki
> <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)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 with open_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 filesystem did you use?

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-01-26 01:34:10 Re: [PATCH] Logical decoding of TRUNCATE
Previous Message Michael Paquier 2018-01-26 01:29:22 Re: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory