[lxc-users] Speeding up containers startup
Benoit Lourdelet
blourdel at juniper.net
Fri Jan 24 16:07:50 UTC 2014
Hello,
I am using the host interfaces directly for my actual container :
E.g.:
lxc.network.type = phys
lxc.network.flags = up
lxc.network.link = eth10.1.1
lxc.network.name = eth0
lxc.network.hwaddr = 00:50:56:b8:01:00
I am running either 1,4 or 32 hyper threaded cores per container without notable difference, at least in terms of startup time and CPU utilization.
Regards
Benoit
From: Ranjib Dey <dey.ranjib at gmail.com<mailto:dey.ranjib at gmail.com>>
Reply-To: "lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>" <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Date: Friday, 24 January 2014 10:25
To: "lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>" <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Subject: Re: [lxc-users] Speeding up containers startup
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 ..
On Fri, Jan 24, 2014 at 12:55 AM, Benoit Lourdelet <blourdel at juniper.net<mailto:blourdel at juniper.net>> wrote:
Hello,
I am running thousands of containers (1.0.0 beta2 kernel 3.11.9) - each with one physical interface-
and suffering from relatively slow startup rate : it takes 30 minutes to start 5000 containers.
During the startup period, the CPU is not busy (below 20%). There is no disk involved as I run on a RAM disk.
I know that transferring interfaces to a namespace takes time.
The following script takes 24 minutes on the same platform :
date
for i in $(seq 1 5000)
do
ip netns add sp$i
ip link add a$i type veth peer name b$i
ip link set a$i netns sp$i
done
Date
Starting 5000 containers without interface (only lo0) takes 11 minutes. So adding 24 to 11 is approximatively 30 minutes.
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 ?
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.
Taking in account that no disk is involved as I run on a RAM disk.
Thanks
Benoit
_______________________________________________
lxc-users mailing list
lxc-users at lists.linuxcontainers.org<mailto: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/20140124/72acb76b/attachment.html>
More information about the lxc-users
mailing list