[ovs-dev] [PATCHv5 0/4] Tunnel Scalability

Joe Stringer joestringer at nicira.com
Thu Dec 12 19:33:45 UTC 2013


Currently, configuring a large number of ports in ovs-vswitchd causes the main
thread to use an unreasonably high amount of CPU. This is largely due to cases
in the main loop where all ports are iterated through, even when this is
unnecessary.

This patchset shifts the netdev change_seq out from per-netdevice to a single
global 'connectivity_seq', which tracks all interface and port changes. This is
updated on all changes to netdev attributes, and bfd, cfm, lacp and stp status.
Using this global connectivity change sequence, we skip polling ports if there
are no changes in status.

When configured with 5,000 internal ports and 50 tunnels running bfd in a test
environment, this decreases average CPU usage of the main thread from about 40%
to under 5%. When 5,000 tunnel ports are configured with bfd, this patchset
decreases average CPU usage of the main thread from about 98% to about 60%.

Changes since v4:- The first patch has been simplified, removing the thin layer
over 'struct seq' in favour of a simple getter function that always returns the
connectivity seq. The last three patches were acked by Ethan, but have been
rebased and commits reworded slightly.

Joe Stringer (4):
  netdev: Globally track port status changes
  ofproto-dpif: Don't poll ports when nothing changes
  ofproto-dpif: Only run bundles when lacp or bonds are enabled
  bridge: Only store instant_stats on device changes

 lib/automake.mk            |    2 ++
 lib/bfd.c                  |    7 +++++-
 lib/cfm.c                  |   14 ++++++++++++
 lib/connectivity.c         |   43 +++++++++++++++++++++++++++++++++++
 lib/connectivity.h         |   25 ++++++++++++++++++++
 lib/lacp.c                 |    8 +++++++
 lib/netdev-bsd.c           |   39 +++++++-------------------------
 lib/netdev-dummy.c         |   34 ++++------------------------
 lib/netdev-linux.c         |   24 +++-----------------
 lib/netdev-provider.h      |   24 ++++++++++----------
 lib/netdev-vport.c         |   31 ++++---------------------
 lib/netdev.c               |   15 +++---------
 lib/netdev.h               |    2 --
 lib/stp.c                  |    5 ++++
 ofproto/bond.c             |    8 +++----
 ofproto/ofproto-dpif.c     |   38 +++++++++++++++++++++++--------
 ofproto/ofproto-provider.h |    2 +-
 ofproto/ofproto.c          |   54 ++++++++++++++++++++------------------------
 ofproto/tunnel.c           |    8 ++++---
 vswitchd/bridge.c          |   12 ++++++++++
 20 files changed, 214 insertions(+), 181 deletions(-)
 create mode 100644 lib/connectivity.c
 create mode 100644 lib/connectivity.h

-- 
1.7.9.5




More information about the dev mailing list