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
This commit is contained in:
Aaron Rosen
2013-05-12 14:53:18 -07:00
parent 1566cfd697
commit 6189cbe4f5
12 changed files with 286 additions and 73 deletions

View File

@@ -71,7 +71,7 @@ class PluginApi(proxy.RpcProxy):
'''
BASE_RPC_API_VERSION = '1.0'
BASE_RPC_API_VERSION = '1.1'
def __init__(self, topic):
super(PluginApi, self).__init__(