← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1484992] [NEW] Converting image from qcow2 to raw is slow for images with large virtual size

 

Public bug reported:

In this thread:

  http://lists.openstack.org/pipermail/openstack/2015-August/013614.html

[qote]
Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf qemu-img convert -O raw /var/lib/nova/instances/_base/999f7fff2521e4a7243c9e1d21599fd64a19b42e /dev/openstack-controller01-ky01-vg/5f831046-435c-4636-8b71-a662327b608c_disk

Well, I understand what this step is doing - it's copying raw image to
lvm.

How can we speed it up?
I don't wanna have instance from 100GB image booted for 4 hours
[/quote]

Regardless of how much data is in the source file, qemu-img has to write
out the full virtual size on the target block dev to ensure any pre-
existing data is overwritten. THis may involve writing 100's of GB of
zeros for large images.

qemu-img does has an optimization to let it use 'discard' as a fast
alternative to writing zeros, but this requires that qemu-img has disk
caching disabled , eg  -t none. We should investigate to see if this
improves performance for converting large images to block devices, and
if so, enable this flag.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: libvirt

** Tags added: libvirt

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1484992

Title:
  Converting image from qcow2 to raw is slow for images with large
  virtual size

Status in OpenStack Compute (nova):
  New

Bug description:
  In this thread:

  http://lists.openstack.org/pipermail/openstack/2015-August/013614.html

  [qote]
  Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf qemu-img convert -O raw /var/lib/nova/instances/_base/999f7fff2521e4a7243c9e1d21599fd64a19b42e /dev/openstack-controller01-ky01-vg/5f831046-435c-4636-8b71-a662327b608c_disk

  Well, I understand what this step is doing - it's copying raw image to
  lvm.

  How can we speed it up?
  I don't wanna have instance from 100GB image booted for 4 hours
  [/quote]

  Regardless of how much data is in the source file, qemu-img has to
  write out the full virtual size on the target block dev to ensure any
  pre-existing data is overwritten. THis may involve writing 100's of GB
  of zeros for large images.

  qemu-img does has an optimization to let it use 'discard' as a fast
  alternative to writing zeros, but this requires that qemu-img has disk
  caching disabled , eg  -t none. We should investigate to see if this
  improves performance for converting large images to block devices, and
  if so, enable this flag.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1484992/+subscriptions


Follow ups