Listing volumes has poor performance (due to glance metadata)

Bug #1349936 reported by Mathieu Gagné
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Mathieu Gagné
Icehouse
Fix Released
Undecided
Mathieu Gagné

Bug Description

Listing volumes with a non-admin user has poor performance.

This is caused by the query built to retrieve glance metadata associated to a volume which is sub-optimal: all rows of volume_glance_metadata table are returned.

Mathieu Gagné (mgagne)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Mathieu Gagné (mgagne)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/110357
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8f8a8a6ffe14cf7bb461dc26d178bf8acc8ddf12
Submitter: Jenkins
Branch: master

commit 8f8a8a6ffe14cf7bb461dc26d178bf8acc8ddf12
Author: Mathieu Gagné <email address hidden>
Date: Tue Jul 29 11:57:15 2014 -0400

    Fix glance metadata SQL query performance

    The query built to retrieve glance metadata associated to a volume
    was sub-optimal: all rows of volume_glance_metadata were returned.

    Fix it by properly joining the 2 tables with volume_id field.

    Closes-bug: #1349936
    Change-Id: Ic09414de769e71f8b8f99113838af48d8520e187

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/icehouse)

Reviewed: https://review.openstack.org/106238
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ce35e7a2558d5b62617616c3ec930c79213186d6
Submitter: Jenkins
Branch: stable/icehouse

commit ce35e7a2558d5b62617616c3ec930c79213186d6
Author: Mathieu Gagné <email address hidden>
Date: Thu Jul 3 15:30:05 2014 -0400

    volume_image_metadata missing from volume list

    The volume_image_metadata field was missing from the volume list
    because we tried to filter VolumeGlanceMetadata against a non-existent
    project_id field. Filtering should be done on the Volume associated
    to the VolumeGlanceMetadata instead.

    Move project_id filtering out of model_query as it assumes
    the project_id field is in the queried model itself.
    Build the filter ourselves against Volume.

    Fix glance metadata SQL query performance

    The query built to retrieve glance metadata associated to a volume
    was sub-optimal: all rows of volume_glance_metadata were returned.

    Fix it by properly joining the 2 tables with volume_id field.

    Closes-bug: #1337526
    Closes-bug: #1349936
    Change-Id: I6053708296f2b5e24513dc87ed63da0f67c220ae
    (cherry picked from commit 06dd7f28d1d3ec8619df0d25ddfe977d538897b3)
    (cherry picked from commit 8f8a8a6ffe14cf7bb461dc26d178bf8acc8ddf12)

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-3 → 2014.2
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.