[Performance] Bad performance on instances list panel

Bug #1721423 reported by Feilong Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Feilong Wang

Bug Description

I just found there is no cache for microversion check which may cause almost 40 unnecessary API calls.

There are two actions for instances table need to check the microversion in allowed() function, see
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/tables.py#L870

but unfortunately, there is no cache for this check, see https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/nova.py#L60

And function get_microversion(request, feature) is also used by other functions. Based on my test, after adding cache for this function, about 3+ seconds are saved.

Feilong Wang (flwang)
Changed in horizon:
assignee: nobody → Feilong Wang (flwang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Changed in horizon:
milestone: none → queens-1
importance: Undecided → Critical
tags: added: pike-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/509676
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=fa2e8327b9d0a10f29a4fbe3094a4533914b8ce3
Submitter: Jenkins
Branch: master

commit fa2e8327b9d0a10f29a4fbe3094a4533914b8ce3
Author: Feilong Wang <email address hidden>
Date: Thu Oct 5 14:37:34 2017 +1300

    Add cache for get_microversion() against Nova

    Actions "Lock" and "Unlock" of instance on instances table are calling
    api.nova.is_feature_available() to check if the feature is supported
    by current Nova server. Unfortunately, the function get_microversion()
    called by is_feature_available() is not cached, which is causing about
    40 unnecesary REST API calls. If the Nova's version is under Mitaka,
    it could be even worse, about 80 unnecesary API calls, see
    openstack_dashboard/api/nova.py#L60 and
    novaclient/v2/versions.py#L47 for more details.

    Closes-Bug: #1721423

    Change-Id: Ie96b1a35e379d4cf407bfd53b1ee734178f9cb07

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/509806

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/pike)

Reviewed: https://review.openstack.org/509806
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6d0fb73ee044f74de85673af4265576adf749e52
Submitter: Jenkins
Branch: stable/pike

commit 6d0fb73ee044f74de85673af4265576adf749e52
Author: Feilong Wang <email address hidden>
Date: Thu Oct 5 14:37:34 2017 +1300

    Add cache for get_microversion() against Nova

    Actions "Lock" and "Unlock" of instance on instances table are calling
    api.nova.is_feature_available() to check if the feature is supported
    by current Nova server. Unfortunately, the function get_microversion()
    called by is_feature_available() is not cached, which is causing about
    40 unnecesary REST API calls. If the Nova's version is under Mitaka,
    it could be even worse, about 80 unnecesary API calls, see
    openstack_dashboard/api/nova.py#L60 and
    novaclient/v2/versions.py#L47 for more details.

    Closes-Bug: #1721423

    Change-Id: Ie96b1a35e379d4cf407bfd53b1ee734178f9cb07
    (cherry picked from commit fa2e8327b9d0a10f29a4fbe3094a4533914b8ce3)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b1

This issue was fixed in the openstack/horizon 13.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.1

This issue was fixed in the openstack/horizon 12.0.1 release.

Akihiro Motoki (amotoki)
tags: removed: pike-backport-potential
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.