Public bug reported: 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). ** Affects: neutron Importance: Undecided Status: New ** Description changed: 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 + 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 + 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 + 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 + 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). + 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). -- 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: New 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