0

I have Ubuntu 20.04, docker-ce 20.10.9, cgroup v1

When I start docker container, apperently docker, creates a cgroup docker with cpu.shares=1024.

Where I can set the custom value of cpu.shares for this whole cgroup?

I can set custom cpu.shares for specific container - docker run --rm --cpu-shares 2048 -ti ubuntu:20.04 bash and this container will get cpu.shares=2048, but the parent cgroup will still have cpu.shares=1024

What I to achieve: have kubernetes cluster, each node have, f.e. 16 core, for kubepods cgroups assigns cpu.shares=16384, when all pods start consume CPU, container running in docker cgroup, such as kubelet, can use only about 5%, in case if other containers in docker cgroup is idel, of all time of CPU. I want to make different and set cpu.shares=2048 for doker cgroup - to allow kubelet work faster in moment of heavy CPU load

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
DeamonMV
  • 722
  • 1
  • 10
  • 19

0 Answers0