Hi, Hedi, This sequence works for me: echo 0 > /sys/fs/cgroup/memory/memory.use_hierarchy mkdir /sys/fs/cgroup/memory/0 Then, the following two commands changes the value of oom_kill_disable: echo 1 > /sys/fs/cgroup/memory/0/memory.oom_control echo 0 > /sys/fs/cgroup/memory/0/memory.oom_control For more info, please look for the text about enabling/disabling use_hierarchy in section 6, http://lxr.free-electrons.com/source/Documentation/cgroups/memory.txt. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Mon, Apr 14, 2014 at 12:22 PM, Hedi Boufaied <hedi.boufaied@amadeus.com> wrote:
Hi everyone,
I am working with cgroups on OpenSuse (over VirtualBox) and I cannot disable the OOM killer by writing to the file memory.oom_control:
echo 1 > memory.oom_control -bash: echo: write error: Invalid argument
I can change the memory limit and several other settings by writing to the appropriate files (like memory.limit_in_bytes) but I could never write to file memory.oom_control although I am root.
I saw someone posted a similar issue a few days ago but there was no reply...
I have copied below the sequence of command I am using. Any idea what could be the issue ?
Thanks in advance for your help!
Hedi
----
/sys/fs> su - root
/sys/fs> cd cgroup
/sys/fs/cgroup> cgcreate -g memory:/mygroup
/sys/fs/cgroup> cd memory/mygroup
/sys/fs/cgroup/memory/mygroup> echo 32M > memory.limit_in_bytes
/sys/fs/cgroup/memory/mygroup> cat memory.limit_in_bytes 33554432
/sys/fs/cgroup/memory/mygroup> echo 1 > memory.oom_control -bash: echo: write error: Invalid argument
/sys/fs/cgroup/memory/mygroup> cat memory.oom_control oom_kill_disable 0 under_oom 0
--- _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies