Rework lb flow logic in order to visit first each load_balancer and then related datapath during lb flow installation. This patch allows to reduce memory footprint and cpu utilization in ovn-northd.
Testing environment: ovn-nbctl lr-list |wc -l 308 ovn-nbctl ls-list |wc -l 615 ovn-nbctl lb-list |wc -l 14524 Time needed for build_lrouter_lb_flows() to run for all datapaths/lbs (logical routers) Total samples: 22 Maximum: 6937 msec Minimum: 6869 msec 95th percentile: 6933.000000 msec Short term average: 6916.599206 msec Long term average: 6914.809656 msec Time needed for build_pre_lb()/build_stateful()[lb-only] to run for all datapaths/lbs (logical switches) Total samples: 20 Maximum: 1735 msec Minimum: 1693 msec 95th percentile: 1735.000000 msec Short term average: 1731.136610 msec Long term average: 1698.853040 msec Time needed for build_lrouter_flows_for_lb() to run for all lbs/datapaths (logical routers) Total samples: 22 Maximum: 2745 msec Minimum: 2674 msec 95th percentile: 2742.000000 msec Short term average: 2724.775973 msec Long term average: 2681.334522 msec Time needed for build_lswitch_flows_for_lb() to run for all lbs/datapaths (logical switches) Total samples: 20 Maximum: 406 msec Minimum: 354 msec 95th percentile: 406.000000 msec Short term average: 383.915676 msec Long term average: 363.318006 mse This series does not introduce any new feature to ovn-northd. Changes since v1: - rebase ontop of ovn-master - add build_lswitch_flows_for_lb routine Lorenzo Bianconi (9): northd: move snat_type out of vip loop lib: link logical routers assigned for the same lb northd: move build_empty_lb_event_flow in build_lrouter_flows_for_lb northd: move lb_{skip,force}_snat code in build_lrouter_snat_flows_for_lb northd: get rid of add_router_lb_flow northd: remove dead code in build_lrouter_nat_defrag_and_lb lb: link logical switches assigned for the same lb northd: move build_empty_lb_event_flow in build_lswitch_flows_for_lb northd: move build_lb_rules in build_lswitch_flows_for_lb lib/lb.c | 22 ++ lib/lb.h | 12 + northd/ovn-northd.c | 606 +++++++++++++++++++++++++++----------------- 3 files changed, 403 insertions(+), 237 deletions(-) -- 2.31.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev