[lxc-users] lxc-users Digest, Vol 204, Issue 6

Thouraya TH thouraya87 at gmail.com
Sat Nov 11 14:29:10 UTC 2017


Please, where can is set this intruction
lxc.cgroup.cpuset.cpu_exclusive = 1 in which file ?
Kind regards.

2017-11-11 13:00 GMT+01:00 <lxc-users-request at lists.linuxcontainers.org>:

> Send lxc-users mailing list submissions to
>         lxc-users at lists.linuxcontainers.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.linuxcontainers.org/listinfo/lxc-users
> or, via email, send a message with subject or body 'help' to
>         lxc-users-request at lists.linuxcontainers.org
>
> You can reach the person managing the list at
>         lxc-users-owner at lists.linuxcontainers.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lxc-users digest..."
>
> Today's Topics:
>
>    1. Number of core for a container (Thouraya TH)
>    2. Re: Number of core for a container (Fajar A. Nugraha)
>    3. Re: lxc-users Digest, Vol 204, Issue 3 (Thouraya TH)
>    4. Re: lxc-users Digest, Vol 204, Issue 3 (Tony Poder)
>
>
> ---------- Message transféré ----------
> From: Thouraya TH <thouraya87 at gmail.com>
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
> Cc:
> Bcc:
> Date: Fri, 10 Nov 2017 13:29:23 +0100
> Subject: [lxc-users] Number of core for a container
> 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.
>
>
> ---------- Message transféré ----------
> From: "Fajar A. Nugraha" <list at fajar.net>
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
> Cc:
> Bcc:
> Date: Fri, 10 Nov 2017 20:14:55 +0700
> Subject: Re: [lxc-users] Number of core for a container
> Disclaimer: I no longer use lxc. Mostly lxd nowadays.
>
> I can point you to some documentation on the web though, hopefully that
> helps
>
> On Fri, Nov 10, 2017 at 7:29 PM, Thouraya TH <thouraya87 at gmail.com> wrote:
>
>> 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
>>
>
>
> ... and what is your question here, if any? The cpuset cgroup is working
> as intended, since there's no 'cpu 4' on your system.
>
>
>>
>> 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 ?
>>
>
> Probably the combination of lxc-ls and lxc-cgroup.
>
> 'lxc-cgroup -n workerTest cpuset.cpus' will show you its current values.
> See
> - http://man7.org/linux/man-pages/man1/lxc-cgroup.1.html
> - https://linuxcontainers.org/lxc/manpages/man1/lxc-ls.1.html
>
>
>
>> 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
>>
>>
>
> Try https://linuxcontainers.org/lxc/manpages/man5/lxc.
> container.conf.5.html, 'control group' section. And
> https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt, search
> for 'cpuset.cpu_exclusive'. You could probably try (in container 1's
> config)
>
> lxc.cgroup.cpuset.cpu_exclusive = 1
> lxc.cgroup.cpuset.cpus = 2,3
>
> It might work if no other cgroups currently explicitly use cpu 2-3.
>
> --
> Fajar
>
>
> ---------- Message transféré ----------
> From: Thouraya TH <thouraya87 at gmail.com>
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>,
> yonsy.s.p at gmail.com
> Cc:
> Bcc:
> Date: Fri, 10 Nov 2017 14:40:06 +0100
> Subject: Re: [lxc-users] lxc-users Digest, Vol 204, Issue 3
> Hi,
> Thanks.
> shutdown -P 1
> Please, is there a command that i can use from the outside of container ?
> E.g: lxc-start -n c1 -shutdown 1 ?
> Thanks a lot.
> Kind regards.
>
>
> ---------- Message transféré ----------
> From: Tony Poder <tpoder at novaquark.com>
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
> Cc:
> Bcc:
> Date: Fri, 10 Nov 2017 15:39:10 +0100
> Subject: Re: [lxc-users] lxc-users Digest, Vol 204, Issue 3
> poweroff ?
>
> On Fri, Nov 10, 2017 at 2:40 PM, Thouraya TH <thouraya87 at gmail.com> wrote:
>
>> Hi,
>> Thanks.
>> shutdown -P 1
>> Please, is there a command that i can use from the outside of container ?
>> E.g: lxc-start -n c1 -shutdown 1 ?
>> Thanks a lot.
>> Kind regards.
>>
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>>
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20171111/3f75e903/attachment.html>


More information about the lxc-users mailing list