[ovs-dev] [PATCHv3 0/7] Remove the flow_dumper thread.

Joe Stringer joestringer at nicira.com
Wed Feb 12 18:37:03 UTC 2014


Currently, we have a single thread (the 'flow_dumper') that fetches the flows
from the datapath and distributes them to revalidator threads. To clean up the
code and support more flows in the datapath, we are looking at removing this
flow_dumper thread, and have each revalidator fetch flows from the datapath
instead.

This patchset implements the functionality:
* Patches 1-5 modify the datapath interface to allow multiple threads to dump
  flows concurrently. These are the same patches as "Flow dump threadsafety"
  v2, rebased against master.
* Patches 6 and 7 remove the flow dumper.

Behaviour
---------

In most cases, there is an increase in the number of flows handled in the
datapath. There is a notable increase in the number of ukeys created and
stored. In testing with netperf TCP_CRR, the performance varies when compared
to master:
    1 handler, 1 revalidator: +0%
    2 handlers, 1 revalidator: -4% (avg_flows ~= flow_limit)
    3 handlers, 1 revalidator: -6% (avg_flows > flow_limit with this patch)
    2 handlers, 2 revalidators: +3%
    3 handlers, 2 revalidators: +2%
    4 handlers, 2 revalidators: +1%
    5 handlers, 2 revalidators: -1%
    10 handlers, 3 revalidators: +0%

The performance is still higher than when we maintained facets, and this
simplifies the code. Various other factors are yet to be investigated for the
performance implications (for example, changing the max idle time or randomly
dropping flows from the datapath before we hit the limit). As such, I'd like to
push towards merging this code, and we can continue to optimise as we go.

Availability
------------

This patchset (in particular, Patch 7) is based against the stats duplication
series that I posted yesterday. To aid review, I have pushed the series and its
dependencies to github:

git://github.com/joestringer/openvswitch.git submit/threaded_flow_dump_v3

Ethan Jackson (1):
  ofproto-dpif: Remove the flow_dumper thread.

Joe Stringer (6):
  netlink: Remove buffer from 'struct nl_dump'.
  netlink: Make nl_dump_next() thread-safe.
  dpif: Separate local and shared flow dump state.
  dpif: Make dpif_flow_dump_next() thread-safe.
  dpif: Don't synchronize flow_dump_next() status.
  dpif: New function flow_dump_next_may_destroy_keys().

 lib/dpif-linux.c              |  102 ++++++--
 lib/dpif-netdev.c             |   78 ++++--
 lib/dpif-provider.h           |   61 +++--
 lib/dpif.c                    |  121 ++++++----
 lib/dpif.h                    |   29 ++-
 lib/netdev-linux.c            |   42 ++--
 lib/netlink-socket.c          |  148 +++++++-----
 lib/netlink-socket.h          |   21 +-
 lib/route-table.c             |   14 +-
 ofproto/ofproto-dpif-upcall.c |  524 ++++++++++++++++++-----------------------
 ofproto/ofproto-dpif.c        |   18 +-
 utilities/ovs-dpctl.c         |   31 ++-
 12 files changed, 679 insertions(+), 510 deletions(-)

-- 
1.7.9.5




More information about the dev mailing list