With dvr enabled , neutron remove-router-interface significantly degrades in response time as the number of l3_agents and the number of routers increases. A significant contributor to the poor performance is due to check_ports_exist_on_l3agent. The call to get_subnet_ids_on_router returns an empty list since the port has already been deleted by this point. The empty subnet list is then used as a filter to the subsequent call core_plugin.get_ports which unexpectedly returns all ports instead of an empty list of ports. Erroneously looping through the entire list of ports is the biggest contributor to the poor scalability.
Fix proposed to branch: master /review. openstack. org/154289
Review: https:/