Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

echo $$ > tasks gives "no space left on device" when trying to use cpuset

I tried the example from the cpuset(7) manual and created a cpuset Charlie. On both Ubuntu 14.4 LTS and SLES 12 I get the following error when trying to put the current process into the cpuset:

/dev/cpuset/Charlie# echo $$ > tasks

bash: echo: write error: No space left on device

Any help?

like image 211
Holger Jakobs Avatar asked Feb 05 '15 16:02

Holger Jakobs


1 Answers

This usually means that you don't have any memory nodes assigned to the cpuset.

$ cat /dev/cpuset/Charlie/cpuset.mems

would return an empty line. So you can't assign a new task to this cgroup as it will not have any memory to work with.

Assign one or all memory nodes to this cgroup should fix it.

$ echo 0 > /dev/cpuset/Charlie/cpuset.mems

You also need to assign a cpu node as that will also likely be empty.

$ echo 0 > /dev/cpuset/Charlie/cpuset.cpus

Setting cgroup.clone_children to 1 can help in automatically inheriting memory and node setting from parent cgroup when a child cgroup is created.

like image 56
Rohit Jnagal Avatar answered Oct 22 '22 10:10

Rohit Jnagal