Hi,
On which operating system (and which exact kernel version) are you running your measurements? Also, which 1.2 release of the libpmemobj are you using? 1.2.0?
Looking at our own benchmarking data, the performance of the library improved since 1.2.0. What I suspect is happening is that you are running on
an older kernel (<4.15) version without support for MAP_SYNC, and libpmem resorts to using msync() for data flushing. For a quick test, rerun your code with
PMEM_IS_PMEM_FORCE=1 environment variable.
In the 1.2.0 release of the library assumed that any dax-enabled file system allowed for user space flushing. But that behavior has changed starting with 1.2.1 patch
release where only device-dax namespaces were allowed to use optimized flushing:
Since then, the linux kernel DAX/NVDIMM support has matured significantly, and it's now possible to use a file system /w a MAP_SYNC which makes user space
flushing possible again - this is automatically detected by libpmem and it will do the right thing to ensure data consistency.
Hope this answers your questions. If the results are still this much worse after kernel upgrade or forcing pmem, please let us know and we will try to reproduce the
regression.
Piotr