On 11/26/26 2:19 AM, Howon Park via dev wrote: > patch_run() is called on every iteration of the ovn-controller main > loop. For every localnet and l2gateway port binding that is local to > the chassis, create_patch_port() is called twice, once for the > integration bridge and once for the physical bridge, and each call > walks all the ports of that bridge looking for a patch interface with > the expected peer. The cost of every iteration is therefore > O(number of localnet ports * number of bridge ports), even when no > patch port needs to be created. > > This becomes significant in deployments where every logical switch is > a VLAN network (one localnet port each) and most of them are local to > every chassis, e.g. because they are all connected through routers to > a shared external network. On a chassis with ~2500 such switches, > br-int has ~2800 ports and the physical bridge ~2500 ports; the > "patch-run" stopwatch reports ~900 ms per iteration and ovn-controller > uses ~70% of a CPU core while there are no configuration changes. > > Build, once per patch_run(), a map from the patch peer name to the > port for each bridge, and use it instead of the linear walk. The > behaviour is unchanged: if several ports have the same peer, the > first one in the bridge's port list is used, as before. > > Measured in a sandbox with the dummy datapath, with N logical switches > that each have a localnet port and a VIF bound to the chassis (so br-int > has 2*N ports and the physical bridge N ports), average "patch-run" time > per main loop iteration while bumping nb_cfg: > > N before after > ---- ------- ------- > 1000 80 ms 5 ms > 2500 610 ms 14 ms > > Signed-off-by: Howon Park <[email protected]> > Acked-by: Lucas Vargas Dias <[email protected]> > --- > v2: > - Use shash_add_once() (Lucas). > - Added Acked-by from v1 review. > v1: > https://patchwork.ozlabs.org/project/ovn/patch/[email protected]/ >
The failure [0] is a known issue in ovn-kubernetes and ovn-kube folks are working on a fix [1]. [0] https://github.com/ovn-ci/ovn-test/actions/runs/45735094701/job/139629569478#step:14:12028 [1] https://github.com/ovn-kubernetes/ovn-kubernetes/pull/7426 Retesting: Recheck-request: github-robot-_ovn-kubernetes _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
