]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Improve DHCP agent performance
authorAaron Rosen <arosen@nicira.com>
Sun, 12 May 2013 21:53:18 +0000 (14:53 -0700)
committerAaron Rosen <arosen@nicira.com>
Wed, 10 Jul 2013 04:46:43 +0000 (21:46 -0700)
commit9d5c540b47b5c5611914f1765a196ad44f868751
treeefa14de279d0f40c98d0ce82e73a26103d479510
parentd80048eefc4c076c241d747ea63cb885382f04f0
Improve DHCP agent performance

Previously when starting the dhcp agent the sync_state() process would
be extremely expensive as it would query quantum server for each network.
In order to improve performance a get_active_networks_info() was added
so this information could be retrieved in one query rather than doing a
query for each active network.

The second part of this patch optimizes the logic to avoid calling
get_dhcp_port(). Previously, this method was called once for each network
which makes a call to get_subnets() and get_ports() unnecessarily as
the dhcp agent can determine itself if it needs to update a port or create a
port for dhcp.

This patch also threads the inital sync process and maintains backwards
compatibility with the previous rpc api.

There was also a trivial change to the nvp_plugin where filters are assumed to
be a dict.

implements blueprint improve-dhcp-agent-performance

Change-Id: I3b631057f595250dad76516faa9b421789f60953
12 files changed:
etc/dhcp_agent.ini
neutron/agent/dhcp_agent.py
neutron/agent/rpc.py
neutron/db/dhcp_rpc_base.py
neutron/plugins/bigswitch/plugin.py
neutron/plugins/brocade/NeutronPlugin.py
neutron/plugins/hyperv/rpc_callbacks.py
neutron/plugins/linuxbridge/lb_neutron_plugin.py
neutron/plugins/ml2/rpc.py
neutron/plugins/nec/nec_plugin.py
neutron/plugins/nicira/NeutronPlugin.py
neutron/tests/unit/test_dhcp_agent.py