Are Your Epochs Too Epic? Batch Free Can Be Harmful
Abstract
Epoch based memory reclamation (EBR) is one of the most popular techniques for reclaiming memory in lock-free and optimistic locking data structures, due to its ease of use and good performance in practice. However, EBR is known to be sensitive to thread delays, which can result in performance degradation. Moreover, the exact mechanism for this performance degradation is not well understood.
This paper illustrates this performance degradation in a popular data structure benchmark, and does a deep dive to uncover its root cause-a subtle interaction between EBR and state of the art memory allocators. In essence, modern allocators attempt to reduce the overhead of freeing by maintaining bounded thread caches of objects for local reuse, actually freeing them (a very high latency operation) only when thread caches become too large. EBR immediately bypasses these mechanisms whenever a particularly large batch of objects is freed, substantially increasing overheads and latencies. Beyond EBR, many memory reclamation algorithms, and data structures, that reclaim objects in large batches suffer similar deleterious interactions with popular allocators.
We propose a simple algorithmic fix for such algorithms to amortize the freeing of large object batches over time, and apply this technique to ten existing memory reclamation algorithms, observing performance improvements for nine out of ten, and over 50% improvement for six out of ten in experiments on a high performance lock-free ABtree. We also present an extremely simple token passing variant of EBR and show that, with our fix, it performs 1.5-2.6× faster than the fastest known memory reclamation algorithm, and 1.2-1.5× faster than not reclaiming at all, on a 192 thread four socket Intel system.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites A marriage of pointer- and epoch-based reclamation
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites NBR: neutralization based reclamation
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites Concurrent deferred reference counting with constant-time overhead
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites Universal wait-free memory reclamation
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites OrcGC: automatic lock-free memory reclamation
- NBR: neutralization based reclamation cites Universal wait-free memory reclamation
- Concurrent deferred reference counting with constant-time overhead cites A marriage of pointer- and epoch-based reclamation
- Concurrent deferred reference counting with constant-time overhead cites Universal wait-free memory reclamation
- Concurrent deferred reference counting with constant-time overhead cites OrcGC: automatic lock-free memory reclamation
- OrcGC: automatic lock-free memory reclamation cites A marriage of pointer- and epoch-based reclamation
- OrcGC: automatic lock-free memory reclamation cites Universal wait-free memory reclamation
- Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks cites Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures
- Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks cites NBR: neutralization based reclamation
- Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks cites Concurrent deferred reference counting with constant-time overhead
Cited by top-tier papers3
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data StructuresAjay Singh, Trevor BrownPPoPP 2025 · 3 citations
- Cxlalloc: Safe and Efficient Memory Allocation for a CXL PodNewton Ni, Yan Sun, Zhiting Zhu, Emmett WitchelASPLOS 2026 · 2 citations
- Sharded Elimination and Combining for Highly-Efficient Concurrent StacksAjay Singh, Nikos Metaxakis, Panagiota FatourouPPoPP 2026
Builds on6
- Concurrent deferred reference counting with constant-time overheadDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2021 · 26 citations
- A marriage of pointer- and epoch-based reclamationJeehoon Kang, Jaehwang JungPLDI 2020 · 25 citations
- NBR: neutralization based reclamationAjay Singh, Trevor Brown, Ali José MashtizadehPPoPP 2021 · 23 citations
- Universal wait-free memory reclamationRuslan Nikolaev, Binoy RavindranPPoPP 2020 · 23 citations
- OrcGC: automatic lock-free memory reclamationAndreia Correia, Pedro Ramalhete, Pascal FelberPPoPP 2021 · 19 citations
Related papers
- Snapshot-free, transparent, and robust memory reclamation for lock-free data structuresRuslan Nikolaev, Binoy RavindranPLDI 2021 · 18 citations
- Turning manual concurrent memory reclamation into automatic reference countingDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2022 · 14 citations
- MemPerf: Profiling Allocator-Induced Performance SlowdownsJin Zhou, Sam Silvestro, Steven (Jiaxun) Tang, Hanmei Yang et al.OOPSLA 2023
- Fixing Non-blocking Data Structures for Better Compatibility with Memory Reclamation SchemesMd Amit Hasan Arovi, Ruslan NikolaevPPoPP 2026 · 1 citation
- A Family of Fast and Memory Efficient Lock- and Wait-Free ReclamationRuslan Nikolaev, Binoy RavindranPLDI 2024 · 7 citations
