<div dir="ltr">can you use the host network interface directly? i have not done it, but i know its possible. how many processes are running inside each container? if its very less, i think low cpu footprint is expected .. </div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 24, 2014 at 12:55 AM, Benoit Lourdelet <span dir="ltr"><<a href="mailto:blourdel@juniper.net" target="_blank">blourdel@juniper.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>Hello,</div>
<span>
<div>
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div><br>
</div>
<div>I am running thousands of containers  (1.0.0 beta2 kernel 3.11.9)  – each with one physical interface-</div>
<div> and suffering from relatively slow startup rate : it takes 30 minutes to start 5000 containers.</div>
<div><br>
</div>
<div>During the startup period,  the CPU is not busy (below 20%). There is no disk involved as I run on a RAM disk.</div>
<div><br>
</div>
<div>I know that transferring interfaces to a namespace takes time.</div>
<div><br>
</div>
<div>The following script takes 24 minutes on the same platform :</div>
<div><br>
</div>
<div>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
date</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
for i in $(seq 1 5000) </p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
 do</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
ip netns add sp$i</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
ip link add a$i type veth peer name b$i</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
ip link set a$i netns sp$i</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
done</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
Date</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(76,47,45)">
<br>
</p>
</div>
<div>Starting 5000 containers without interface (only lo0) takes 11 minutes. So adding 24 to 11 is approximatively 30 minutes.</div>
<div><br>
</div>
<div>Is there a way to start the containers without interface  at all and add the interfaces to the containers in a  bulk fashion to speed up the processes ?</div>
<div><br>
</div>
<div>More generally is there a reason why container creation is not eating all the CPU ? The container creation processes takes between 10 or 20% of the host core CPU and no more.</div>
<div>Taking in account that no disk is involved as I run on a RAM disk.</div>
<div><br>
</div>
<div>Thanks</div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Benoit</div>
</font></span></div>
</div>
</span>
</div>

<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>