Neutron need to reduce number of network db calls during get_devices_details_list

Bug #1370361 reported by zhu zhu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Sergey Belous

Bug Description

Currently each Neutron agent will impose db calls to Neutron Server to query devices, port and networks when it get start up.

Take ml2 rpc.py method get_device_details for example:
It can be noticed that during this call:

it will get each port and then get each network that port associated within get_bound_port_context. Actually in prodcution env. Most ports are belonging to a much less number of networks. Maybe even one compute host with 500VM with single network.

As the netwok information is static information and was used to construct the device json. It's suggested to initially having these network prefetched. instead of query it each time within each port. This will reduce the db calls a lot.

with less db calls, it will benefit neutron server performance and database hit when VM number in large.

Tags: loadimpact
zhu zhu (zhuzhubj)
tags: added: performance
summary: - Neutron need to reduce nubmer of network db calls during
+ Neutron need to reduce number of network db calls during
get_devices_details_list
tags: added: loadimpact
removed: performance
Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Eugene Nikanorov (enikanorov)
Sergey Belous (sbelous)
Changed in neutron:
assignee: Eugene Nikanorov (enikanorov) → Sergey Belous (sbelous)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/154116
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=65efa1bdb8c991c68803ba0ff928577a46bc8fcd
Submitter: Jenkins
Branch: master

commit 65efa1bdb8c991c68803ba0ff928577a46bc8fcd
Author: Sergey Belous <email address hidden>
Date: Mon Feb 9 19:38:05 2015 +0300

    Reduce db calls count in get_devices_details_list

    Each Neutron agent will impose db calls to Neutron Server
    to query devices, port and networks.
    Network caching is added to reduce the number
    of db calls on get_devices_details_list.
    Added unit tests for the check caching.

    Change-Id: I933dfe9b020b15b39bc932e62d599c5d654347e1
    Closes-Bug: #1370361

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
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.