[nova][resize/migrate][performance] the whole virtual size of vm's disk is being copied instead of the actual size.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Pádraig Brady |
Bug Description
Description of problem:
When resizing/migrating an instance with qcow2 image:
1) nova is converting the image to raw (in order to unite it with the backing file )
2012-07-16 14:06:41 DEBUG nova.utils [req-58761caf-
img convert -f qcow2 -O raw /var/lib/
ython2.
2012-07-16 14:07:00 DEBUG nova.utils [req-58761caf-
var/lib/
va/utils.py:220
~20 seconds
2) scp copies the converted image to destination host
qemu-img info:
# qemu-img info david.disk
image: david.disk
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 947M
result: 10G of data is being copied instead of 947M.
# scp david.disk root@camel-
04:09 minutes
3) afterwards in order to be able to create snapshots on this image its being converted again to qcow2 on destenation host
2012-07-16 14:10:39 DEBUG nova.utils [req-58761caf-
2012-07-16 14:13:12 DEBUG nova.utils [req-58761caf-
~02:33 minutes
Tested alternative:
1) convert the image from qcow2 to qcow2 (in order to unite it with the backing file )
2) rsync --sparce the file to the destination
# qemu-img info david.qcow.disk
image: david.qcow.disk
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 953M
cluster_size: 65536
# time rsync -S -v david.qcow.disk root@camel-
david.qcow.disk
sent 999218356 bytes received 31 bytes 39185034.78 bytes/sec
total size is 999096320 speedup is 1.00
real 0m24.797s
user 0m20.237s
sys 0m4.998s
Expected results:
in this case 24 seconds instead of 4:09 minutes.
conversion avoided after copy. (less 02:33 minutes)
description: | updated |
description: | updated |
summary: |
- [nova][resize/migrate][performance] the hole virtual size of vm's disk + [nova][resize/migrate][performance] the whole virtual size of vm's disk is being copied instead of the actual size. |
Changed in nova: | |
assignee: | nobody → Pádraig Brady (p-draigbrady) |
milestone: | none → folsom-3 |
status: | New → In Progress |
Changed in nova: | |
milestone: | folsom-3 → folsom-rc1 |
Oops this bug was logged after the code was added /github. com/openstack/ nova/commit/ 3a3ad54
https:/