4 ms·
I mean think of low priority service as services that are not latency sensitive (background jobs). you want those low priory cgroup to use the extra memory if
by skyde 4y ago
I mean think of low priority service as services that are not latency sensitive (background jobs).
you want those low priory cgroup to use the extra memory if it’s available (not used by a high priority cgroup)
it a high priority cgroup need the memory it steal it from the low priority cgroup up to the minimum guaranteed to this low priority cgroup.
this low priority cgroup memory contention will turns into IO pressure from page faults. Then IO limit on the low priority cgroup will cap how much IO it can generate by throttling it.
Meanwhile the high priority cgroup use it’s guaranteed cpu, guaranteed IO and guaranteed memory with no hiccup.
to learn more check « fbtax2 memory controller configuration » at https://facebookmicrosites.github.io/cgroup2/docs/memory-controller.html https://facebookmicrosites.github.io/cgroup2/docs/memory-con...
- skyde 4y agoIn 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.