Crash Consistency for Byte Addressable Persistent Memory

122 concepts78 papers1 proposal

Non-Volatile Memory (NVM) promises a paradigm shift in computing by combining the byte-addressability and near-DRAM speeds of volatile memory with the durability of traditional storage disks, as noted by A. L. Narasimha Reddy et al. in SCMFS. However, writing software directly for NVM introduces a fundamental architectural challenge: while main memory retains its state across power cycles, the CPU registers and caches remain volatile.

Because modern CPUs aggressively reorder memory writes to maximize performance, the physical order in which data is written to NVM often differs from the logical order intended by the programmer. As Yile Gu et al. observe in Scalable and Accurate Application-Level Crash-Consistency Testing via Representative Testing, if a system failure occurs mid-execution, data residing in volatile caches is lost, and the state written to NVM may be left incomplete or out of order. For example, if a program allocates a new data node and updates a pointer to point to it, the CPU might flush the pointer update to NVM before the node's actual contents. A crash at that exact moment leaves a persistent pointer pointing to uninitialized garbage.

The Overhead of Strict Ordering

To prevent data corruption, developers must explicitly control when and how data moves from volatile caches to persistent memory. This is traditionally achieved using low-level hardware instructions, such as cache line flushes (clwb, clflushopt) and memory fences (sfence), to enforce strict write ordering and durability.

To ensure atomicity across multi-write operations, software systems typically layer heavyweight logging (such as undo/redo logs) or shadowing techniques on top of these instructions. However, as Rohan Kadekodi et al. point out in SplitFS, these mechanisms introduce massive software overhead and high write amplification. Forcing the CPU to stall and wait for cache lines to flush completely negates the low-latency advantages of NVM. As a result, Baotong Lu et al. note in APEX that standard persistence libraries often introduce substantial performance penalties that can completely neutralize the speed benefits of high-performance indexing algorithms.

The Concurrency-Crash Duality

One of the core insights in modern crash-consistency research is that handling a system crash is conceptually identical to handling thread failures in concurrent programming. When a processor crashes, it behaves exactly like a thread that has been permanently descheduled mid-operation.

In Log-Free Concurrent Data Structures, Tudor David et al. demonstrate that lock-free concurrent data structures are inherently suited for non-volatile memory. Because lock-free algorithms are already designed to maintain structural invariants even if any thread is interrupted at an arbitrary instruction, they can survive power failures without relying on expensive undo/redo logging.

Building on this duality, Se Kwon Lee et al. developed the RECIPE framework. The authors show that volatile concurrent indexes can be systematically converted into crash-consistent persistent indexes by mapping thread-isolation mechanisms directly to crash-recovery logic, achieving high performance with minimal code modifications.

Algorithmic and Architectural Minimization

Rather than wrapping entire operations in heavy transactions, modern persistent algorithms achieve atomicity through minimal, strategic writes. For instance, Ohad Ben-Baruch et al. implement a persistent program stack in Execution of NVRAM Programs with Persistent Stack using a single-byte "end marker" technique, allowing a single atomic write to commit state transitions.

At a theoretical level, Guy E. Blelloch et al. introduce The Parallel Persistent Memory Model, which structures computations into "idempotent capsules." This design ensures that if a crash occurs, re-executing the code block will not cause divergent execution paths or corrupt data, even if the computation reads a value and subsequently overwrites it within the same block.

Architecturally, systems can bypass software overhead by decoupling responsibilities. In SplitFS, Rohan Kadekodi et al. split file system operations between user-space and kernel-space. By handling data operations in user-space and metadata in the kernel—coupled with a novel relink primitive for atomic updates—they drastically reduce write amplification and software latency.

Managing the Persistent Heap

When persistent memory is integrated into managed runtimes like Java, crash consistency must extend to the runtime environment itself. A major hazard here is the creation of cross-tier dangling pointers: if a persistent data structure stores a reference to a volatile memory location, that reference becomes completely invalid after a reboot because volatile memory addresses are cleared during power cycles.

To solve this, frameworks like Espresso, developed by Mingyu Wu et al. in Espresso: Brewing Java For More Non-Volatility with Non-volatile Memory, and UniHeap, developed by Daixuan Li et al. in UniHeap, embed crash-consistency directly into the garbage collector. By modifying the collector to maintain the integrity of object locations, heap metadata, and references within non-volatile memory regions, the runtime can automatically guarantee heap integrity across reboots with minimal impact on application responsiveness.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 73 papers
  2. Version 1 · 2026-10-04 · 64 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_crash_consistency_813ced6a,
  title = {crash consistency},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/crash-consistency/rdr_813ced6a62a142088db91d0ca7267cb8},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 2, frozen text):

@misc{lacuna_crash_consistency_813ced6a_v2,
  title = {crash consistency},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/crash-consistency/rdr_813ced6a62a142088db91d0ca7267cb8/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-20},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake