Lune

PPoPP2024顶会

Are Your Epochs Too Epic? Batch Free Can Be Harmful

Daewoo Kim, Trevor Brown, Ajay Singh

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 A marriage of pointer- and epoch-based reclamation
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 NBR: neutralization based reclamation
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 Concurrent deferred reference counting with constant-time overhead
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 Universal wait-free memory reclamation
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 OrcGC: automatic lock-free memory reclamation
  • NBR: neutralization based reclamation 引用了 Universal wait-free memory reclamation
  • Concurrent deferred reference counting with constant-time overhead 引用了 A marriage of pointer- and epoch-based reclamation
  • Concurrent deferred reference counting with constant-time overhead 引用了 Universal wait-free memory reclamation
  • Concurrent deferred reference counting with constant-time overhead 引用了 OrcGC: automatic lock-free memory reclamation
  • OrcGC: automatic lock-free memory reclamation 引用了 A marriage of pointer- and epoch-based reclamation
  • OrcGC: automatic lock-free memory reclamation 引用了 Universal wait-free memory reclamation
  • Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks 引用了 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 引用了 NBR: neutralization based reclamation
  • Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks 引用了 Concurrent deferred reference counting with constant-time overhead
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data StructuresAjay Singh, Trevor BrownPPoPP 2025 · 3 次引用
  2. Cxlalloc: Safe and Efficient Memory Allocation for a CXL PodNewton Ni, Yan Sun, Zhiting Zhu, Emmett WitchelASPLOS 2026 · 2 次引用
  3. Sharded Elimination and Combining for Highly-Efficient Concurrent StacksAjay Singh, Nikos Metaxakis, Panagiota FatourouPPoPP 2026

它引用的 Paper6

  1. Concurrent deferred reference counting with constant-time overheadDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2021 · 26 次引用
  2. A marriage of pointer- and epoch-based reclamationJeehoon Kang, Jaehwang JungPLDI 2020 · 25 次引用
  3. NBR: neutralization based reclamationAjay Singh, Trevor Brown, Ali José MashtizadehPPoPP 2021 · 23 次引用
  4. Universal wait-free memory reclamationRuslan Nikolaev, Binoy RavindranPPoPP 2020 · 23 次引用
  5. OrcGC: automatic lock-free memory reclamationAndreia Correia, Pedro Ramalhete, Pascal FelberPPoPP 2021 · 19 次引用

相关 Paper

  1. Snapshot-free, transparent, and robust memory reclamation for lock-free data structuresRuslan Nikolaev, Binoy RavindranPLDI 2021 · 18 次引用
  2. Turning manual concurrent memory reclamation into automatic reference countingDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2022 · 14 次引用
  3. MemPerf: Profiling Allocator-Induced Performance SlowdownsJin Zhou, Sam Silvestro, Steven (Jiaxun) Tang, Hanmei Yang 等OOPSLA 2023
  4. Fixing Non-blocking Data Structures for Better Compatibility with Memory Reclamation SchemesMd Amit Hasan Arovi, Ruslan NikolaevPPoPP 2026 · 1 次引用
  5. A Family of Fast and Memory Efficient Lock- and Wait-Free ReclamationRuslan Nikolaev, Binoy RavindranPLDI 2024 · 7 次引用
黄昏的海面,两侧是细线勾勒的悬崖