计算机科学 > 操作系统
[提交于 2026年12月1日]
标题:Hotness Fragmentation Limits Linux Proactive Reclaim: An Experimental Study of Object Placement, zswap, and cgroup v2 memory.reclaim
查看中文 PDF 查看原文 PDF EasyResearch 阅读摘要:Data centers reclaim memory from running jobs to fit more work on each server, but Linux decides what to reclaim one 4 KiB page at a time while applications use memory one small object at a time. Banakar et al. (2026) call the resulting waste hotness fragmentation: a single frequently used object keeps an entire page resident, together with the cold bytes around it. This paper measures how much memory that costs a stock Linux kernel. A purpose-built C workload places the same number of hot 64-byte objects in a 4 GiB arena either scattered at random or packed contiguously, and a driver reclaims memory in steps through cgroup v2 memory.reclaim into zswap with disk writeback disabled. Across 36 runs (two layouts, hot sets of 1%, 5% and 20%, lz4 and zstd compressors, three repetitions), packing saved 40.0-69.7% of memory, while scattering saved 0-37.0%. At a 5% hot set the gap was 48.0% against 1.9% with lz4. With the compression ratio measured from zswap's counters, savings matched a simple model, the fraction of pages holding no hot object times one minus the inverse compression ratio, to within one percentage point in every configuration, and to within 0.02 points when measured against the arena alone. Reclaiming cold pages caused no lasting slowdown; reclaiming beyond them evicted hot pages that faulted straight back in, costing a median 1.3-2.7 times the baseline loop time while saving nothing. Two validity problems found during pilot runs, swap readahead and shared-cache timing noise, are reported with their fixes.
提交历史
来自:Lin Ju[v1] 2026年12月1日 星期二 16:35:10 UTC (70 KB)