Goal is to find a reasonably fast alternative in Windows (10) similar to emulating PMEM in Linux, for development purposes.
At the bottom of the original Linux emulation blog post there is a tip – https://pmem.io/2016/02/22/pm-emulation.html:
It is additionally worth mentioning you can emulate persistent memory with ramdisk (i.e. /dev/shm), or force pmem-like behavior by setting environment variable PMEM_IS_PMEM_FORCE=1, that would eliminate performance hit caused by msync(2).
There might be an option to create an iSCSI based RAM Disk on Windows Server but doesn’t seem available in Windows 10.
The first one I tried was ImDisk https://sourceforge.net/projects/imdisk-toolkit/, however when trying to open a pmem file here, PMDK was throwing an exception “GetVolumePathNameW: Success” and wouldn’t open the file. This had some useful features though, like being able to save and reload an image at shutdown/restart.
The next one I tried was Starwind RAM disk https://www.starwindsoftware.com/high-performance-ram-disk-emulator. Using this I was able to create a RAM Disk of 18GB, reformat as NTFS (default was FAT32), then create a pmem file of 16GB.
Time taken on SSD: (Samsung 960 PRO 512GB on M.2 socket): 31 sec (baseline)
[2019-08-04 08:20:21.189] [main] [info] Creating new pool c:\temp\test.pmem with layout 'myapp_v0.0.1' and size 17179869184
[2019-08-04 08:20:52.790] [main] [info] Pool successfully created.
Time taken on RAM Disk: 18 sec
[2019-08-04 08:24:05.177] [main] [info] Creating new pool e:\test.pmem with layout 'myapp_v0.0.1' and size 17179869184
[2019-08-04 08:24:23.943] [main] [info] Pool successfully created.
However then initialising the root object still took ~7 seconds on Ram Disk:
[2019-08-04 08:24:23.943] [main] [info] Pool successfully created.
[2019-08-04 08:24:31.127] [main] [info] AppManager: App initializing after first persistence
After SET PMEM_IS_PMEM_FORCE=1
Time taken on SSD: Pool creation 24s, object initiation 2ms
[2019-08-04 08:56:26.042] [main] [info] Creating new pool c:\temp\test.pmem with layout 'myapp_v0.0.1' and size 17179869184
[2019-08-04 08:56:50.784] [main] [info] Pool successfully created.
[2019-08-04 08:56:50.786] [main] [info] AppManager: App initializing after first persistence
Time taken on RAM Disk: Pool creation 15s, object initiation 2ms
[2019-08-04 08:49:47.364] [main] [info] Creating new pool e:\test.pmem with layout 'myapp_v0.0.1' and size 17179869184
[2019-08-04 08:50:02.691] [main] [info] Pool successfully created
[2019-08-04 08:50:02.693] [main] [info] AppManager: App initializing after first persistence
The initialization time has significantly reduced for both tests.
For comparison, on Linux on Emulated PMEM: Pool creation 35ms, object initiation <1ms
[2019-08-04 09:07:39.537] [main] [info] Creating new pool /mnt/pmem0/test.pmem with layout 'myapp_v0.0.1' and size 8589934592
[2019-08-04 09:07:39.572] [main] [info] Pool successfully created.
[2019-08-04 09:07:39.572] [main] [info] AppManager: App initializing after first persistence
Linux (Fedora 29) using memmap emulation. Unfortunately my test Linux server doesn’t have 16GB RAM free, so used 8GB – but still it is significantly faster
Using PMDK 1.6 and libpmemobj-c++ v1.7.
Needs more rigorous testing and testing for larger transactions, larger reads, concurrency etc. But maybe some improvement.
PMDK team - is there anything on the horizon that might allow byte-addressable emulation on Windows similar to Linux memmap? These options are still all block-based I believe.
Sean Whiteley - AxoMem.io
axomem.io | @axomemio | @seanwitx
FlushViewOfFile() and FlushFileBuffers() to flush data to the disk (non-pmem) and perform deep flush.--
You received this message because you are subscribed to the Google Groups "pmem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pmem/77a93a5e-7fcf-421b-8ec9-73da8abae526%40googlegroups.com.