[lxc-devel] cpu.shares doesn't work

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jan 5 12:22:06 UTC 2015


Quoting zhen wang (wangzhenaaa7 at gmail.com):
> I have created two containers using docker.  When i changed  the value of

docker is not lxc

> cpu.shares in the associated path of the docker id ,and i have already
> substituted -1 in the cpu.cfs_quota_us with 50000,  I tested a program
> ,which doesn't use io, the result of test didn't show the setting of
>  cpu.shares  work. Example :
> i set the cpu.shares 128  in one container and the other 1024 and i run the
> program in the two container concurrently. The time of the program cost is
> almost the same.

The cpu.shares will only start to make a difference if the cpu is under
contention by other cgroups.

> Kernel version 2.6.32-431.
> cpu cores - 2
> 
> Thanks.

> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel



More information about the lxc-devel mailing list