forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
northd: Fix recompute of referenced chassis in HA chassis groups.
Current implementation of 'ref_chassis' recompute is horribly slow. For each port binding it finds LR group, then it adds a chassis of the current port binding to each HA chassis group of this LR group. The number of ports is much greater than number of chassis. And the number of distinct LR groups is even smaller than a number of chassis in a typical setup. Chances are, the setup only has one LR group. So, northd today is trying to add the same chassis to the same HA chassis group over and over again. In an OpenStack setup with ~20 chassis, 40K ports and 5K routers we end up with 33+ million calls to add_to_ha_ref_chassis_info() that also performs a linear search for duplicates leading to about 270 million operations, while we only have 5K Sb HA chassis groups with 15 ref_chassis in each. I.e. only 5000 * 15 = 75.000 operations out of 270 million are actually useful. In practice that leads to 80 second recompute: inc_proc_eng|INFO|node: sync_from_sb, recompute (forced) took 80074ms Fix that by accumulating unique chassis per unique LR groups first and then updating ref_chassis with these unique values avoiding any unnecessary calls. Result is ~1000x performance improvement: inc_proc_eng|DBG|node: sync_from_sb, recompute (forced) took 75ms Considering this as a performance bug, because it makes OVN practically unusable in certain (default?) OpenStack configurations at scale. Fixes: b82d351 ("ovn: Add generic HA chassis group") Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2023-August/052614.html Reported-by: Roberto Bartzen Acosta <[email protected]> Acked-by: Mark Michelson <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
- Loading branch information
Showing
1 changed file
with
76 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters