一句话:提出基于学习的内存分配方法,在不移动对象的前提下缓解 C++ 服务器大页堆的持久碎片。
现代 C++ 服务器的工作集随负载变化而大幅波动,峰值期间分配的长生命周期对象会造成持续堆碎片,碎片率最高可达 2 倍。为在大堆上获得高性能而使用 2MB 大页,会进一步放大这一问题。由于 C++ 内存管理器无法移动对象,传统整理式消碎手段不可用,自动降低碎片因此十分困难。论文提出基于学习的 C++ 服务器工作负载内存分配方法,利用工作负载特征学习分配策略,以在不移动对象的前提下抑制碎片。摘要未报告具体实现细节与定量实验结果,评估应关注真实服务器负载下的碎片率、内存占用与运行时开销。
Modern C++ servers have memory footprints that vary widely over time, causing persistent heap fragmentation of up to 2x from long-lived objects allocated during peak memory usage. This fragmentation is exacerbated by the use of huge (2MB) pages, a requirement for high performance on large heap sizes. Reducing fragmentation automatically is challenging because C++ memory managers cannot move objects.
@inproceedings{paperbot5439,
title = {Learning-based Memory Allocation for C++ Server Workloads},
author = {Martin Maas and David G. Andersen and Michael Isard and Mohammad Mahdi Javanmard and Kathryn S. McKinley and Colin Raffel},
booktitle = {ASPLOS},
year = {2020},
doi = {10.1145/3373376.3378525}
}