[论文解读] Delay-Free Concurrency on Faulty Persistent Memory
本文提出了一种通用模拟器,可将任何使用读取、写入和CAS操作的并发程序转换为具有恒定计算和恢复延迟的持久、容错版本。通过使用基于胶囊的检查点机制,并对局部变量使用和内存屏障进行优化,该方法在保证崩溃后正确性的同时,实现了与手写优化的持久数据结构相当的高性能。
Non-volatile memory (NVM) promises persistent main memory that remains correct despite loss of power. This has sparked a line of research into algorithms that can recover from a system crash. Since caches are expected to remain volatile, concurrent data structures and algorithms must be redesigned to guarantee that they are left in a consistent state after a system crash, and that the execution can be continued upon recovery. However, the prospect of redesigning every concurrent data structure or algorithm before it can be used in NVM architectures is daunting. In this paper, we present a construction that takes any concurrent program with reads, writes and CASs to shared memory and makes it persistent, i.e., can be continued after one or more processes fault and have to restart. Importantly the converted algorithm has constant computational delay (preserves instruction counts on each process within a constant factor), as well as constant recovery delay (a process can recover from a fault in a constant number of instructions). We show this first for a simple transformation, and then present optimizations to make it more practical, allowing for a tradeoff for better constant factors in computational delay, for sometimes increased recovery delay. We also provide an optimized transformation that works for any normalized lock-free data structure, thus allowing more efficient constructions for a large class of concurrent algorithms. We experimentally evaluate our transformations by applying them to a queue.
研究动机与目标
- 解决在非易失性内存(NVM)架构中,使并发程序在系统崩溃后具备持久性和可恢复性的挑战。
- 克服现有方法(如持久事务内存和通用构造)的局限性,这些方法存在高开销或缺乏通用性。
- 提供一种通用的转换机制,保持高性能,并实现无需算法特定重设计的快速恢复。
- 实现现有并发算法到持久内存的自动、可重用迁移,最大限度减少程序员工作量。
- 通过可配置的胶囊边界和代码级优化,平衡计算延迟与恢复延迟,实现实际性能优化。
提出的方法
- 使用基于胶囊的检查点机制,通过定期将处理器状态存储到持久内存中,实现故障后的恢复。
- 实现一种恒定延迟模拟器,确保无论程序规模如何,计算延迟和恢复延迟均被限制在常数因子内。
- 引入一种低计算延迟模拟器,通过增大胶囊大小来降低计算开销,代价是恢复时间略有增加。
- 应用优化技术,如消除冗余局部变量、移除不必要的内存屏障,以及利用缓存行写入顺序,以减少刷新次数并提升性能。
- 设计一种持久归一化模拟器,用于无锁数据结构,通过利用算法的结构特性实现更高效的转换。
- 与可恢复CAS原语(来自Attiya等人)集成,以确保原子操作的正确且高效的恢复。
实验结果
研究问题
- RQ1能否构建一种通用模拟器,将任何包含读取、写入和CAS操作的并发程序转换为具有恒定延迟的持久、崩溃可恢复版本?
- RQ2在持久模拟框架中,如何优化计算开销与恢复时间之间的权衡?
- RQ3通过局部变量减少和屏障消除等代码级优化,性能最多可提升多少?
- RQ4自动转换的持久数据结构性能与手写优化或基于事务内存的替代方案相比如何?
- RQ5该模拟器能否有效应用于真实并发数据结构(如队列),同时保持具有竞争力的性能和低恢复成本?
主要发现
- 恒定延迟模拟器实现了恒定的计算和恢复延迟,即使在故障条件下也能保证性能可预测性。
- 低计算延迟模拟器通过使用更大的胶囊降低了计算开销,在通用队列上性能相比非优化版本最高提升1.28倍,在归一化队列上最高提升1.57倍。
- 通过消除冗余局部变量和移除CAS操作后的无用内存屏障等优化,显著减少了刷新次数并提升了吞吐量。
- 队列的归一化优化版本在最多5个线程时优于RomulusLR,并在单线程下吞吐量达到LogQueue的1.42倍。
- 所提系统的恢复过程高效,仅需加载最后一个胶囊并恢复一个可恢复的CAS操作,恢复时间与线程数呈线性关系。
- 实验结果表明,与基线非持久队列相比,通用性和快速恢复带来的性能开销极低,即使在高竞争环境下吞吐量下降也保持在较低水平。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。