Cache calls to "qemu-img info"

Bug #1154162 reported by Michael Still
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

We keep calling this command over and over to find out how over committed disk is. However, the output that we care about (total size of the image, not total size on disk) is very unlikely to change. We could instead have a cache and then invalidate cache entries if we resized an image.

Michael Still (mikal)
Changed in nova:
milestone: none → havana-1
Michael Still (mikal)
summary: - Cache calls to "qemu-ing info"
+ Cache calls to "qemu-img info"
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/25809

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/25959

Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → havana-2
Michael Still (mikal)
Changed in nova:
milestone: havana-2 → havana-3
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → havana-rc1
Revision history for this message
Russell Bryant (russellb) wrote :

This seems to have been abandoned a while ago. Planning to pick it back up?

Changed in nova:
milestone: havana-rc1 → none
status: In Progress → Incomplete
Revision history for this message
Nikola Đipanov (ndipanov) wrote :

There seems to be another issue with this that will still result in an unneeded qemu-img info call:

libvirt driver's get_instance_disk_info calls qemu-img info twice:

if disk_type == "qcow2":
                backing_file = libvirt_utils.get_disk_backing_file(path) <--- one call
                virt_size = disk.get_disk_size(path) <---- second call
                over_commit_size = int(virt_size) - dk_size

We can cache the size and also avoid the second call entirely by simply refactoring these two utility functions.

Michael Still (mikal)
Changed in nova:
status: Incomplete → Triaged
assignee: Michael Still (mikalstill) → nobody
Thang Pham (thang-pham)
Changed in nova:
assignee: nobody → Thang Pham (thang-pham)
Revision history for this message
Thang Pham (thang-pham) wrote :

Based on the patch that Michael Still proposed last year, is memcache still the appropriate solution to caching "qemu-img info" calls? Or is everyone opposed to it?

Thang Pham (thang-pham)
Changed in nova:
assignee: Thang Pham (thang-pham) → nobody
Sean Dague (sdague)
Changed in nova:
status: Triaged → Confirmed
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Low → Undecided
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.