I'm setting up cgroups config for my research team. The server has 8 cpus. The team member could only use part of the cpu time, so for the team I set cpu.cfs_quota_us = 400000
. I also want to add task priority with cpu.shares.
for example, here's my cgroup config:
group team {
cpu {
cpu.cfs_period_us = 100000;
cpu.cfs_quota_us = 400000; #4 CPUs
}
}
group team/user1 {
cpu {
cpu.shares = 256;
}
}
group team/user2 {
cpu {
cpu.shares = 768;
}
}
the cpu.shares only work if I set the parent group's cpu.cfs_quota_us to -1 and all cpu are in use.
Could cpu.cfs_quota_us and children's cpu.shares work together?