This library provides Python bindings for PMDK: Persistent Memory Development Kit.

Overview and Rationale

Currently, there are no Python packages supporting persistent memory, where by persistent memory we mean memory that is accessed like volatile memory, using processor load and store instructions, but retaining its contents across power loss just like traditional storages.

The goal of this project is to provide Python bindings for the libraries that are part of PMDK: Persistent Memory Development Toolkit. The pynvm project aims to create bindings for PMDK without modifying the Python interpreter itself, thus making it compatible to a wide range of Python interpreters (including PyPy).

How it works


Image from:

In the image above, we can see different types of access to a NVDIMM device. There are the standard and well known types of access like the one using the standard file API (fopen/open, etc.). Then on the far right is the type of access that this package is concerned with, using Load/Store and bypassing all kernel space code. This is the fastest way an application can access memory, and in our case, this is not the traditional volatile memory, it is persistent memory. The significance of this is that you don’t need to serialize data to disk anymore to save it between program runs, you just keep your data structures in memory that is persistent.

Providing the infrastructure to do this reliably is the purpose of Intel’s PMDK, for which this package provides Python bindings.