3 ms·
In Linux kernel, Different memory cgroups have distinct lruvecs, for memcg reclaim. This mean global reclaim algorithm can look at all cgroup "memory.low", an
by skyde 4y ago
In Linux kernel, Different memory cgroups have distinct lruvecs, for memcg reclaim.
This mean global reclaim algorithm can look at all cgroup "memory.low", and reclaim first from cgroups that are using more than their "memory.low" config.
You need to make sure that the sum of all cgroup "memory.low" is still below total memory available. Leaving 20% buffer for when the whole system is under stress is a good rule of thumb.
In addition, any memory that's guaranteed but unused can be allocated to other processes, further optimizing memory utilization.