[lxc-devel] LXC/Cgroup cpu.shares issue?
Yang, Andy
Andy.Yang at arris.com
Mon Mar 7 03:11:24 UTC 2016
Hi all,
I try to use LXC to control my CPU-hogging test application's CPU usage
and I find there is an issue:
I run two processes of the test application at same time (one is running
inside LXC container, another is running without container), and I find
the running inside container's process will consume much more CPU
resource than another one, no matter how many 'cpu.shares' setting.
Any one know this issue? I haven't used 'cpu.cfs_quota_us' to control.
Test example:
'containertestapplication' and 'containertestapplication2' are same test
application. But 'containertestapplication' is running in a LXC
container and is consuming 85.9% CPU while 'containertestapplication2'
is running without container and consuming only 9.1% CPU.
---
CPU0: 0.9% usr 1.1% sys 97.8% nic 0.0% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 3.95 3.89 3.00 3/138 264
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
244 240 1035 R N 13344 2.1 85.9 /usr/applications/containertestapplication/containertestapplication
247 124 1036 R N 13344 2.1 9.1 /usr/applications/containertestapplication2/containertestapplication2
...
...
---
Appreciate you feedback. Thnaks
More information about the lxc-devel
mailing list