一句话:NVAlloc 通过交错元数据、顺序簿记日志与 slab morphing 消除持久内存分配器的缓存行刷写和随机元数据访问。
现有持久内存分配器的堆组织会导致重复缓存行刷写与持久内存中的小随机访问,静态 slab 隔离在请求大小变化时还会显著增加内存消耗。NVAlloc 将 slab 中连续数据块映射到不同缓存行的交错元数据项以消除重复刷写;把小元数据单元按顺序写入持久簿记日志,消除随机堆元数据访问;并支持 slab morphing,使 slab 在不同大小类间转换以提升利用率,且与现有一致性模型互补。在 6 个基准上,小分配和大分配性能分别提升至多 6.4 倍和 57 倍,内存使用降低至多 57.8%;集成到持久 FPTree 后应用性能提升至多 3.1 倍。
Persistent memory allocation is a fundamental building block for developing high-performance and in-memory applications. Existing persistent memory allocators suffer from suboptimal heap organizations that introduce repeated cache line flushes and small random accesses in persistent memory. Worse, many allocators use static slab segregation resulting in a dramatic increase in memory consumption when allocation request size is changed. In this paper, we design a novel allocator, named NVAlloc, to solve the above issues simultaneously. First, NVAlloc eliminates cache line reflushes by mapping contiguous data blocks in slabs to interleaved metadata entries stored in different cache lines. Second, it writes small metadata units to a persistent bookkeeping log in a sequential pattern to remove random heap metadata accesses in persistent memory. Third, instead of using static slab segregation, it supports slab morphing, which allows slabs to be transformed between size classes to significantly improve slab usage. NVAlloc is complementary to the existing consistency models. Results on 6 benchmarks demonstrate that NVAlloc improves the performance of state-of-the-art persistent memory allocators by up to 6.4x and 57x for small and large allocations, respectively. Using NVAlloc reduces memory usage by up to 57.8%. Besides, we integrate NVAlloc in a persistent FPTree. Compared to the state-of-the-art allocators, NVAlloc improves the performance of this application by up to 3.1x.
@inproceedings{DangHHLZSC22,
title = {NVAlloc: rethinking heap metadata management in persistent memory allocators},
author = {Zheng Dang and Shuibing He and Peiyi Hong and Zhenxin Li and Xuechen Zhang and Xian-He Sun and Gang Chen},
booktitle = {ASPLOS},
year = {2022},
doi = {10.1145/3503222.3507743}
}