[ovs-dev] [PATCH 0/3] ovn-controller: Logical flow processing optimizations
dceara at redhat.com
Fri Aug 23 11:26:04 UTC 2019
On Fri, Aug 23, 2019 at 12:38 PM Dumitru Ceara <dceara at redhat.com> wrote:
> This series adds some (independent) optimizations that improve
> ovn-controller performance by lowering the number of operations that
> need to be executed during a iteration of the main controller loop.
> Each patch in the series addresses a bottleneck reported by running
> `perf record -g --call-graph dwarf -i /usr/bin/ovn-controller` on a
> system where the Southbound DB was already populated by ovn-northd.
> The logical configuration of the OVN is:
> - 500 logical routers
> - 1 logical switch attached to each router
> - 2 logical ports attached to each switch
> - 4 ACLs per switch
> To evaluate the performance impact of the change in a more realistic
> way the following test is performed (on a single node that runs ovn-northd
> and ovn-controller and emulates the VM hosts with OVS internal interfaces):
> 1. Start ovs-vswitchd.
> 2. Remove the Southbound DB such that ovn-northd needs to repopulate
> everything based on the Northbound DB contents.
> 3. Start a patched version of ovn-controller such that it tracks loop time
> execution information and how long it takes to process all logical flows
> from the Southbound DB.
> 4. At the same time with step 3 above, start ovn-northd which will populate
> the Southbound DB.
> The following measurements are taken:
> - real time (measured with `time`) to have all corresponding openflow flows
> processed by ovs-vswitchd.
> - maximum ovn-controller main loop iteration duration
> - average ovn-controller main loop iteration duration
> - number of times ovn-controller executes the main loop until all logical
> flows are processed
> Comparing the results before and after this series we see:
> - 13% performance boost w.r.t. real time taken to have all openflow flows
> installed in ovs-vswitchd
> - 41% decrease of average ovn-controller loop iteration duration and
> 12% increase of ovn-controller number of loop iterations. Essentially
> processing loops are faster and can happen more often.
> - 2% decrease of maximum ovn-controller main loop iteration duration.
> Dumitru Ceara (3):
> ofctrl: Avoid recomputing match hash in ofctrl_dup_flow().
> ovn-controller: Optimize update of ct-zones external-ids.
> ovn-controller: Minimize SB DB port_binding lookups.
> controller/binding.c | 19 ++++++++++++---
> controller/ofctrl.c | 2 +-
> controller/ovn-controller.c | 53 +++++++++++++++++++++++++++++++++++++------
> controller/ovn-controller.h | 11 ++++++++-
> controller/physical.c | 4 ++-
> controller/pinctrl.c | 53 +++++++++++--------------------------------
> 6 files changed, 87 insertions(+), 55 deletions(-)
Sorry for the noise, please ignore this version. I resent the v2
series targeting the OVN repo instead:
More information about the dev