lxc-ls --fancy taking a long time

Andreas Hasenack andreas at canonical.com
Tue Jun 17 12:41:21 UTC 2014


> > # 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20140617/a0afbe08/attachment.html>


More information about the ubuntu-server mailing list