Abstract
This paper presents a comprehensive analysis of performance trade-offs between implementation choices for transaction runtime systems on persistent memory. We compare three implementations of transaction runtimes: undo logging, redo logging, and copy-on-write. We also present a memory allocator that plugs into these runtimes. Our microbenchmark-based evaluation focuses on understanding the interplay between various factors that contribute to performance differences between the three runtimes—read/write access patterns of workloads, size of the persistence domain (portion of the memory hierarchy where the data is effectively persistent), cache locality, and transaction runtime bookkeeping overheads. No single runtime emerges as a clear winner. We confirm our analysis in more realistic settings of three "real-world" applications: a key-value store, a SQLite port, and a persistified version of memcached.
Introduction
The arrival of byte-addressable persistent memory (PM) promises near-DRAM speeds with data retention. However, programming for PM is difficult because CPU caches remain volatile. Developers must manually orchestrate cache flushes and "persist barriers" to ensure data consistency. Persistent transactions abstract this complexity by guaranteeing failure-atomicity. This paper systematically compares three implementation strategies—undo logging, redo logging, and copy-on-write (COW)—across varying hardware persistence domains and workloads.
Methods and Taxonomy
The authors define a taxonomy of persistence domains (PDOM) to classify hardware safety during power failure:
- PDOM-0: Only PM DIMMs are persistent; requires slow flushes and barriers.
- PDOM-1: PM DIMMs and memory controller buffers are persistent.
- PDOM-2: The entire memory hierarchy, including CPU caches, is persistent; barriers are effectively free.
Three optimized transaction runtimes were implemented:
- Undo Logging: Modifies data in-place after logging old data. Optimized with checksums to reduce barriers.
- Redo Logging: Writes new data to a log, applying it to memory only at commit. Uses bitmaps and hash tables for "read-after-write" lookups.
- Copy-on-Write (COW): Clones objects upon modification and swaps pointers at commit.
Evaluation used Intel's Software Emulation Platform with synthetic microbenchmarks (Array, Array-RAW) and real-world applications (SQLite/TPC-C, Memcached/Mutilate).
Key Results and Discussion
Microbenchmark analysis revealed that COW is consistently unviable, performing 2X to 50X slower than alternatives due to poor cache locality and indirection overhead.
The choice between Undo and Redo logging depends heavily on the hardware and workload:
- Hardware Impact: In PDOM-0, where barriers are slow, redo logging often wins for coarse-grained writes by batching barriers. In PDOM-2, undo logging wins due to its superior read performance.
- Workload Patterns: While redo logging was expected to dominate Memcached, undo logging outperformed it by 1–10% because Memcached transactions contain high frequencies (25-30%) of read-after-write operations, which penalize redo log lookups.
- Memory Allocation: A "Lazy Persist" allocator improved latency by up to 100% in PDOM-0 by deferring barriers until commit.
Conclusion
No single transaction runtime is universally optimal. Performance is highly sensitive to the read/write mix and the specific hardware persistence domain. Future systems may require adaptive runtimes that switch strategies dynamically or hardware-software co-design to mitigate specific bottlenecks like redo log lookup overhead.
Summary updated