lxc-ls --fancy taking a long time
Stéphane Graber
stgraber at ubuntu.com
Tue Jun 17 14:20:50 UTC 2014
On Tue, Jun 17, 2014 at 09:41:21AM -0300, Andreas Hasenack wrote:
> > > # time lxc-ls --fancy
> > > (...)
> > > real 0m3.926s
> > > user 0m0.531s
> > > sys 0m0.829s
> > >
> > > All 100 containers are running.
> > >
> > > That's very acceptable. Looks like it's how the containers were created.
> >
> > Can you whip up a brief script to show how, from a fresh cloud
> > instance, you can recreate the pathological environment?
> >
>
> These steps reproduced the problem on precise. I used a digital ocean 16Gb
> 8 core node:
>
>
> I did use a different provider (digital ocean this time), so the numbers
> are not the same, but it was still slow:
> add-apt-repository cloud-archive:icehouse
> apt-get update
> apt-get install lxc (gets you lxc 1.0.0~alpha1-0ubuntu14.1~ctools0)
> for n in `seq 1 100`; do lxc-create -n precise-c$n -t ubuntu-cloud -- -a
> amd64 -r precise; done
> for n in `seq 1 100`; do lxc-start -n precise-c$n -d; done
> wait for things to settle
> time lxc-ls --fancy > /dev/null: ~10s
>
> Same time if using lxc-create + 100 * lxc-clone, so there is no difference
> between containers created with clone or create.
>
> On trusty, same digital ocean hardware, using lxc-create + lxc-clone * 100,
> I get about 3.7s for lxc-ls --fancy with lxc 1.0.3 (trusty's default).
>
> I suspect it's just a difference in lxc versions:
> 1.0.0~alpha1-0ubuntu14.1~ctools0 versus 1.0.3-0ubuntu3. Do you know if
> 1.0.3 is available for precise?
Right, I basically rewrote lxc-ls between those two LXC versions, fixing
a whole bunch of performance issues I noticed when running with 1000+
containers.
To get LXC 1.0.x stable on precise, you can use ppa:ubuntu-lxc/stable
for now. I'm also working on getting LXC 1.0.4 SRUed to trusty at the
moment, then get that version backported to all stable releases
including precise (which will replace the 1.0.0~alpha1 we currently have
in precise-backports).
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20140617/e94d870a/attachment.pgp>
More information about the ubuntu-server
mailing list