Created
June 1, 2020 21:30
-
-
Save dguihal/bc8e7fa2960ffe9638f24bd78c4af99d to your computer and use it in GitHub Desktop.
CGroups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group test { | |
perm { | |
task { | |
uid = root; | |
gid = root; | |
} | |
admin { | |
uid = root; | |
gid = root; | |
} | |
} | |
cpu { | |
cpu.shares = 100; | |
} | |
memory { | |
memory.limit_in_bytes = 10000000; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test cpu,memory test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl start cgconfig | |
systemctl start cgrules | |
------------------------------- | |
cat /proc/22347/cgroup | |
12:cpuset:/ | |
11:cpu,cpuacct:/test | |
10:rdma:/ | |
9:net_cls,net_prio:/ | |
8:hugetlb:/ | |
7:perf_event:/ | |
6:blkio:/user.slice | |
5:pids:/user.slice/user-1000.slice/session-2.scope | |
4:devices:/user.slice | |
3:freezer:/ | |
2:memory:/test | |
1:name=systemd:/user.slice/user-1000.slice/session-2.scope | |
0::/user.slice/user-1000.slice/session-2.scope |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment