-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize libvirt raw image handling. Bug 924970
Tests were seen to time-out on libvirt when raw images were used, which was due to large disk images being copied around inefficiently. A system with standard disks was seen to take an extra 60s/10G which was a problem with large root and ephemeral disks. The changes below attempt to minimize the I/O in dealing with cached raw images. These changes should also help to minimize the disk space used for such images, by avoiding the naïve copy which undoes the sparseness. * nova/virt/libvirt/connection.py (_cache_image): Do the resize here, rather than in _fetch_image(), so that we can control when the resizing is done, to minimize the amount of data that needs to be copied. Also if we're generating rather than fetching the image, then just generate in the instance dir too, as this should be faster. * nova/tests/fake_libvirt_utils.py: Remove the resize functionality since it's no longer used. * nova/tests/test_libvirt.py: Likewise. * nova/virt/libvirt/utils.py (fetch_image): Likewise. (copy_image): Shell out to cp since it deals better with sparse files. Note the above changes avoid sparse copies, so this is just an ancillary improvement in the area. Change-Id: I678d125c61aab56c62c668559eb2220d56702952
- Loading branch information
Pádraig Brady
committed
Feb 1, 2012
1 parent
b2cd906
commit d20b48b
Showing
4 changed files
with
51 additions
and
25 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