diff options
| author | Pádraig Brady <pbrady@redhat.com> | 2012-01-31 23:46:42 +0000 |
|---|---|---|
| committer | Pádraig Brady <pbrady@redhat.com> | 2012-02-01 16:45:00 +0000 |
| commit | d20b48bd9662a31918631ad1de2e25a6084046c7 (patch) | |
| tree | 630a7854010bc195b36dcf9b1c1535d8d50cd915 /nova/openstack | |
| parent | b2cd9068af20257d1191f423a357261c7ffd68d6 (diff) | |
| download | nova-d20b48bd9662a31918631ad1de2e25a6084046c7.tar.gz nova-d20b48bd9662a31918631ad1de2e25a6084046c7.tar.xz nova-d20b48bd9662a31918631ad1de2e25a6084046c7.zip | |
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
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions
