mbox series

[ovs-dev,v2,0/4] northd: Optimize preparation of load balancers.

Message ID 20220907202616.624528-1-i.maximets@ovn.org
Headers show
Series northd: Optimize preparation of load balancers. | expand

Message

Ilya Maximets Sept. 7, 2022, 8:26 p.m. UTC
Re-compute of 'northd' node in ovn-northd may take almost half of the
total processing time in case there is a big number of load balancers
applied to multiple switches/routers or if there are huge load balancer
groups applied to them.  The latter is a common case for ovn-kubernetes
clusters.

This patch set is a result of profiling ovn-northd in ovn-heater
density-heavy scenario with 500 fake nodes, which supposed to resemble
high scale ovn-kubernetes setups.

There are no functional changes, only mechanical optimizations that
allows to achieve exactly the same result by doing less work.

In total these patches allowed to speed up ovn-northd in the
aforementioned scenario by about 40%.  For exmaple, average northd
poll interval went down from 19.7 seconds to 10.2 seconds.  And the
maximum poll interval reduced from 31.7 to 14.9 seconds.

Version 2:
 - Moved LB-specific structures and function to lib/lb.[c,h].
 - 'ods' array in struct ovn_lb_group split in two: ls and lr.
 - Added missed handling of 'skip_snat' and 'event' options.
 - Minor re-base/re-factor.
 - Added 'Acked-by' from Dumitru to patches 1 and 4.

Ilya Maximets (4):
  northd: Optimize load balancer lookups for groups.
  northd: Add datapaths to load balancers in bulk.
  northd: Retrieve load balancer options only once.
  northd: Re-use IP sets created for load balancer groups.

 lib/lb.c           |  82 +++++++++++++--
 lib/lb.h           |  54 +++++++++-
 northd/en-northd.c |   2 +
 northd/northd.c    | 241 +++++++++++++++++++++++++++------------------
 northd/northd.h    |  16 ++-
 5 files changed, 277 insertions(+), 118 deletions(-)