[Performance] Useless network API calls on instance panel

Bug #1722417 reported by Feilong Wang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

The function calling at https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/views.py#L95 is useless because Horizon is using the detailed API to get server list, see https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/nova.py#L529
With detailed API, the addresses of server are returned. So there is no need to call Neutron API to get the addresses info.

Tags: performance
Feilong Wang (flwang)
Changed in horizon:
assignee: nobody → Feilong Wang (flwang)
Feilong Wang (flwang)
summary: - [Performance] Unless network API calls on instance panel
+ [Performance] Useless network API calls on instance panel
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/510718

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Feilong Wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/510718

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Changing status to Opinion since there is some debate about whether this can be safely removed. If the consensus on the horizon team is that this should indeed be pursued, feel free to change the status back to New.

tags: added: performance
Changed in horizon:
status: In Progress → Opinion
Revision history for this message
Akihiro Motoki (amotoki) wrote :

I think it is worth sharing my comment on the review which describes the background of the call.
---
Floating IP association/disassociation is not synced asynchronously, so when a user associate FIP to an instance, FIP is not shown in the instance table soon and the user needs to reload the instance table to check the associated FIP. This still happens. This is the reason that server_update_addresses are still used.
You are trying to improving performance, but if users reload the instance table this change introduces another pattern of performance problem.
This leads to some regression to users of small deployments, so I am against just dropping this. Do you want to make this configurable?
---

On the other hand, what we would like to do is to retrieve FIP information. There might be a room to improve the logic.

Revision history for this message
Mateusz Kowalski (makowals) wrote :

+1 for having this configurable. In my case (huge deployment, no floating ips for end users) we have a local patch for disabling this call. Using conf would be much more elegant

Changed in horizon:
assignee: Feilong Wang (flwang) → Akihiro Motoki (amotoki)
status: Opinion → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
milestone: none → queens-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/510718
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a42f58de50c84235f649d957ac925780d365e3db
Submitter: Zuul
Branch: master

commit a42f58de50c84235f649d957ac925780d365e3db
Author: Feilong Wang <email address hidden>
Date: Tue Oct 10 14:30:03 2017 +1300

    Allow to skip API calls to Neutron in instance tables

    Now instance panel is sending API calls to Neutron to get the addresses
    info about network. It take some time until Nova network info cache is
    synced when IP address operation like floating IP association is made
    in Neutron. The API calls to Neutron exist from this reason.

    However, it retrieves a full list of port, so it can potentially leads
    to performance issues in large deployments. This commit adds a setting
    flag to control whether API calls to Neutron is used or skipped in
    the project instance table.

    This commits drops a call of servers_update_addresses() in the admin
    instance table. In the admin instance table there is no need to retrieve
    IP addresses from neutron because the main purpose of the admin panel is
    to see all instances and IP addresses in nova network info cache will be
    synced soon.

    Closes-Bug: #1722417
    Co-Authored-By: Akihiro Motoki <email address hidden>
    Change-Id: Ie16784eb6352f70ab644dc8b6ea03fc6a881d3f9

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b3

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

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.