Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve efficiency of image transfer during migration
This reduces time to transfer a qcow2 image with a virtual size of 10G, over GigE, from about 7 minutes to about 30 seconds. There are multiple inefficiencies in the existing process. Taking an example of a qcow2 image with 10G virtual size, the process was: qcow2 -> raw -> read -> send -> write -> qcow2 qcow2 to raw takes 20s, transfer of the resultant 10G is another 4m9s, and conversion back to qcow takes 2m33s. I.E. a total of about 7 minutes. So instead we try to avoid the initial qcow2 to raw conversion completely, which results in the whole process completing in about 30s, in the common case where no conversion to raw is done on the destination. We also optimize the case where the source qcow2 image doesn't have a backing file, and then directly copy the source image without merging a backing file. Note this will also improve the situation when resizing/migrating within the same host as needles conversions are avoided in that case too. We also optimize the case where raw images are being used by trying to use `rsync -Sz` rather than `scp`. That compresses runs of zeros and create sparse destination files. Testing a 10G raw image showed a saving of 30s in transfer time. Also the network was greatly reduced (corresponding to holes in the source), as was space usage at the destination. This gain is limited though by rsync inefficiently reading all the holes at the source: https://bugzilla.samba.org/show_bug.cgi?id=8918 Thanks to David Naori <dnaori@redhat.com> for testing and ideas. Change-Id: I9e87f912ef2717221c244241cda2f1027a4ca66a
- Loading branch information
Pádraig Brady
committed
Jul 18, 2012
1 parent
acb1587
commit 3a3ad54
Showing
4 changed files
with
88 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters