Adaptive Huge-Page Subrelease for Non-Moving Memory Allocators in Warehouse-Scale Computers
Modern C++ server workloads rely on 2 MB huge pages to improve memory system performance via higher TLB hit rates with larger address space coverage. Huge pages have traditionally been supported at the kernel level, but recent work shows user-level, huge page-aware memory allocators can achieve higher huge page coverage and thus performance. These memory allocators deal with a trade-off: 1) allocate memory from the operating system (OS) at the granularity of a huge page, achieve high performance, but potentially waste memory due to fragmentation, or 2) limit fragmentation by breaking up huge pages into smaller 4 KB pages and returning them to the OS, but reduce performance due to lower huge page coverage.
For example, TCMalloc’s huge page-aware memory allocation handles this trade-off by releasing memory to the operating system at a configurable release rate, breaking up huge pages as necessary. This approach balances performance and limiting fragmentation well for machines running one workload. For multiple applications on the same machine however, the reduction in memory usage is only useful to overall performance if another application will use it. In warehouse-scale computers, when an application releases and then requires the same amount or more memory quickly, but no other application uses the memory in the meantime, the release causes poorer huge page coverage without any system-wide benefit.
We introduce an adaptive release policy that dynamically determines whether or not to break up huge pages and return them to the OS to optimize system-wide performance. We built this policy into TCMalloc, a state-of-the-art memory allocator that uses huge pages. We deploy this strategy fleet-wide in warehouse-scale datacenters, delivering significant performance improvements at negligible real memory overhead, leading to a 1% fleet-wide throughput improvement.
Tue 22 JunDisplayed time zone: Eastern Time (US & Canada) change
13:30 - 16:15
|Radiant: Efficient Page Table Management for Tiered Memory Systems|
Sandeep Kumar Intel Labs, Aravinda Prasad Intel Labs, Smruti Ranjan Sarangi IIT Delhi, Sreenivas Subramoney Intel LabsDOI Pre-print
|Compendia: Reducing Virtual-Memory Costs via Selective Densification|
ISMM 2021Pre-print Media Attached
|ISMM Business Meeting|
Tobias Wrigstad Uppsala University, Sweden
|Adaptive Huge-Page Subrelease for Non-Moving Memory Allocators in Warehouse-Scale Computers|
|automemcpy A framework for automatic generation of fundamental memory operations|
Guillaume Chatelet Google Research, Chris Kennelly Google, Sam Xi Google, Ondrej Sykora Google Research, Clement Courbet Google Research, David Li Google, Bruno De Backer Google ResearchDOI Pre-print