We are updating this repository to improve the readability of our source code. We will also add some examples that use Libnvmmio to help you understand how to use Libnvmmio.
We have designed and implemented Libnvmmio to maximize the IO performance of non-volatile main memory (NVMM) systems.
The purpose of Libnvmmio is eliminating software overhead, providing low-latency, scalable file IO while ensuring data-atomicity.
As the name indicates, Libnvmmio is linked with applications as a library, providing an efficient IO path using the mmap
interface.
-
NVM-aware filesystem. You can use Libnvmmio with any filesystem that provides
DAX-mmap
, such as Ext4-DAX, XFS-DAX, PMFS, NOVA, SplitFS and so on. TheDAX-mmap
allows Libnvmmio to map the pages of an NVMM-backed file into its address space and then access it viaload
andstore
instructions. Libnvmmio intercepts and replacesread()
/write()
system calls withload
/store
instructions. -
PMDK. Libnvmmio uses PMDK library to write data to NVM. When writing data through non-temporal stores, it uses
pmem_memcpy_nodrain()
andpmem_drain()
. It also usespmem_flush()
to make metadata updates permanent. PMDK is a well-proven library. It provides optimizations for parallelisms such as SSE2 and MMX. It will also support ARM processors as well as Intel processors.
-
Build Libnvmmio.
$ git clone https://github.com/review-anonymous/libnvmmio.git $ cd libnvmmio/src $ make
-
Write and compile your application. There are simple examples in the examples directory. Those examples will help you understand how to use Libnvmmio. Note the following:
- Include
libnvmmio.h
header file in the source file with the file IO code. - Use the
O_ATOMIC
flag when opening a file for which you want to guarantee atomic-durability.
- Include
-
Set
PMEM_PATH
variable. Libnvmmio has to know where the persistent area is for logging. So you have to tell Libnvmmio which path an nvm-aware filesystem is mounted on.$ export PMEM_PATH=/mnt/pmem
-
Run your application.