Net-list is very slow under metaplugin

Bug #1267290 reported by Itsuro Oda
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Itsuro Oda

Bug Description

If there are many networks when using metaplugin, net-list (GET networks API)
takes very long time.
For example: (showing hardware spec etc. is omitted since it is relative comparison.)

--- 200 networks, openvswitch plugin used natively
$ time neutron net-list
...snip
real 0m2.007s
user 0m0.428s
sys 0m0.100s
---

--- 200 openvswitch networks, under metaplugin
$ time neutron net-list
...snip
real 0m7.700s
user 0m0.472s
sys 0m0.072s
---
Note that the quantum-server wastes a lot of cpu usage too.

Tags: metaplugin
Revision history for this message
Itsuro Oda (oda-g) wrote :

Investigation:
The reason of this problem is that the metaplgin calls plugin.get_network()
for each network in the metaplugin's get_networks().
(i.e. if there are 200 networks, get_network() is called 200 times.)

Proposed fix:
Change to call target plugin's get_networks for each taget plugin.
I think it is available to use hook routines.

Changed in neutron:
assignee: nobody → Itsuro Oda (oda-g)
description: updated
Revision history for this message
yong sheng gong (gongysh) wrote :

It is interesting to know whether there are still people using this plugin when we have ml2.

Revision history for this message
Itsuro Oda (oda-g) wrote :

There is still people using metaplugin and note that a third party testing for metaplugin is going to prepare.
(see. https://wiki.openstack.org/wiki/Neutron_Plugins_and_Drivers )

Typical use case of metaplugin is that an OSS plugin (ex. linuxbridge or ml2(with linuxbridge mechanism driver)) and a commercial plugin which does not apply ml2 mechanism (ex. NVP ) are used at the same time.

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/70060

Changed in neutron:
status: New → In Progress
Revision history for this message
Itsuro Oda (oda-g) wrote :

Note: performance after the fix;
--- 200 openvswitch networks, under metaplugin
$ time neutron net-list
...snip
real 0m2.232s
user 0m0.416s
sys 0m0.124s
---

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

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

commit a1e1b0a6251c9b0838f871591316c41f37b4b3e0
Author: Itsuro Oda <email address hidden>
Date: Tue Dec 24 12:27:53 2013 +0900

    Enhance GET networks performance of metaplugin

    Change to call plugin.get_networks() per target plugin
    instead of calling plugin.get_network() per network.
    Hook routines are used to select networks which belong
    the target plugin.

    Change-Id: Ieff06ac7bc7a150501f91aecc3197b0bb664d5fa
    Closes-Bug: #1267290

Changed in neutron:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
tags: added: metaplugin
Changed in neutron:
milestone: none → icehouse-rc1
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc1 → 2014.1
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.