forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
controller: Optimize adding 'dps' to the local datapaths.
Consider the below logical topology sw0-p1 - | sw0-p2 - -> sw0 -> lr0 ---- ... | | sw0-pn - | | sw1-p1 - | | | sw1p-2 - -> sw1 -> lr1 ---- --- public (provider switch) ... | | sw1-pn- | | swn-p1 - | | | swn-p2- -> swn -> lrn ---- ... | swn-pn - All the routers are connected to the provider switch via a ditributed gateway port. If sw0-p1 is resident on the chassis C1, then since there is a path to all the switches and the routers, ovn-controller will add all these datapaths to its 'local_datapaths' map. This in turn results in processing all the logical flows and installing all the openflows and in turn wasting the CPU time. This can be very costly in a highly scaled deployment. Previous commit sets a flag "only_dgp_peer_ports" in the SB Datapath binding for a provider switch (with only dgp peer ports). In this commit, ovn-controller makes use of this flag and stops adding other datapaths connected to the public provider switch to the 'local_datapaths'. For example, when it claims sw0-p1, it adds sw0, lr0 and public to the local_datapaths and stops there. If it later claims sw1-p1, it will add sw1 and lr1. This reduces the recompute time and the number of openflow rules added to ovs-vswitchd significantly. I tested this patch with a deployment of below logical resources: No of logical switches - 778 No of logical routers - 871 No of logical flows - 85626 No of 'ovn-sbctl dump-flows' - 208631 Without this patch, afte claiming sw0-p1, ovn-controller adds 269098 openflow rules and it takes approx 2500 milli seconds for a recompute. With this patch, after claiming sw0-p1, ovn-controller adds 21350 openflow rules and it takes approx 280 milli seconds for a recompute. There is approx 90% reduction in the openflow rules and 88% reduction in recompute time when a comoute node has VIFs from one logical switch. Signed-off-by: Numan Siddique <[email protected]>
- Loading branch information
1 parent
b0d6ff7
commit 893b2bc
Showing
10 changed files
with
1,339 additions
and
29 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
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
Oops, something went wrong.