When configured with a large number of ports, ovs-vswitchd has ongoing high CPU utilization even when there is little going on; For example, configuring current master with more than 5,000 tunnel ports running bfd causes the average CPU utilization of the main thread to hit 100% in a test environment. This patchset reduces it to around 60% for 5,000 ports, or 85% with 10,000. Further gains are made by related ongoing work.
This patchset shifts the change_seq out from per-netdevice to a single global 'connectivity_seq', which tracks all interface and port changes. This is updated on 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. New in v3: - Patch #1 to split IDL updates for STP statistics, status - Rebase and rearrange -- connectivity seq moved to lib/connectivity.[ch] - Track STP and CFM changes more comprehensively - Dropped patch to disable instant_stats updates per-protocol Joe Stringer (5): bridge: Refresh STP statistics separately from status 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 | 4 +++ lib/bond.c | 7 ++--- lib/cfm.c | 13 ++++++++ lib/connectivity.c | 62 +++++++++++++++++++++++++++++++++++++ lib/connectivity.h | 46 +++++++++++++++++++++++++++ lib/lacp.c | 7 +++++ lib/netdev-bsd.c | 36 ++++----------------- lib/netdev-dummy.c | 33 ++------------------ lib/netdev-linux.c | 23 ++------------ lib/netdev-provider.h | 24 +++++++------- lib/netdev-vport.c | 30 +++--------------- lib/netdev.c | 14 ++------- lib/netdev.h | 2 -- lib/stp.c | 4 +++ ofproto/ofproto-dpif.c | 56 +++++++++++++++++++++++++++------ ofproto/ofproto-provider.h | 12 ++++++- ofproto/ofproto.c | 74 +++++++++++++++++++++++++++----------------- ofproto/ofproto.h | 6 ++++ ofproto/tunnel.c | 7 +++-- tests/test-stp.c | 5 +++ vswitchd/bridge.c | 55 +++++++++++++++++++++++++++----- 22 files changed, 336 insertions(+), 186 deletions(-) create mode 100644 lib/connectivity.c create mode 100644 lib/connectivity.h -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev