Crystalline: Fast and Memory Efficient Wait-Free Reclamation

Ruslan Nikolaev, Binoy Ravindran
8/5/2021
cs.DC

Official code: rusnikola/lfsmr (26 stars, C++, last commit 2021-07-10).

Abstract

Historically, memory management based on lock-free reference counting was very inefficient, especially for read-dominated workloads. Thus, approaches such as epoch-based reclamation (EBR), hazard pointers (HP), or a combination thereof have received significant attention.

Show full abstract

EBR exhibits excellent performance but is blocking due to potentially unbounded memory usage. In contrast, HP are non-blocking and achieve good memory efficiency but are much slower. Moreover, HP are only lock-free in the general case. Recently, several new memory reclamation approaches such as WFE and Hyaline have been proposed. WFE achieves wait-freedom, but is less memory efficient and suffers from suboptimal performance in oversubscribed scenarios; Hyaline achieves higher performance and memory efficiency, but lacks wait-freedom. We present a new wait-free memory reclamation scheme, Crystalline, that simultaneously addresses the challenges of high performance, high memory efficiency, and wait-freedom. Crystalline guarantees complete wait-freedom even when threads are dynamically recycled, asynchronously reclaims memory in the sense that any thread can reclaim memory retired by any other thread, and ensures (an almost) balanced reclamation workload across all threads. The latter two properties result in Crystalline's high performance and high memory efficiency. Simultaneously ensuring all three properties require overcoming unique challenges which we discuss in the paper. Crystalline's implementation relies on specialized instructions which are widely available on commodity hardware such as x86-64 or ARM64. Our experimental evaluations show that Crystalline exhibits outstanding scalability and memory efficiency, and achieves superior throughput than typical reclamation schemes such as EBR as the number of threads grows.

View on arXivView PDF

Code Implementations(1)

rusnikola/lfsmrOfficial100%

Hyaline Reclamation (PLDI '21, PODC '19)

262C++, CJun 13, 20195 years ago

Similar Papers

Cite this paper

@article{nikolaev2021crystalline,
  title  = {Crystalline: Fast and Memory Efficient Wait-Free Reclamation},
  author = {Ruslan Nikolaev and Binoy Ravindran},
  year   = {2021},
  eprint = {2108.02763},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.02763}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.02763.svg)](https://codeofpaper.com/paper/2108.02763)

Discussion