[Openstack] New instances booting time

Daniel P. Berrange berrange at redhat.com
Fri Aug 14 14:10:13 UTC 2015


On Fri, Aug 14, 2015 at 09:55:42AM -0400, Jay Pipes wrote:
> On 08/13/2015 11:37 PM, Ivan Derbenev wrote:
> >*From:*Ivan Derbenev [mailto:ivan.derbenev at tech-corps.com]
> >*Sent:* Wednesday, August 5, 2015 1:21 PM
> >*To:* openstack at lists.openstack.org
> >*Subject:* [Openstack] New instances booting time
> >
> >Hello, guys, I have a question
> >
> >We now have OS Kilo + KVM+ Ubuntu 14.04
> >
> >Nova-compute.conf:
> >
> >[libvirt]
> >
> >virt_type=kvm
> >
> >images_type = lvm
> >
> >images_volume_group =openstack-controller01-ky01-vg
> >
> >volume_clear = none
> >
> >the problem is when nova boots a new instance it’s SUPER slow
> >
> >exactly this step:
> >
> >Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf
> >qemu-img convert -O raw
> >/var/lib/nova/instances/_base/999f7fff2521e4a7243c9e1d21599fd64a19b42e
> >/dev/openstack-controller01-ky01-vg/5f831046-435c-4636-8b71-a662327b608c_disk
> >
> >Well, I understand what this step is doing – it’s copying raw image to lvm.
> >
> >How can we speed it up?
> >
> >I don’t wanna have instance from 100GB image booted for 4 hours
> 
> Don't use base images that are 100G in size. Quite simple, really.

Presumably the actual image is only a few 100 MB in size, but the
virtual qcow2 size is 100 GB ?

I guess qemu-img probably has to still write out 100 GB of zeros
as it can't assume that the LVM target is pre-zeroed. I do wonder
though if there's a way to optimize this so that qemu-img only
has to write out the 100 MB of actual data, and not al the zeros.

Perhaps there's scope for a flag to qemu-img to tell it to seek
in the target when it sees holes in the source image. If OpenStack
then used sparse LVM images, there would be no need to rwite out
100's of GB of zeros.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the Openstack mailing list