@
zer iperf 里面带宽数据里还会包括 tcp retransmission 的数? 方便指引一下 iperf 文档或者代码的位置吗?
@
tailf 跟硬件驱动应该没什么关系,感觉跟内核的网络层关系更大一些,可以做个实验测试 loopback 的性能
在我机器上,loopback 都上不了千兆:
iperf -u -c 127.0.0.1 -b 1000M -t 10 -i 1
------------------------------------------------------------
Client connecting to 127.0.0.1, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 9.00 KByte (default)
------------------------------------------------------------
[ 4] local 127.0.0.1 port 63929 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 1.0 sec 82.8 MBytes 695 Mbits/sec
[ 4] 1.0- 2.0 sec 81.9 MBytes 687 Mbits/sec
[ 4] 2.0- 3.0 sec 82.9 MBytes 696 Mbits/sec
[ 4] 3.0- 4.0 sec 82.2 MBytes 690 Mbits/sec
[ 4] 4.0- 5.0 sec 83.2 MBytes 698 Mbits/sec
[ 4] 5.0- 6.0 sec 82.8 MBytes 695 Mbits/sec
[ 4] 6.0- 7.0 sec 83.1 MBytes 697 Mbits/sec
[ 4] 7.0- 8.0 sec 82.9 MBytes 696 Mbits/sec
[ 4] 8.0- 9.0 sec 83.2 MBytes 698 Mbits/sec
[ 4] 9.0-10.0 sec 82.9 MBytes 695 Mbits/sec
[ 4] 0.0-10.0 sec 828 MBytes 694 Mbits/sec
[ 4] Sent 591802 datagrams
read failed: Connection refused
[ 4] WARNING: did not receive ack of last datagram after 7 tries.
tcp 轻松上 40Gb
iperf -c localhost -i 1
------------------------------------------------------------
Client connecting to localhost, TCP port 5001
TCP window size: 144 KByte (default)
------------------------------------------------------------
[ 5] local 127.0.0.1 port 56463 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 5] 0.0- 1.0 sec 4.61 GBytes 39.6 Gbits/sec
[ 5] 1.0- 2.0 sec 4.73 GBytes 40.7 Gbits/sec
[ 5] 2.0- 3.0 sec 4.74 GBytes 40.7 Gbits/sec
[ 5] 3.0- 4.0 sec 4.80 GBytes 41.2 Gbits/sec
[ 5] 4.0- 5.0 sec 4.79 GBytes 41.2 Gbits/sec
[ 5] 5.0- 6.0 sec 4.78 GBytes 41.0 Gbits/sec
[ 5] 6.0- 7.0 sec 4.76 GBytes 40.9 Gbits/sec
[ 5] 7.0- 8.0 sec 4.80 GBytes 41.2 Gbits/sec
[ 5] 8.0- 9.0 sec 4.77 GBytes 41.0 Gbits/sec
[ 5] 9.0-10.0 sec 4.78 GBytes 41.0 Gbits/sec
[ 5] 0.0-10.0 sec 47.6 GBytes 40.9 Gbits/sec