arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2108.04202cs.DC
收藏

FliT:一个简单有效的持久算法库

FliT: A Library for Simple and Efficient Persistent Algorithms

Yuanhao Wei, Naama Ben-David, Michal Friedman, Guy E. Blelloch, Erez Petrank

摘要:

非易失性随机存取存储器(NVRAM)提供字节可寻址的持久性,其速度与DRAM相当。然而,由于高速缓存保持易失性,自动高速缓存驱逐可以重新排序对存储器的更新,在系统崩溃时可能使持久存储器处于不一致的状态。刷新和围栏指令可以用来强制更新之间的排序,但代价很高。这促使人们研究如何为NVRAM编写正确有效的持久程序。在本文中,我们提出了FliT,一个C++库,便于编写高效的持久化代码。使用库的默认模式可以使任何可线性化的数据结构持久化,并且对代码的更改最小。FliT通过使用一种新的算法来跟踪脏缓存行,从而避免了许多冗余的刷新指令。FliT库还允许额外的优化,但即使在默认设置下也能实现良好的性能。为了描述FliT库的功能和保证,我们定义了一个持久编程接口,称为P-V接口,FliT实现了该接口。P-V接口捕获代码的预期行为,其中一些指令的效果被持久化,而另一些则没有。我们表明,该接口捕捉到所需的语义在文献中的许多实用算法。我们将FliT库应用于四种不同的持久化数据结构,并表明在多个工作负载、持久化实现和数据结构大小中,FliT库总是在除一个工作负载外的所有工作负载中通过至少$2.1\times$的朴素实现来提高操作吞吐量。

英文摘要:

Non-volatile random access memory (NVRAM) offers byte-addressable persistence at speeds comparable to DRAM. However, with caches remaining volatile, automatic cache evictions can reorder updates to memory, potentially leaving persistent memory in an inconsistent state upon a system crash. Flush and fence instructions can be used to force ordering among updates, but are expensive. This has motivated significant work studying how to write correct and efficient persistent programs for NVRAM. In this paper, we present FliT, a C++ library that facilitates writing efficient persistent code. Using the library's default mode makes any linearizable data structure durable with minimal changes to the code. FliT avoids many redundant flush instructions by using a novel algorithm to track dirty cache lines. The FliT library also allows for extra optimizations, but achieves good performance even in its default setting. To describe the FliT library's capabilities and guarantees, we define a persistent programming interface, called the P-V Interface, which FliT implements. The P-V Interface captures the expected behavior of code in which some instructions' effects are persisted and some are not. We show that the interface captures the desired semantics of many practical algorithms in the literature. We apply the FliT library to four different persistent data structures, and show that across several workloads, persistence implementations, and data structure sizes, the FliT library always improves operation throughput, by at least $2.1\times$ over a naive implementation in all but one workload.

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

↑