Heal instance info cache causes high extra DB queries

Bug #1223969 reported by Brian Elliott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Brian Elliott

Bug Description

_heal_instance_info_cache currently does not load system_metadata. As a result, the calls into _get_instance_nw_info end up lazy loading the data via obj_load_attr() when checking for the presence of system metadata.

Tags: db
Brian Elliott (belliott)
Changed in nova:
assignee: nobody → Brian Elliott (belliott)
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/46095

Changed in nova:
status: New → In Progress
tags: added: db
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/46095
Committed: http://github.com/openstack/nova/commit/e0931d718393e1bc2dd6164c1b08daccd5a12644
Submitter: Jenkins
Branch: master

commit e0931d718393e1bc2dd6164c1b08daccd5a12644
Author: Brian Elliott <email address hidden>
Date: Mon Sep 9 22:43:46 2013 +0000

    Reduce DB load caused by heal instance info cache

    Load system metadata with instance fetches in the
    _heal_instance_info_cache periodic task. This will eliminate
    DB queries to lazy load the system metadata in _get_instance_nw_info.

    (lazy loading happens in the Instance object's obj_load_attr method)

    bug 1223969

    Change-Id: I835fc73ef3a92885cec174e1533db10e28752fe1

Changed in nova:
status: In Progress → Fix Committed
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/47615

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/47615
Committed: http://github.com/openstack/nova/commit/ce385ca3912d92fe446a46682080d6b342b8d91b
Submitter: Jenkins
Branch: master

commit ce385ca3912d92fe446a46682080d6b342b8d91b
Author: Chris Behrens <email address hidden>
Date: Fri Sep 20 18:23:48 2013 +0000

    Actually fix info_cache healing lazy load

    system_metadata is still being lazy loaded as a part of healing the
    instance info_cache. A previous attempt to fix this issue missed the
    more important call.

    It's actually more efficient to not load the system_metadata when getting
    the list and allow the 1 instance to lazy load. For the cached instances,
    we will ask for system_metadata when getting a fresh copy from the DB.

    Fixes bug 1223969

    Change-Id: Ib95e868135ed2b36af7ddbcfb8d5905bfe14d1fe

Changed in nova:
milestone: none → havana-rc1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-rc1 → 2013.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.