neutron/neutron/db
Thomas Morin a858ca7d8f l3_ha_mode: call bulk _populate_mtu_and_subnets_for_ports
Based on the observation that a call to sync_routers can be very
slow (minutes) on some setup, and that profiling data show that
a significant amount of time is spent in many individual calls
of _process_sync_ha_data to _populate_mtu_and_subnets_for_ports for
a single interface, this change refactors _process_sync_ha_data to
call _populate_mtu_and_subnets_for_ports only once on a list of
interfaces instead of <n> times.

Said otherwise:
- before: O(#routers) SQL queries
          (one per network of an HA interface of a router)
- after : O(1) SQL queries
          (on the set of networks with an HA interface on a router)

A basic test shows a drastic improvements, from minutes to around
one second, in the processing of a sync_routers call with 256 routers.

Change-Id: I3a00c8fbb245ab3b6d93bdaa97f3435570992791
Related-Bug: 1692971
2017-06-02 22:40:06 +00:00
..
allowed_address_pairs Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
availability_zone use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
extra_dhcp_opt Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
metering Metering to OVO 2017-04-26 11:44:58 -07:00
migration Add "default" behaviour to QoS policies 2017-05-26 23:31:36 +00:00
models Port data plane status extension implementation 2017-04-11 19:56:13 +00:00
network_dhcp_agent_binding Relocate Agent DB model 2016-10-07 14:18:19 -04:00
port_security Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
qos Add relationship between QosPolicyDefault and QosPolicy 2017-06-01 03:40:57 +00:00
quota Merge "Quota list API returns project_id" 2017-04-17 23:35:18 +00:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_model_query.py Refactor CommonDbMixin for removal 2017-04-25 14:13:30 -04:00
_resource_extend.py Refactor CommonDbMixin for removal 2017-04-25 14:13:30 -04:00
_utils.py Move _get_marker_obj() out of CommonDbMixin. 2017-05-02 16:47:42 +00:00
address_scope_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
agents_db.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
agentschedulers_db.py Spin off context module 2017-03-06 16:25:29 +00:00
allowedaddresspairs_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
api.py Don't load rels on detached objects 2017-04-18 02:06:41 +00:00
common_db_mixin.py Move _get_marker_obj() out of CommonDbMixin. 2017-05-02 16:47:42 +00:00
data_plane_status_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
db_base_plugin_common.py Move _get_marker_obj() out of CommonDbMixin. 2017-05-02 16:47:42 +00:00
db_base_plugin_v2.py Merge "Eliminate SUBNET_GATEWAY resource" 2017-05-18 18:31:12 +00:00
dns_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
dvr_mac_db.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
external_net_db.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
extradhcpopt_db.py use extra_dhcp_opt api-def from neutron-lib 2017-05-31 15:06:35 +00:00
extraroute_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
flavors_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
ipam_backend_mixin.py use is_port_trusted from neutron-lib 2017-05-24 09:02:39 -06:00
ipam_pluggable_backend.py Update auto-addresses on MAC change 2017-04-26 11:31:20 +01:00
l3_agentschedulers_db.py [OVO] Integration of RouterL3AgentBinding 2017-05-26 13:17:58 -07:00
l3_attrs_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
l3_db.py Merge "[OVO] Integration of RouterL3AgentBinding" 2017-05-27 05:04:19 +00:00
l3_dvr_db.py Merge "[OVO] Integration of RouterL3AgentBinding" 2017-05-27 05:04:19 +00:00
l3_dvr_ha_scheduler_db.py Remove unused LOG 2016-07-05 15:22:13 +08:00
l3_dvrscheduler_db.py Merge "[OVO] Integration of RouterL3AgentBinding" 2017-05-27 05:04:19 +00:00
l3_gwmode_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
l3_hamode_db.py l3_ha_mode: call bulk _populate_mtu_and_subnets_for_ports 2017-06-02 22:40:06 +00:00
l3_hascheduler_db.py Merge "[OVO] Integration of RouterL3AgentBinding" 2017-05-27 05:04:19 +00:00
models_v2.py Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
network_ip_availability_db.py New enginefacade for networks, subnets. 2017-03-30 01:26:45 -07:00
portbindings_base.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
portbindings_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
portsecurity_db.py Merge "use is_port_trusted from neutron-lib" 2017-05-24 21:26:16 +00:00
portsecurity_db_common.py use neutron-lib port security api-def 2017-05-01 11:45:42 -06:00
provisioning_blocks.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
quota_db.py Create packages for quota modules 2015-07-28 11:55:01 -07:00
rbac_db_mixin.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
rbac_db_models.py Use DB field sizes instead of _MAX_LEN constants 2016-12-23 13:48:57 +00:00
securitygroups_db.py use is_port_trusted from neutron-lib 2017-05-24 09:02:39 -06:00
securitygroups_rpc_base.py Fix security group rules created for dhcpv6 2017-05-26 12:33:26 +00:00
segments_db.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
servicetype_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
sqlalchemytypes.py For typo in sqlalchemytypes 2017-02-13 16:18:46 +00:00
standard_attr.py Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
standardattrdescription_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
subnet_service_type_db_models.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
tag_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
vlantransparent_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00