Created attachment 1852238 [details] Scale test NB database. Description of problem: In ovn-northd, the build_ovn_lbs() function does a few things a. builds the map of load balancers, parsing the contents of the NB.Load_Balancer table b. associates the resulting load balancers to all datapaths corresponding to the logical switches that refer to the NB.Load_Balancer (either directly or via the NB.Load_Balancer_Group) table. c. reconciles the SB.Load_Balancer table. For example, with the attached NB database (from a scale test run), build_ovn_lbs() takes ~650msec on the test machine, each and every time northd runs to process a change in the NB/SB. We could try to extract this functionality in a separate I-P node with the following inputs: - NB.Load_Balancer - NB.Load_Balancer_Group - SB.Load_Balancer - Datapaths (depending on bug 2043116) This node's data could serve as input to a flow-generation node, and would be used to generate all switch load balancer related logical flows.
> > We could try to extract this functionality in a separate I-P node with the > following inputs: > - NB.Load_Balancer > - NB.Load_Balancer_Group > - SB.Load_Balancer > - Datapaths (depending on bug 2043116) > > This node's data could serve as input to a flow-generation node, and would > be used to generate all switch load balancer related logical flows. On second thought, we probably need to split this in two different I-P nodes: - one that computes ovn_northd_lb objects in general (new/updated/deleted) - another one (that has as inputs: Datapaths, SB.Load_Balancer, NB.Load_Balancer_Group) and computes set of load balancers attached to each switch Datapath.
I think separating this into two nodes is a good idea, since there is the possibility that the output of both nodes could be useful separately. Since there is a separate BZ for router-related LB changes (2043128), would it make sense to divide this BZ in two? This way, the first node that computes sets of general ovn_northd_lb can be done first, and then the switch- and router-related LB tasks could be done in parallel.
I'm closing this since northd load balancer I-P is being tracked in a different issue (and will be merged into OVN soon).