[one-users] VM clone speed improvement for shared storage clouds

Jaime Melis jmelis at opennebula.org
Thu Apr 19 02:57:00 PDT 2012


Hello,

thanks Jhon, this is indeed a very nice tip. It makes perfect sense. We are
not going to change the current code, because your tip implies that the
frontend has access to the file-server which needs not be the case. However
we're going to reflect your suggestion in the documentation.

We have added a simplified version of your guide to the "VM clone speed
improvement for shared storage clouds" article in
http://wiki.opennebula.org/#images_and_storage

You're very welcome to modify it!

cheers,
Jaime

On Wed, Apr 18, 2012 at 9:38 AM, Jhon Masschelein
<jhon.masschelein at sara.nl>wrote:

> Hi,
>
> In case this has not been mentioned on the list.
>
> FYI: Below I'm talking about non persistent images since persistent images
> do not get cloned but symlinked.
>
> If you have a shared storage cloud, the tm_clone script can easily be
> improved. before the fix on our cloud, it took about 12 minutes to launch
> ten virtual machines with 50GB Images.
>
> After the change, it takes 4 minutes which is quite a nice improvement.
> (It now takes about 10 minutes to launch 5TB worth of VM images. :) )
>
> The standard script /usr/lib/one/tm_commands/**shared/tm_clone.sh will
> execute the following:
>
> (line 61):
> ssh_exec_and_log $DST_HOST \
>   "cd $DST_DIR; cp -r $SRC_PATH $DST_PATH" \
>    "Error copying $SRC to $DST"
>
> (We're running 3,2,1 and the "cd $DST_DIR;" is new in 3.4. Not sure what
> it is supposed to do but it should not make a difference.)
>
> The problem with the existing script is that the "cp -r $SRC_PATH
> $DST_PATH" part is actually reading the whole image from the fileserver to
> the opennebula server and then writes it back to a different directory on
> the same fileserver.
>
> The result is a very busy opennebula server which becomes unresponsive and
> a under-used (NFS) fileserver.
>
> When you make sure that the oneadmin user can ssh to the fileserver, and
> that on the fileserver you put a symbolic link that points /var/lib/one to
> the exported oneadmin home dir, you can simply change the cp line to
>
> "ssh $<your_fileserver_here> cp -r $SRC_PATH $DST_PATH"
>
> This will make oneadmin ssh to the fileserver and do the copy locally on
> the fileserver.
>
> This puts the load on the fileserver (where it belongs) and makes the
> operation very light on the opennebula server which stays responsive.
>
> Since most shared storage boxes like ours are geared towards fast IO, this
> gives a very nice deployment speed increase.
>
> Because the fileserver hostname or ip address needs to be put in the
> script, it is difficult to make a patch; this info would need to be added
> to a config file somewhere. I leave that up to a volunteer. :)
>
> Hoping this is useful to somebody,
>
> Jhon
>
> --
> Jhon Masschelein
> Senior Systeemprogrammeur
> SARA - HPCV
>
> Science Park 140
> 1098 XG Amsterdam
> T +31 (0)20 592 8099
> F +31 (0)20 668 3167
> M +31 (0)6 4748 9328
> E jhon.masschelein at sara.nl
> http://www.sara.nl
> ______________________________**_________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>



-- 
Jaime Melis
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120419/f66f9def/attachment-0003.htm>


More information about the Users mailing list