PMDK Introduction

Posted kimbing-ng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PMDK Introduction相关的知识,希望对你有一定的参考价值。

原文

https://docs.pmem.io/persistent-memory/getting-started-guide/what-is-pmdk


PMDK Introduction

With persistent memory, applications have a new tier available for data placement as shown in Figure 1. In addition to the memory and storage tiers, the persistent memory tier offers greater capacity than DRAM and significantly faster performance than storage. Applications can access persistent memory resident data structures in-place, like they do with traditional memory, eliminating the need to page blocks of data back and forth between memory and storage.

技术图片
Figure 1: Memory-Storage Hierarchy with Persistent Memory Tier

To get this low-latency direct access, a new software architecture is required that allows applications to access ranges of persistent memory.

The Persistent Memory Development Kit (PMDK) is a collection of libraries and tools for System Administrators and Application Developers to simplify managing and accessing persistent memory devices. Tuned and validated on both Linux and Windows, the libraries build on the Direct Access (DAX) feature which allows applications to directly access persistent memory as memory-mapped files. This is described in detail in the Storage Network Industry Association (SNIA) NVM Programming Model. Figure 2 shows the model which describes how applications can access persistent memory devices (NVDIMMs) using traditional POSIX standard APIs such as read, write, pread, and pwrite, or load/store operations such as memcpy when the data is memory mapped to the application. The ‘Persistent Memory‘ area describes the fastest possible access because the application I/O bypasses existing filesystem page caches and goes directly to/from the persistent memory media.

技术图片
Fig 2: SNIA Programming Model

Directly accessing the physical media introduces new programming challenges and paradigms. The PMDK offers application developers many libraries and features highlighted below to solve some of the more difficult programming issues:

Available Libraries:

  • ?libpmem: provides low-level persistent memory support

  • ?libpmemobj: provides a transactional object store, providing memory allocation, transactions, and general facilities for persistent memory programming.

  • ?libpmemblk: supports arrays of pmem-resident blocks, all the same size, that are atomically updated.

  • ?libpmemlog: provides a pmem-resident log file.

  • ?libvmem [deprecated]: turns a pool of persistent memory into a volatile memory pool, similar to the system heap but kept separate and with its own malloc-style API. Since persistent memory support has been integrated into libmemkind, that library is the recommended choice for any volatile implementations. Libmemkind combines support for multiple types of volatile memory into a single, convenient API.

  • ?libvmmalloc: library transparently converts all the dynamic memory allocations into persistent memory allocations.

  • ?libpmempool: provides support for off-line pool management and diagnostics.

  • ?librmem: provides low-level support for remote access to persistent memory utilizing RDMA-capable RNICs.

  • ?libvmemcache: is an embeddable and lightweight in-memory caching solution. It‘s designed to fully take advantage of large capacity memory, such as Persistent Memory with DAX, through memory mapping in an efficient and scalable way.

Available Utilities:

  • ?pmempool: Manage and analyze persistent memory pools with this stand-alone utility

  • ?pmemcheck: Use dynamic runtime analysis with an enhanced version of Valgrind for use with persistent memory.

Supporting Documents

Supporting Videos

以上是关于PMDK Introduction的主要内容,如果未能解决你的问题,请参考以下文章

傲腾持久内存如何为数据赋能,加速应用落地?