cgroups: cannot write on file memory.oom_control

Hedi Boufaied hedi.boufaied at amadeus.com
Mon Apr 14 05:22:43 EDT 2014


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

---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140414/df3f8afb/attachment-0001.html 


More information about the Kernelnewbies mailing list