<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Thouraya,</p>
<p>You can use this after create the container:<br>
</p>
Set the container to use any 2 CPUs on the host.<br>
<br>
$ lxc config set your-container limits.cpu 2<br>
<br>
Set the container to use physical CPU 0, 3, 7, 8 and 9 on the host.<br>
<br>
$ lxc config set your-container limits.cpu 0,3,7-9<br>
<br>
Set the container to use 20% of the available CPU on the host or
more if it’s available.<br>
<br>
$ lxc config set your-container limits.cpu.allowance 20%<br>
<br>
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.<br>
<br>
$ lxc config set your-container limits.cpu.allowance 100ms/200ms<br>
<br>
other option, use the profile.<br>
<br>
<br>
<div class="moz-cite-prefix">On 06/11/2017 16:40, Thouraya TH wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALbnis075h_+q82h4fCAyXS+ZUdfBq77fVXcEz0LYMu_wOtLeA@mail.gmail.com">
<div dir="ltr">
<div>
<div>Hi all,<br>
<br>
</div>
<div>Please, how can i fix number of cores (CPU) for a
container when i use lxc-create or lxc-clone ?<br>
</div>
<div><br>
</div>
Thanks a lot for help.<br>
</div>
Best reagrds. <br>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div style="font-family:Trebuchet MS,Arial,Helvetica,sans-serif;
vertical-align:baseline;line-height:18px;font-size:12px;color:#666;
clear:right; width:100%">
<span style="color:#333;">Renato dos Santos</span><br>
Analista de Infraestrutura<br>
<br>
48 3239-2400 Pabx<br>
<span style="display:inline-block;padding-top:10px;">WPLEX
Software Ltda.</span><br>
<span style="font-size:12px;">Rodovia SC 401, 8600 Corporate
Park Bloco 5 Sala 101<br>
88050-000 Santo Antônio de Lisboa, Florianópolis SC<br>
<a target="_blank" href="http://wplex.com.br"
style="text-decoration:none;color:#333;">wplex.com.br</a><br>
</span>
<img src="http://www.wplex.com.br/logo_mail.png"
style="margin-top:6px; margin-bottom:21px; float:none;
clear:right;" alt="WPLEX" align="left" border="0">
</div>
</div>
</body>
</html>