Why does the cgroups memory subsystem use oom-killer instead of failing to return memory when progress allows us to limit memory to the cgroup limit?

We use the cgroup restriction procedure using more resources. but, when the memory is greater than the limit in the group, it will kill the process. Why does the cgroups memory subsystem use oom-killer instead of memory failure with revert memory when progress allows us to limit the memory over the cgroup limit?

+6
source share
1 answer

It looks like cgroups can use oom-killer or pause the process ( https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html ). But with ulimit, distribution just doesn't work fine.

The unanswered questions remain: is there access to groups to refuse the process memory (returning NULL from malloc)? Or is there a way to force ulimit to deny physical memory (-m), not just virtual memory (-v)?

+2
source

Source: https://habr.com/ru/post/979490/


All Articles