Introduction
For decades, database performance has been constrained by the stark divide between fast, expensive, volatile DRAM and cheap, persistent, but slow SSDs. Persistent Memory (PMEM), exemplified by Intel Optane DC, aims to bridge this gap by offering byte-addressability and near-DRAM latency alongside the persistence and capacity of traditional storage. However, while theoretical benefits are clear, real-world integration into complex Relational Database Management Systems (RDBMS) like PostgreSQL, MySQL, and SQLServer reveals significant software-level hurdles.
Operational Modes and Methodology
To understand how PMEM interacts with existing database architectures, researchers evaluated three primary hardware configurations on a dual-socket server equipped with 512GB of Intel Optane PMEM and 128GB of DDR4 RAM.
As shown in the figure above, the modes differ in how the OS and application perceive the hardware:
- Memory Mode: PMEM acts as a volatile extension of DRAM. The system's actual DRAM becomes a transparent "L4 cache" for the larger PMEM pool. This is intended to be a "plug-and-play" solution for memory-hungry applications.
- AppDirect Mode: PMEM is treated as a persistent storage device. Using fsdax (File System Direct Access), applications bypass the OS page cache to access hardware directly, minimizing software overhead.
- Default Mode: A baseline using standard NVMe SSDs for comparison.
The study tested these modes using industry-standard benchmarks: TPC-H (Analytical/OLAP) and TPC-C (Transactional/OLTP) across PostgreSQL (v13.2), MySQL (v8.0.23), and SQLServer (2019).
Key Insights: The Performance Reality
Memory Mode is Often a Trap
Counter-intuitively, using PMEM in Memory Mode rarely provided a performance benefit and often resulted in a slight slowdown compared to standard DRAM. This is largely due to "conflict misses" in the L4 DRAM cache and the latency overhead of moving data between the two tiers. For databases that already manage their own buffer pools, this extra layer of hardware-managed caching often adds more complexity than value.
AppDirect Mode and Software Bottlenecks
In AppDirect mode, PMEM shines, but it also exposes the "CPU-Involved I/O" bottleneck. Unlike traditional SSDs that use Direct Memory Access (DMA) to move data without taxing the processor, PMEM requires the CPU to move data directly. In high-concurrency scenarios, the CPU can become so busy managing I/O that it lacks the cycles to process actual queries.
As illustrated in the performance chart, AppDirect mode consistently outperforms both the Default SSD and Memory Mode configurations across various queries. In SQLServer, some queries ran up to 16x faster in AppDirect mode, particularly those involving large-scale joins or random index lookups where SSDs typically struggle.
Rethinking Database Architecture
The study concludes that modern DBMS engines are still "SSD-native." To truly exploit PMEM, software must evolve in three key areas:
- Reducing CPU Overhead: Finding ways to offload data movement so the CPU can focus on computation rather than I/O management.
- User-Space Prefetching: Since DAX mode bypasses the OS prefetcher, databases must implement their own prefetching logic to maintain sequential scan performance.
- Removing Legacy Protections: Features like "double-write buffers" in MySQL, designed to protect against partial writes on HDDs/SSDs, are often redundant on PMEM and only serve to add unnecessary CPU overhead.
While PMEM offers a massive hardware leap, achieving its full potential requires moving beyond simple configuration changes toward a fundamental rethink of the database I/O path.
Summary updated