Article ID: 000057219 Content Type: Maintenance & Performance Last Reviewed: 01/05/2023

Is it Possible to Configure Intel® Optane™ Persistent Memory without Formatting Disk or Using File System?

Environment

Linux*

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Configuring Intel® Optane™ persistent memory without disk formatting or creating a file system by setting it in devdax mode.

Description

Is it possible to access Intel® Optane™ PMem (app direct mode) in user space without formatting disk?
Persistent Memory Development Kit (PMDK) should need mounting DCPM with file system, and it works like block device.

Resolution

By using the Intel® Optane™ persistent memory (PMem) in devdax mode, it is possible to memory map such a device. Because it is byte-addressable, it does not require a file system.

The primary benefit of having a file system is that it provides secure, multi-tenancy access to persistent memory.

Devdax mode security is simplistic (based on access to the /dev/dax* device) and doesn’t provide any support for multi-tenancy. (In theory it could build its own, but then it will end up with something that looks a lot like a dax-capable file system.)

It is possible to modify the allocation library (libvmmalloc) to work with the devdax device in addition to the fsdax access it normally supports.

Note that unlike fsdax mode, where the file system plays a role in determining the page sizes used (4KB or 2MB) devdax mode uses the alignment characteristic of the Intel® Optane™ PMem itself (4KB, 2MB, or 1GB). Despite the paucity of 1GB TLB entries, 1GB alignment for devdax Intel® Optane™ PMem yields the best performance across a range of workloads. (It is never slower, sometimes as much as 68% better depending upon the workload.) The libpmem library (and libpmem2 once released) also works with devdax.

In conclusion, It is possible to just mmap it but be mindful of the limitations listed above because most PMDK libraries can simply use devdax for the pool.

Additional information
  • Persistent Memory Development Kit (PMDK) is a collection of open source libraries and tools that are available today for both Linux* and Windows*.
  • Direct Access DAX is a file system extension to bypass the page cache and block layer to mmap persistent memory, from a PMEM block device, directly into a process address space. Direct Access (DAX) is a mechanism that allows applications to directly access persistent media from the CPU (through loads and stores), bypassing the traditional I/O stack (page cache and block layer). File systems that have been extended for DAX-enabled persistent memory include Linux ext4 and XFS, and Windows NTFS. These file systems bypass the I/O subsystem to directly use persistent memory as byte-addressable load/store memory as the fastest and shortest path to data stored in persistent memory. In addition to eliminating I/O operations, this path enables small data writes to be executed faster than those to traditional block storage devices.