arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.02763cs.DC
收藏

Crystalline:快速且内存高效的无等待回收

Crystalline: Fast and Memory Efficient Wait-Free Reclamation

Ruslan Nikolaev, Binoy Ravindran

摘要:

从历史上看,基于无锁引用计数的存储管理效率非常低,特别是对于以读取为主的工作负载。因此,诸如基于时期的回收(EBR)、危险指示器(HP)或其组合的方法已经受到显著关注。EBR表现出出色的性能,但由于潜在的无限内存使用而阻塞。相比之下,HP是非阻塞的,可以实现很好的内存效率,但速度要慢得多。此外,HP仅在一般情况下无锁。近年来,一些新的内存回收方法如WFE和Hyaline被提出。WFE实现了等待自由,但内存效率较低,在超额订阅的情况下性能不佳; Hyaline实现了更高的性能和内存效率,但缺乏等待自由。我们提出了一个新的无等待内存回收方案,晶体,同时解决了高性能,高内存效率和等待自由的挑战。Crystalline保证完全的无等待,即使线程是动态回收的,异步回收内存,任何线程都可以回收由任何其他线程退役的内存,并确保所有线程之间(几乎)平衡的回收工作负载。后两个属性导致Crystalline的高性能和高存储效率。同时确保所有三个属性需要克服我们在本文中讨论的独特挑战。Crystalline的实现依赖于在x86-64或ARM 64等商品硬件上广泛可用的专用指令。我们的实验评估表明,晶体表现出出色的可扩展性和内存效率,并实现卓越的吞吐量比典型的回收计划,如EBR的线程数量的增长。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑