В Fri, 16 Jan 2015 10:41:00 +0800 Andrea Turrini <andrea.turrini@gmail.com> пишет:
Hi all,
I'm facing a strange problem with cgroups in my openSUSE 13.2 fully updated with kernel 3.16.7-7-desktop.
I run some experiment with a tool that sometimes takes a lot of memory; for my purposes, I consider the experiment failed if it takes too much memory or too much time. To limit its memory consumption, on oS 13.1 I used to create a cgroup via the commands:
mkdir /tmp/experiment mount -t cgroup -o memory memory /tmp/experiment mkdir /tmp/experiment/test echo 8G > /tmp/experiment/test/memory.limit_in_bytes echo 8G > /tmp/experiment/test/memory.memsw.limit_in_bytes echo experiment_shell_PID > /tmp/experiment/test/tasks
and then from the shell with PID experiment_shell_PID I can run my experiments on several files without problems.
Now, with oS 13.2, the memory.memsw.* part is missing, so when the tool requires more than 8Gb of memory, instead of being killed as in oS 13.1, it starts to swap until it takes the whole swap (20Gb) or it is killed by timeout. As a workaround, I tried to disable the swap via "swapoff -a" but it works only for at most 15 minutes since then swap is re-enabled automatically.
How can I get the oS 13.1 behavior back in oS 13.2?
As far as I know it was always disabled by default and had to be explicitly enabled * Wed Sep 21 2011 mhocko@suse.cz - Provide memory controller swap extension. Keep the feature disabled by default. Use swapaccount=1 kernel boot parameter for enabling it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org