Cgroups / sys / fs / cgroup is empty on ubuntu

I am new to cgroup . I want to use cgroup to bind Qemu to some processors. I am working on Ubuntu 12.04.3 with my own compiled kernel 3.11.0+ .
Below are a few of the commands of my teams.

 root@xiao-laptop :~/tamlok# service cgconfig start start: Job failed to start root@xiao-laptop :~/tamlok# ls /sys/fs/cgroup/ root@xiao-laptop :~/tamlok# cat /proc/mounts | grep cgroup root@xiao-laptop :~/tamlok# lssubsys --al cpuset cpu cpuacct devices freezer blkio perf_event 

/sys/fs/cgroup/ being empty really confused me. I do not know what to do next to achieve my goal. It seems that cgroup not installed? So what's wrong with that? If you need information about my platform to solve it, let me know.

In fact, I did not know the whole configuration process and used cgroup . Or you could help me with this step by step. I am afraid that the absence of any necessary configuration before this led to this problem. Thank you very much!

+6
source share
1 answer

Finally, I read the kernel documentation about cgroups and cpusets , as well as a detailed description of how to create and use cgroups step by step.
The problem was that I don’t install cgroups . The solution is given below.

 mount -t tmpfs cgroup_root /sys/fs/cgroup mkdir /sys/fs/cgroup/cpuset mount -t cgroup cpuset -o cpuset /sys/fs/cgroup/cpuset/ 

Then we can see the cpuset directory, and there are files inside it to change the properties of cpuset.
Thank you so much! Hope this helps someone!

+6
source

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


All Articles