Reviewed: https://review.opendev.org/728507 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7f40e626d6de5ec895343453b032b747c02e59f5 Submitter: Zuul Branch: master
commit 7f40e626d6de5ec895343453b032b747c02e59f5 Author: Rodolfo Alonso Hernandez <ralon...@redhat.com> Date: Fri May 15 13:26:15 2020 +0000 Delete segment RPs when network is deleted When a network is deleted, only one Placement call per segment is done to remove the associated (if existing) resource provider. Before this patch, each time a subnet was deleted, the segment resource provider was updated. When no subnets were present in the related segment, the associated resource provider was deleted. This optimization improves the network deletion time (see Launchpad bug). E.g.: a network with two segments and ten subnets, the Neutron server processing time dropped from 8.2 seconds to 4.4 seconds (note that the poor performance was due to the modest testing environment). Along with the segment RP optimization during the network deletion, this patch also skips the router subnet update. Because all subnets in the network are going to be deleted, there is no need to update them during the network deletion process. Change-Id: Ifd50027911a9ca3508e80e0de9a6cc45b67006cf Closes-Bug: #1878916 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1878916 Title: When deleting a network, delete the segment RP only when the segment is deleted Status in neutron: Fix Released Bug description: When a network is deleted, those are some of the operations executed (in order): - First we check the network is not used. - Then the subnets are deleted. - The segments are deleted. - The network is deleted. For each network, the segment plugin updates the Placement resource provider of the segment. When no subnets are allocated in this segment, the segment RP is deleted. Having more than one subnet per segment, will lead to an unnecessary Placement API load. When the network is being deleted, instead of updating the segment RP, we can wait until the segment is deleted and then we can delete the RP. This will same some time in the Neutron server call "network delete" and will reduce the load in the Placement server. As an example, some figures. With a network created, I've created another segment and 10 subnets in this new segment. CLI time (s)..Neutron API time (s) Code as is now 9.71..........8.23 9.63..........8.19 9.62..........8.11 Skipping the subnet RP update 7.42..........5.96 7.49..........6.05 Skipping the subnet route update (host_routes_after_delete) too 5.49..........4.05 5.74..........4.26 Now adding the segment RP deletion when the segment is deleted 5.99..........4.46 5.79..........4.31 During a network deletion, we can save time and Placement calls just deleting the segment RP only when the segment is already deleted (AFTER_DELETE event). To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1878916/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp