PMAlloc: A Holistic Approach to Improving Persistent Memory Allocation
Open Access
- 20 September 2024
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Computer Systems
- Vol. 42 (3-4) , 1-52
Abstract
Persistent memory allocation is a fundamental building block for developing high-performance and in-memory applications. Existing persistent memory allocators suffer from many performance issues. First, they may introduce repeated cache line flushes and small random accesses in persistent memory for their poor heap metadata management. Second, they use static slab segregation resulting in a dramatic increase in memory consumption when allocation request size is changed. Third, they are not aware of NUMA effect, leading to remote persistent memory accesses in memory allocation and deallocation processes. In this article, we design a novel allocator, named PMAlloc, to solve the above issues simultaneously. (1) PMAlloc eliminates cache line reflushes by mapping contiguous data blocks in slabs to interleaved metadata entries stored in different cache lines. (2) It writes small metadata units to a persistent bookkeeping log in a sequential pattern to remove random heap metadata accesses in persistent memory. (3) Instead of using static slab segregation, it supports slab morphing, which allows slabs to be transformed between size classes to significantly improve slab usage. (4) It uses a local-first allocation policy to avoid allocating remote memory blocks. And it supports a two-phase deallocation mechanism including recording and synchronization to minimize the number of remote memory access in the deallocation. PMAlloc is complementary to the existing consistency models. Results on six benchmarks demonstrate that PMAlloc improves the performance of state-of-the-art persistent memory allocators by up to 6.4× and 57× for small and large allocations, respectively. PMAlloc with NUMA optimizations brings a 2.9× speedup in multi-socket evaluation and is up to 36× faster than other persistent memory allocators. Using PMAlloc reduces memory usage by up to 57.8%. Besides, we integrate PMAlloc in a persistent FPTree. Compared to the state-of-the-art allocators, PMAlloc improves the performance of this application by up to 3.1×.Keywords
Funding Information
- National Key Research and Development Program of China (2023YFB4502100, 2021ZD0110700)
- National Science Foundation of China (62172361)
- Major Projects of Zhejiang Province (LD24F020012)
- Program of Zhejiang Province Science and Technology (2022C01044)
- US National Science Foundation (CNS 1906541 and 2216108)
This publication has 45 references indexed in Scilit:
- Consistent, durable, and safe memory management for byte-addressable non volatile main memory2013
- Traffic management2013
- MnemosyneACM SIGARCH Computer Architecture News, 2011
- Scalable locality-conscious multithreaded memory allocation2006
- HoardACM SIGPLAN Notices, 2000
- Dynamic storage allocation: A survey and critical review1995
- Space efficient conservative garbage collection1993
- Explicit solutions to the N -queens problem for all NACM SIGART Bulletin, 1991
- On the shortest spanning subtree of a graph and the traveling salesman problemProceedings of the American Mathematical Society, 1956
- Zum Hilbertschen Aufbau der reellen ZahlenMathematische Annalen, 1928