Wasn't this addressed in the ON 3.4? You should look into the qcow2 driver in 3.4. If you think its fast now wait till you try the qcow2 backing store driver.. :)<br><br><div class="gmail_quote">On Wed, Apr 18, 2012 at 3:38 AM, Jhon Masschelein <span dir="ltr"><<a href="mailto:jhon.masschelein@sara.nl">jhon.masschelein@sara.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
In case this has not been mentioned on the list.<br>
<br>
FYI: Below I'm talking about non persistent images since persistent images do not get cloned but symlinked.<br>
<br>
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.<br>
<br>
After the change, it takes 4 minutes which is quite a nice improvement.<br>
(It now takes about 10 minutes to launch 5TB worth of VM images. :) )<br>
<br>
The standard script /usr/lib/one/tm_commands/<u></u>shared/tm_clone.sh will execute the following:<br>
<br>
(line 61):<br>
ssh_exec_and_log $DST_HOST \<br>
   "cd $DST_DIR; cp -r $SRC_PATH $DST_PATH" \<br>
    "Error copying $SRC to $DST"<br>
<br>
(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.)<br>
<br>
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.<br>

<br>
The result is a very busy opennebula server which becomes unresponsive and a under-used (NFS) fileserver.<br>
<br>
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<br>

<br>
"ssh $<your_fileserver_here> cp -r $SRC_PATH $DST_PATH"<br>
<br>
This will make oneadmin ssh to the fileserver and do the copy locally on the fileserver.<br>
<br>
This puts the load on the fileserver (where it belongs) and makes the operation very light on the opennebula server which stays responsive.<br>
<br>
Since most shared storage boxes like ours are geared towards fast IO, this gives a very nice deployment speed increase.<br>
<br>
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. :)<br>
<br>
Hoping this is useful to somebody,<br>
<br>
Jhon<br>
<br>
-- <br>
Jhon Masschelein<br>
Senior Systeemprogrammeur<br>
SARA - HPCV<br>
<br>
Science Park 140<br>
1098 XG Amsterdam<br>
T <a href="tel:%2B31%20%280%2920%20592%208099" value="+31205928099" target="_blank">+31 (0)20 592 8099</a><br>
F <a href="tel:%2B31%20%280%2920%20668%203167" value="+31206683167" target="_blank">+31 (0)20 668 3167</a><br>
M <a href="tel:%2B31%20%280%296%204748%209328" value="+31647489328" target="_blank">+31 (0)6 4748 9328</a><br>
E <a href="mailto:jhon.masschelein@sara.nl" target="_blank">jhon.masschelein@sara.nl</a><br>
<a href="http://www.sara.nl" target="_blank">http://www.sara.nl</a><br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/<u></u>listinfo.cgi/users-opennebula.<u></u>org</a><br>
</blockquote></div><br>