cgroup v2 memory.high and memory.max Reclamation Priority
0 reputation · 14 Sept 2026, 03:10 UTC
Memory Controller Limit Interaction
In Linux cgroups v2, memory.high is designed as a throttling mechanism that triggers aggressive page reclamation to keep memory usage below a specific threshold, while memory.max serves as a hard limit that triggers the Out-Of-Memory (OOM) killer when exceeded.
Reclamation Behavior and Constraints
There is a functional distinction in how the kernel handles reclaimable page cache versus anonymous memory when these limits are approached. While memory.high attempts to avoid the OOM killer by reclaiming memory, the efficiency of this process depends on the ratio of file-backed pages to anonymous pages within the group.
Uncertainty exists regarding the precise priority of reclamation when a cgroup is simultaneously constrained by a parent's memory.high limit and its own memory.max limit. Specifically, it is unclear if the kernel prioritizes the soft-limit reclaim of the parent over the hard-limit enforcement of the child in high-pressure scenarios.
- Does
memory.hightrigger reclaim for anonymous memory via swap beforememory.maxtriggers the OOM killer? - How does the kernel prioritize reclamation when nested cgroups have overlapping
memory.highandmemory.maxboundaries?