The run-time performance of PMDs is often difficult to understand and trouble-shoot. The existing PMD statistics counters only provide a coarse grained average picture. At packet rates of several Mpps sporadic drops of packet bursts happen at sub-millisecond time scales and are impossible to capture and analyze with existing tools.
This patch collects a large number of important PMD performance metrics per PMD iteration, maintaining histograms and circular histories for iteration metrics and millisecond averages. To capture sporadic drop events, the patch set can be configured to monitor iterations for suspicious metrics and to log the neighborhood of such iterations for off-line analysis. The extra cost for the performance metric collection and the supervision has been measured to be in the order of 1% compared to the base commit in a PVP setup with L3 pipeline over VXLAN tunnels. For that reason the metrics collection is disabled by default and can be enabled at run-time through configuration. v5 -> v7: * Rebased on to dpdk_merge (commit e666668) - New base contains earlier refactoring parts of series. * Implemented comments from Ilya Maximets and Billy O'Mahony. * Replaced piggybacking qlen on dp_packet_batch with a new netdev API netdev_rxq_length(). * Thread-safe clearing of pmd counters in pmd_perf_start_iteration(). * Fixed bug in reporting datapath stats. * Work-around a bug in DPDK rte_vhost_rx_queue_count() which sometimes returns bogus in the upper 16 bits of the uint32_t return value. v4 -> v5: * Rebased to master (commit e9de6c0) * Implemented comments from Aaron Conole and Darrel Ball v3 -> v4: * Rebased to master (commit 4d0a31b) - Reverting changes to struct dp_netdev_pmd_thread. * Make metrics collection configurable. * Several bugfixes. v2 -> v3: * Rebased to OVS master (commit 3728b3b). * Non-trivial adaptation to struct dp_netdev_pmd_thread. - refactored in commit a807c157 (Bhanu). * No other changes compared to v2. v1 -> v2: * Rebased to OVS master (commit 7468ec788). * No other changes compared to v1. Jan Scheurich (3): netdev: Add rxq callback function rxq_length() dpif-netdev: Detailed performance stats for PMDs dpif-netdev: Detection and logging of suspicious PMD iterations NEWS | 5 + lib/automake.mk | 1 + lib/dp-packet.h | 1 + lib/dpif-netdev-perf.c | 475 +++++++++++++++++++++++++++++++++++++++++++- lib/dpif-netdev-perf.h | 275 ++++++++++++++++++++++++- lib/dpif-netdev.c | 184 +++++++++++++++-- lib/netdev-bsd.c | 1 + lib/netdev-dpdk.c | 49 ++++- lib/netdev-dpdk.h | 14 ++ lib/netdev-dpif-unixctl.man | 156 +++++++++++++++ lib/netdev-dummy.c | 1 + lib/netdev-linux.c | 1 + lib/netdev-provider.h | 3 + lib/netdev-vport.c | 1 + lib/netdev.c | 9 + lib/netdev.h | 1 + manpages.mk | 2 + vswitchd/ovs-vswitchd.8.in | 27 +-- vswitchd/vswitch.xml | 12 ++ 19 files changed, 1158 insertions(+), 60 deletions(-) create mode 100644 lib/netdev-dpif-unixctl.man -- 1.9.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
