最後更新: 2024-07-24
最後更新: 2024-07-24
目錄
- Common
- CPU
- Memory
另見
Common
cgroup.clone_children
* Default 0
automatically inheriting setting from parent cgroup when a child cgroup is created.
CPU
在 Cgroup V1, CPU 係有幾個 controller 的, 分別是 cpu, cpuacct, cpuset
cpuset.cpus
設定 process 的 cpu placement (CPU affinity). Default 是所有 CPU Core: 0-X
0-2,7
cpuset.mems
* 當設定了 cpuset.cpus 後就必須設定它 !! 因為 Default 它是 NULL
List of memory nodes on which processes in this cpuset are allowed to allocate memory
在單 CPU(不論有多少 Core) 情況下是 0
不設定時的 Error
cgclassify -g cpuset,memory:/copy_job $$
Error changing group of pid 901002: No space left on device
Memory
memory.use_hierarchy
It should be "1" and that should then ensure that memory consumption in child cgroups count towards the limit of their parent.