I have a question on cgroup.
According to doc (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt), the CFS scheduler’s value indicates core number.
After I set the limits and requests for kubernetes deployment, I found
root@get-core-deploy-54cfddb967-b6498:/app# cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us
-1
which means
group does not have any
bandwidth restriction in place, such a group is described as an unconstrained
bandwidth group
I also checked cgroup v2, by How to get number of cores from inside a pod, cgroup v2 seems to have a different place to record CPU limit, but doesn’t seem to be the case also.
root@get-core-deploy-54cfddb967-b6498:/app# ls /sys/fs/cgroup/cpu.max
ls: cannot access '/sys/fs/cgroup/cpu.max': No such file or directory
Experimented on local with docker as well, which seems to work — sysfs results are as expected.