I have been trying to figure out why cloning a VM and creating a template from ovirt is so
slow. I am using ovirt 4.3.10 over NFS. My NFS server is running NFS 4 over RAID10 with
SSD disks over a 10G network and 9000 MTU
Therocially I should be writing a 50GB file in around 1m30s
a direct copy from the SPM host server of an image to another image on the same host takes
6m34s
a cloning from ovirt takes around 29m
So quite a big difference. Therefore I started investigating and found that ovirt launches
a qemu-img process with no source and target cache. Therefore thinking that could be the
issue, I change the cache mode to writeback and was able to run the exact command in
8m14s. Over 3 times faster. I haven't tried yet other parameters line -o
preallocation=metadata but was wondering why no cache was selected and how to change it to
use cache writeback
command launched by ovirt:
/usr/bin/qemu-img convert -p -t none -T none -f qcow2
/rhev/data-center/mnt/nas1.bfit:_home_VMS/8e6bea49-9c62-4e31-a3c9-0be09c2fcdbf/images/21f438fb-0c0e-4bdc-abb3-64a7e033cff6/c256a972-4328-4833-984d-fa8e62f76be8
-O qcow2 -o compat=1.1
/rhev/data-center/mnt/nas1.bfit:_home_VMS/8e6bea49-9c62-4e31-a3c9-0be09c2fcdbf/images/5a90515c-066d-43fb-9313-5c7742f68146/ed6dc60d-1d6f-48b6-aa6e-0e7fb1ad96b9