Hi Thouraya,

You can use this after create the container:

Set the container to use any 2 CPUs on the host.

    $ lxc config set your-container limits.cpu 2

Set the container to use physical CPU 0, 3, 7, 8 and 9 on the host.

    $ lxc config set your-container limits.cpu 0,3,7-9

Set the container to use 20% of the available CPU on the host or more if it’s available.

    $ lxc config set your-container limits.cpu.allowance 20%

Set the container to use no more than 50% of the available CPU on the host, or 100ms for every 200ms of CPU time available.

    $ lxc config set your-container limits.cpu.allowance 100ms/200ms

other option, use the profile.


On 06/11/2017 16:40, Thouraya TH wrote:
Hi all,

Please, how can i fix number of cores (CPU) for a container when i use lxc-create or lxc-clone ?

Thanks a lot for help.
Best reagrds.



_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

--
Renato dos Santos
Analista de Infraestrutura

48 3239-2400 Pabx
WPLEX Software Ltda.
Rodovia SC 401, 8600 Corporate Park Bloco 5 Sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC
wplex.com.br <http://wplex.com.br>
WPLEX
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to