When the docker container was running in v1 we simply passed ‘–cpu-shares’ values in the run command and as we all know in cgroup v2, we don’t have ‘cpu.shares’ knob available, it was replaced with ‘cpu.weight’.
In cgroup v1 the default value for cpu.shares is 1024 and that’s the same for ‘–cpu-shares’ which is a docker switch, to this day, I assumed they both are equal.
Now, in cgroup v2 ‘cpu.shares’ is replaced with ‘cpu.weight’ and the default value for ‘cpu.weight’ is 100000
My question, how can we pass cpu.weight when running a docker container, is it even supported if so, how can we effectively equate ‘cpu.weight’ to ‘–cpu-shares’??
P.S. I am new to docker and containerization technology so forgive any basic errors I made in the description.