[ovs-git] [openvswitch/ovs] f95f14: ofproto: Make ofproto_port_open_type() faster.

GitHub noreply at github.com
Mon Jun 11 22:40:39 UTC 2018


  Branch: refs/heads/branch-2.9
  Home:   https://github.com/openvswitch/ovs
  Commit: f95f1429a23a891940cb4395850acc1ae7f20a7f
      https://github.com/openvswitch/ovs/commit/f95f1429a23a891940cb4395850acc1ae7f20a7f
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-06-11 (Mon, 11 Jun 2018)

  Changed paths:
    M ofproto/in-band.c
    M ofproto/ofproto.c
    M ofproto/ofproto.h
    M vswitchd/bridge.c

  Log Message:
  -----------
  ofproto: Make ofproto_port_open_type() faster.

ofproto_port_open_type() was surprisingly slow because it called the
function ofproto_class_find__(), which itself was surprisingly slow because
it actually creates a set of strings and enumerates all of the available
classes.

This patch improves performance by eliminating the call to
ofproto_class_find__() from ofproto_port_open_type().  In turn that
required changing a parameter type and updating all the callers.

Possibly it would be worth making ofproto_class_find__() itself faster,
but it doesn't look like any of its other callers would be used in inner
loops.

For more background, see also
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046140.html

This patch arises as a result of testing done by Ali Ginwala and Han Zhou.
Their test showed that commit 2d4beba resulted in slower performance of
ovs-vswitchd than was seen in previous versions of OVS.

With this patch, Ali retested and reported that performance drastically
improved by ~60%. The test for 10k lports, 40 LSs and 8 LRs and 1k HVs just
got completed in 3 hours 39 min vs 8+ hours for branch-2.9. Cpu utilization
graph of a farm comparing Ben's ofproto patch vs branch-2.9 is available @
https://raw.githubusercontent.com/noah8713/ovn-scale-test/scale_results/results/ovs_2.9_vs_ben_ofproto.png

Reported-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Mark Michelson <mmichels at redhat.com>
Tested-by: aginwala <aginwala at asu.edu>
Signed-off-by: Ben Pfaff <blp at ovn.org>



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list