Re: [PoC] Non-volatile WAL buffer - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: [PoC] Non-volatile WAL buffer
Date
Msg-id d3ef76a6-f0e5-d9b9-3a5f-dfaa02b6d387@enterprisedb.com
Whole thread Raw
In response to Re: [PoC] Non-volatile WAL buffer  (Ashwin Agrawal <ashwinstar@gmail.com>)
List pgsql-hackers
On 11/25/20 2:10 AM, Ashwin Agrawal wrote:
> On Sun, Nov 22, 2020 at 5:23 PM Tomas Vondra <tomas.vondra@enterprisedb.com>
> wrote:
> 
>> I'm not entirely sure whether the "pmemdax" (i.e. unpatched instance
>> with WAL on PMEM DAX device) is actually safe, but I included it anyway
>> to see what difference is.
> > I am curious to learn more on this aspect. Kernels have provided support
> for "pmemdax" mode so what part is unsafe in stack.
> 

I do admit I'm not 100% certain about this, so I err on the side of
caution. While discussing this with Steve Shaw, he suggested that
applications may get broken because DAX devices don't behave like block
devices in some respects (atomicity, addressability, ...).

> Reading the numbers it seems only at smaller scale modified PostgreSQL is
> giving enhanced benefit over unmodified PostgreSQL with "pmemdax". For most
> of other cases the numbers are pretty close between these two setups, so
> curious to learn, why even modify PostgreSQL if unmodified PostgreSQL can
> provide similar benefit with just DAX mode.
> 

That's a valid questions, but I wouldn't say the ~20% difference on the
medium scale is negligible. And it's possible that for the larger scales
the primary bottleneck is the storage used for data directory, not WAL
(notice that nvme is missing for the large scale).

Of course, it's faster than flash storage but the PMEM costs more too,
and when you pay $$$ for hardware you probably want to get as much
benefit from it as possible.


[1]

https://ark.intel.com/content/www/us/en/ark/products/203879/intel-optane-persistent-memory-200-series-128gb-pmem-module.html

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Li Japin
Date:
Subject: Re: Terminate the idle sessions
Next
From: Andy Fan
Date:
Subject: Re: About adding a new filed to a struct in primnodes.h