我正在ubuntu18.04上运行iperf2,并试图用一个CPU测试最大带宽。我的拓扑结构是客户端(带有CX5 100G nic(->开关(100G(->服务器(带有CX5 100G nic(。
不幸的是,速度只有30Gbps。然后我做了一个环回测试,速度是60Gbps,cpu使用率是100%。我该怎么办?
Binding to local address 10.0.0.2
Write buffer size: 128 KByte
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.0.2 port 42749 connected with 10.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 0.00-1.00 sec 3.71 GBytes 31.9 Gbits/sec 30379/0 0 6025K/354 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 1.00-2.00 sec 3.59 GBytes 30.8 Gbits/sec 29415/0 0 6684K/271 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 2.00-3.00 sec 3.63 GBytes 31.2 Gbits/sec 29712/0 0 7407K/399 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 3.00-4.00 sec 3.71 GBytes 31.8 Gbits/sec 30359/0 0 8285K/399 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 4.00-5.00 sec 3.73 GBytes 32.0 Gbits/sec 30520/0 0 8285K/328 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 5.00-6.00 sec 3.77 GBytes 32.4 Gbits/sec 30911/0 0 8285K/378 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 6.00-7.00 sec 3.77 GBytes 32.4 Gbits/sec 30920/0 0 8285K/384 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 7.00-8.00 sec 3.74 GBytes 32.1 Gbits/sec 30646/0 0 8285K/325 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 8.00-9.00 sec 3.77 GBytes 32.4 Gbits/sec 30917/0 0 8285K/334 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 9.00-10.00 sec 3.72 GBytes 32.0 Gbits/sec 30503/0 0 8285K/278 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 0.00-10.00 sec 37.1 GBytes 31.9 Gbits/sec 304286/0 0 8285K/278 us
Binding to local address 10.0.0.2
Write buffer size: 128 KByte
TCP window size: 2.50 MByte (default)
------------------------------------------------------------
[ 3] local 10.0.0.2 port 37687 connected with 10.0.0.2 port 5001
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 0.00-1.00 sec 3.85 GBytes 33.1 Gbits/sec 31562/0 0 1087K/41 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 1.00-2.00 sec 5.82 GBytes 50.0 Gbits/sec 47638/0 0 1087K/20 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 2.00-3.00 sec 7.65 GBytes 65.7 Gbits/sec 62644/0 0 1087K/19 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 3.00-4.00 sec 7.46 GBytes 64.1 Gbits/sec 61140/0 0 1342K/19 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 4.00-5.00 sec 7.66 GBytes 65.8 Gbits/sec 62716/0 0 1342K/19 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 5.00-6.00 sec 7.60 GBytes 65.3 Gbits/sec 62231/0 0 1342K/21 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 6.00-7.00 sec 7.67 GBytes 65.9 Gbits/sec 62833/0 0 1342K/17 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 7.00-8.00 sec 7.71 GBytes 66.2 Gbits/sec 63134/0 0 1342K/19 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 8.00-9.00 sec 7.73 GBytes 66.4 Gbits/sec 63291/0 0 1342K/19 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 9.00-10.00 sec 7.73 GBytes 66.4 Gbits/sec 63311/0 0 2110K/44 us
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT
[ 3] 0.00-10.00 sec 70.9 GBytes 60.9 Gbits/sec 580508/0 0 2110K/44 us
首先,环回测试的数据包大小可能比网络测试大得多。这将意味着TCP需要更少的上/下协议栈的行程来传输给定数量的数据。
另一方面,环回测试将不包括100G NIC驱动程序的任何开销。
此外,TCP连接性能的众多限制之一是:
吞吐量<=窗口大小/RoundTripTime
虽然小型100G设置的往返时间可能很小,但它们仍然比环回更长,并且您正在尝试相当大的吞吐量,因此堆栈的TCP窗口大小的默认限制可能会阻碍获得更高的吞吐量。