← Back to team overview

openstack team mailing list archive

Re: [OpenStack] How to speed up the instance launch time?

 

Thanks for the responses and the link to pixelbeat. Its very helpful.

Start with QCOW, even before image is uploaded to Glance, dit help since
the image size camedown from 20Gb to 8+Gb. I even set the the
force_raw_images=False, and use_cow_images=True in nova.conf and restarted
nova services. I still see that the image is copied to _base and then
copied again to instances folder. This is probably expected and is the
caching feature. But under _base I see two files one with the underscore
suffix and one without. Does it mean that each time I launch an instance
with a diferent flavour(say disk set to 30Gb), another copy will be created
in _base?

root@openstack-kvm1:/var/lib/nova/instances# ls -l _base/ | grep
2b4a8e97317619077645de369a8f9fd63acd1f05
-rw-rw-r-- 1 nova         nova  8691056640 Mar  5 19:23
2b4a8e97317619077645de369a8f9fd63acd1f05
-rw-rw-r-- 1 libvirt-qemu kvm   8691056640 Mar  5 19:23
2b4a8e97317619077645de369a8f9fd63acd1f05_20
root@openstack-kvm1:/var/lib/nova/instances#

Thanks for all the valuable suggestions. I'll explore the disk merging or
separate HDD options as well when possible.

Regards,
Balu




On Tue, Mar 5, 2013 at 6:09 PM, Sylvain Bauza <sylvain.bauza@xxxxxxxxxxxx>wrote:

>  Another option is to merge both Glance and Nova datadirs on GlusterFS in
> distributed/replicated array.
> That way, all _base images and glance images are on the same "filesystem"
> but with distributed I/O.
>
> -Sylvain
>
>  Le 05/03/2013 13:10, Staicu Gabriel a écrit :
>
>  Hi,
>
> As a rule of thumb how I worked around this issue was to add a new hdd. I
> allocated this new hdd only to /var/lib/nova/instances/_base and the other
> hdd to /var/lib/nova/instances/ so in this manner to the first time a
> instance  is spawn on server the process use the full capacity of a hdd.
>
>  Regards,
> Gabriel
>
>
>    ------------------------------
> *From:* Pádraig Brady <P@xxxxxxxxxxxxxx> <P@xxxxxxxxxxxxxx>
> *To:* Balamurugan V G <balamuruganvg@xxxxxxxxx> <balamuruganvg@xxxxxxxxx>
> *Cc:* openstack@xxxxxxxxxxxxxxxxxxx
> *Sent:* Tuesday, March 5, 2013 1:20 PM
> *Subject:* Re: [Openstack] [OpenStack] How to speed up the instance
> launch time?
>
> On 03/05/2013 11:03 AM, Balamurugan V G wrote:
> > Hi,
> >
> > I have a Folsom 2012.2 3 nodes setup like the one specified at
> https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/blob/master/OpenStack_Folsom_Install_Guide_WebVersion.rst.
> Each node has a 1Tb hard disk with no raid.
> >
> > Be it the image creation or the Instance creation, takes a long
> time(factor of the disk size of the image), about 15mins for a 20gb image.
> I can understand the slow image creation due to the http transfer of the
> file from a seperate web server hosting my images to the controller node.
> But even the instance creation takes that much or even a bit longer. I see
> that the image is copied from the Controller to Compute node and multiple
> copies are make in the compute node. So all this takes long an dis
> proportional to the image size. Is there any way to speed up this process?
> Is a SAN based backend the only way to go?
>
> It sounds like you're using raw images throughout?
> You might consider using qcow2 images in glance.
> Then you can avoid the conversion to raw in the libvirt base
> directory by setting force_raw_images=False in nova.conf
> That will avoid some of the initial caching penalty.
>
> Ensuring that you have use_cow_images=True set,
> with use CoW images for the instances and improve
> instance startup latency.
>
> Details of the operations and tradeoffs involved are at:
> http://www.pixelbeat.org/docs/openstack_libvirt_images/
>
> thanks,
> Pádraig.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to    : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help  : https://help.launchpad.net/ListHelp
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References