I've launched a Kubernetes pod (single container) with a static CPU management policy. It has a CPU request/limit of 10. This all seems to be working as expected:
cat /sys/fs/cgroup/cpuset/cpuset.cpus
11-20
What I'd like to do now is reserve a couple of those cores for a couple very specific threads that are very sensitive to context-switching. Is it possible to create a child cpuset with just a couple of those CPUs? The cgroup
filesystem is mounted as read-only:
mount | fgrep cpuset
cgroup on /sys/fs/cgroup/cpuset (ro,nosuid,nodev,noexec,relatime,cpuset)
…and so the usual procedure of using mkdir
to create child cpusets doesn't work out of the box. I haven't found a way to mount /sys/fs/cgroup/cpuset/
as read-write.
My read between the lines is that this is all the intended behavior, and allowing pods to further subdivide their CPUs isn't supported. Still, is there a way to create a cpuset within a pod that I'm missing?