arrow
返回

Combining Machine Learning and Lifetime-Based Resource Management for Memory Allocation and Beyond

delete2024-03-25
delete0
delete
OA
AI
M
Martin Maas *
D
David G. Andersen
M
Michael Isard
M
Mohammad Mahdi Javanmard
K
Kathryn S. McKinley
C
Colin Raffel
DOI:10.1145/3611018delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Memory management is fundamental to the performance of all applications. On modern server architectures, an application's memory allocator needs to balance memory utilization against the ability to use 2MB huge pages, which are crucial for achieving high performance. This paper shows that prior C++ memory allocators are fundamentally limited because optimizing this trade-off depends on the knowledge of object lifetimes, which is information allocators lack. We introduce a two-step approach to attain high memory utilization in huge pages. We first introduce a novel machine-learning approach that predicts the lifetime of freshly allocated objects using the stack trace at the time of allocation and treats stack traces as natural language. We then present a fundamentally new type of memory allocator that exploits (potentially incorrect) object lifetime predictions to achieve high memory utilization at full huge page usage. In contrast to prior memory allocators that organize their heap around size classes and free lists, our allocator organizes the heap based on predicted lifetime classes and adjusts to mispredictions on the fly. We demonstrate experimentally that this learned lifetime-aware memory allocator (LLAMA) reduces fragmentation with huge pages by up to 78%. Our approach gives rise to a new methodology for applying ML in computer systems. In addition, similar space-time bin packing problems abound in computer science and we discuss how this approach has applications beyond memory allocation to a wide range of problems.

期刊

Communications of the ACM 封面图
Communications of the ACM
IF:
12.2
论文数:
1.2W
被引数:
3.7W

机构

C
Carnegie Mellon University
学者数:
1.4W
论文数: 1.4W
被引数: 2.7W
U
university of north carolina
学者数:
7.4W
论文数: 6.5W
被引数: 93
G
Google Incorporated
学者数:
3.5K
论文数: 1.8K
被引数: 8
U
University of North Carolina Chapel Hill
学者数:
3.9W
论文数: 3.1W
被引数: 46
学者 查看更多机构
引用论文

引用论文

Self-support P-doped CoS2 as efficient hybrid nano-electrocatalysts for hydrogen evolution in acid and alkaline solutions
err2024-01-01
err0
PREAI
errJue Nan; Beirong Ye; Shuyang Peng; Wanli Zhang; Hongxian Liu; Yongqi Zhang
err分享
err收藏
Hydrogen storage ability of hexagonal boron nitride
err2024-06-13
err0
PREAI
errAndrey M. Kovalskii; Anton M. Manakhov; Pavel A. Afanasev; Zakhar I. Popov; Andrei T. Matveev; Abdulaziz S. Al-Qasim
err分享
err收藏
Lattice dynamics of trigonal selenium. I. Phonon spectra
err2001-02-06
err0
PREAI
errW D Teuchert; R Geick; G Landwehr; H Wendel; W Weber
err分享
err收藏
Molecular Epidemiology of Clinical and Colonizing Methicillin-Resistant Staphylococcus Isolates in Companion Animals
err2021-04-23
err0
errOAAI
errHester Rynhoud; Brian M. Forde; Scott A. Beatson; Sam Abraham; Erika Meler; Ricardo J. Soares Magalhães; Justine S. Gibson
err分享
err收藏
学者 查看更多内容