aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2014-06-26 07:16:27 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-01 18:50:23 -0400
commit9ceb87fceacca86a37f189b84b79797c313b0c03 (patch)
treeb91cf09ea38bd8dff2b128b1d2ae1ae6754e028f /Documentation/networking
parent5b9e7e1607956e2454ccbd94ccf5631309ade054 (diff)
pktgen: document tuning for max NIC performance
Using pktgen I'm seeing the ixgbe driver "push-back", due TX ring running full. Thus, the TX ring is artificially limiting pktgen. (Diagnose via "ethtool -S", look for "tx_restart_queue" or "tx_busy" counters.) Using ixgbe, the real reason behind the TX ring running full, is due to TX ring not being cleaned up fast enough. The ixgbe driver combines TX+RX ring cleanups, and the cleanup interval is affected by the ethtool --coalesce setting of parameter "rx-usecs". Do not increase the default NIC TX ring buffer or default cleanup interval. Instead simply document that pktgen needs special NIC tuning for maximum packet per sec performance. Performance results with pktgen with clone_skb=100000. TX ring size 512 (default), adjusting "rx-usecs": (Single CPU performance, E5-2630, ixgbe) - 3935002 pps - rx-usecs: 1 (irqs: 9346) - 5132350 pps - rx-usecs: 10 (irqs: 99157) - 5375111 pps - rx-usecs: 20 (irqs: 50154) - 5454050 pps - rx-usecs: 30 (irqs: 33872) - 5496320 pps - rx-usecs: 40 (irqs: 26197) - 5502510 pps - rx-usecs: 50 (irqs: 21527) TX ring size adjusting (ethtool -G), "rx-usecs==1" (default): - 3935002 pps - tx-size: 512 - 5354401 pps - tx-size: 768 - 5356847 pps - tx-size: 1024 - 5327595 pps - tx-size: 1536 - 5356779 pps - tx-size: 2048 - 5353438 pps - tx-size: 4096 Notice after commit 6f25cd47d (pktgen: fix xmit test for BQL enabled devices) pktgen uses netif_xmit_frozen_or_drv_stopped() and ignores the BQL "stack" pause (QUEUE_STATE_STACK_XOFF) flag. This allow us to put more pressure on the TX ring buffers. It is the ixgbe_maybe_stop_tx() call that stops the transmits, and pktgen respecting this in the call to netif_xmit_frozen_or_drv_stopped(txq). Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r--Documentation/networking/pktgen.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index 0e30c7845b2b..0dffc6e37902 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -24,6 +24,34 @@ For monitoring and control pktgen creates:
24 /proc/net/pktgen/ethX 24 /proc/net/pktgen/ethX
25 25
26 26
27Tuning NIC for max performance
28==============================
29
30The default NIC setting are (likely) not tuned for pktgen's artificial
31overload type of benchmarking, as this could hurt the normal use-case.
32
33Specifically increasing the TX ring buffer in the NIC:
34 # ethtool -G ethX tx 1024
35
36A larger TX ring can improve pktgen's performance, while it can hurt
37in the general case, 1) because the TX ring buffer might get larger
38than the CPUs L1/L2 cache, 2) because it allow more queueing in the
39NIC HW layer (which is bad for bufferbloat).
40
41One should be careful to conclude, that packets/descriptors in the HW
42TX ring cause delay. Drivers usually delay cleaning up the
43ring-buffers (for various performance reasons), thus packets stalling
44the TX ring, might just be waiting for cleanup.
45
46This cleanup issues is specifically the case, for the driver ixgbe
47(Intel 82599 chip). This driver (ixgbe) combine TX+RX ring cleanups,
48and the cleanup interval is affected by the ethtool --coalesce setting
49of parameter "rx-usecs".
50
51For ixgbe use e.g "30" resulting in approx 33K interrupts/sec (1/30*10^6):
52 # ethtool -C ethX rx-usecs 30
53
54
27Viewing threads 55Viewing threads
28=============== 56===============
29/proc/net/pktgen/kpktgend_0 57/proc/net/pktgen/kpktgend_0