[lxc-users] Number of core for a container

Thouraya TH thouraya87 at gmail.com
Fri Nov 10 12:29:23 UTC 2017


Hi all,

I have used this command to fix cpu cores on which we have set running
containers.

root at g-105:~# lxc-cgroup -n worker cpuset.cpus 0
root at g-105:~# lxc-cgroup -n worker cpuset.cpus 1
root at g-105:~# lxc-cgroup -n worker cpuset.cpus 2
root at g--105:~# lxc-cgroup -n worker cpuset.cpus 3

root at g-105:~# lxc-cgroup -n worker cpuset.cpus 4
lxc_container: cgmanager.c: do_cgm_set: 1022 Error setting cgroup value
cpuset.cpus for cpuset:/lxc
lxc_container: cgmanager.c: do_cgm_set: 1023 call to
cgmanager_set_value_sync failed: invalid request
lxc_container: lxc_cgroup.c: main: 103 failed to assign '4' value to
'cpuset.cpus' for 'worker'

--> i have only 4 cores

root at g-105:~# lxc-cgroup -n workerTest cpuset.cpus 0,1,2,3
root at g-105:~# lxc-cgroup -n workerTest cpuset.cpus 0,1,2

Please, is there a command to display containers and list of cores used by
each container ?
A second question please,  can i fix that only container 1 uses  cpu
2,3 *(exclusive
use)* or not ? i.e container 2 CANNOT use cpu 2,3

Thanks so much for help.
Kind regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20171110/3df8f2fa/attachment.html>


More information about the lxc-users mailing list