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

理解和优化持久内存分配

Understanding and Optimizing Persistent Memory Allocation

Wentao Cai, Haosen Wen, H. Alan Beadle, Chris Kjellqvist, Mohammad Hedayati, Michael L. Scott

摘要:

快速、密集、字节可寻址的非易失性内存的激增表明,在程序运行甚至进程和系统崩溃时,数据可能会以指针丰富的"内存中"格式保存。为了充分的一般性,这样的数据需要动态的存储器分配,并且虽然分配器原则上可以"滚入"每个数据结构中,但是希望使其成为单独的抽象。为此,我们引入可恢复性,持久分配器的正确性标准,以及一个非阻塞分配器,Ralloc,满足这一标准。Ralloc基于Leite和Rocha的LRMalloc,具有三个关键创新。首先,我们在正常操作期间保持足够的信息,以便在整个系统崩溃后正确地重建堆。我们的重建机制执行垃圾回收(GC),以确定和补救任何故障引起的内存泄漏。其次,我们引入了过滤函数的概念,它可以识别持久块中指针的位置,以减轻保守GC的限制。第三,为了允许持久区域映射到任意地址,我们对数据和元数据都采用了位置无关(基于偏移)的指针。实验表明,Ralloc与最先进的基于锁的持久分配器Makalu以及LRMalloc和JEMalloc等瞬态分配器在性能上具有竞争力。特别是,对GC和离线元数据重构的依赖允许Ralloc在正常操作期间几乎不为持久性付出任何代价。

英文摘要:

The proliferation of fast, dense, byte-addressable nonvolatile memory suggests that data might be kept in pointer-rich "in-memory" format across program runs and even process and system crashes. For full generality, such data requires dynamic memory allocation, and while the allocator could in principle "rolled into" each data structure, it is desirable to make it a separate abstraction. Toward this end, we introduce recoverability, a correctness criterion for persistent allocators, together with a nonblocking allocator, Ralloc, that satisfies this criterion. Ralloc is based on the LRMalloc of Leite and Rocha, with three key innovations. First, we persist just enough information during normal operation to permit correct reconstruction of the heap after a full-system crash. Our reconstruction mechanism performs garbage collection (GC) to identify and remedy any failure-induced memory leaks. Second, we introduce the notion of filter functions, which identify the locations of pointers within persistent blocks to mitigate the limitations of conservative GC. Third, to allow persistent regions to be mapped at an arbitrary address, we employ position-independent (offset-based) pointers for both data and metadata. Experiments show Ralloc to be performance-competitive with both Makalu, the state-of-the-art lock-based persistent allocator, and such transient allocators as LRMalloc and JEMalloc. In particular, reliance on GC and offline metadata reconstruction allows Ralloc to pay almost nothing for persistence during normal operation.

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

↑