]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Read vif port information in bulk
authorKevin Benton <blak111@gmail.com>
Fri, 29 May 2015 06:13:19 +0000 (23:13 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 30 Jun 2015 00:37:59 +0000 (17:37 -0700)
commit4dc68ea88bf4f07b13253bf9eeedffe22b1f8013
tree8cae954773973003291122d6143f2869b1bea255
parent49b64ca6bce3fef1e719a3ca7b66fd5b3452d54f
Read vif port information in bulk

During startup, the agent was making many calls per port
to read information about the current VLAN, external ID, etc.
This resulted in hundreds of calls just to read information about
a relatively small number of ports.

This patch addresses that by converting a few key functions to
lookup information for all of the ports at once.

Performance improvement on dev laptop for 250 ports from agent
start to port ACTIVE status:
   before: 1m21s
   after: 1m06s

Closes-Bug: #1460233
Change-Id: Ic80c85a07fee3e5651dc19819c6cebdc2048dda7
neutron/agent/common/ovs_lib.py
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/functional/agent/test_ovs_lib.py
neutron/tests/unit/agent/common/test_ovs_lib.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py