Hotness Fragmentation Limits Linux Proactive Reclaim: An Experimental Study of Object Placement, zswap, and cgroup v2 memory.reclaim
This paper measures how much memory hotness fragmentation—where one frequently used object keeps an entire page resident together with its cold surrounding bytes—costs a stock Linux kernel, which reclaims in 4 KiB pages while applications use memory in small objects. A purpose-built C workload scatters or packs the same hot 64-byte objects in a 4 GiB arena, with memory reclaimed in steps via cgroup v2 memory.reclaim into zswap with writeback disabled. Across 36 runs, packing saved 40.0–69.7% of memory while scattering saved 0–37.0%, and savings matched a simple model based on the fraction of pages holding no hot object to within one percentage point in every configuration; reclaiming cold pages caused no lasting slowdown, whereas reclaiming beyond them evicted hot pages that faulted back in, costing a median 1.3–2.7 times baseline loop time while saving nothing. Two pilot-run validity problems, swap readahead and shared-cache timing noise, are reported with their fixes.

arXiv ·
· December 1, 2026