我在主机192.168.1.105上打开了iperf3服务器:
iperf3 -sV
然后在同一主机上的 TCP 上进行客户端操作:
iperf3 -c 192.168.1.105 -4b 10G -P 2 -n 10G -w 1M
结果是:
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-5.87 sec 5.00 GBytes 7.32 Gbits/sec 2 sender
[ 4] 0.00-5.87 sec 5.00 GBytes 7.31 Gbits/sec receiver
[ 6] 0.00-5.87 sec 5.00 GBytes 7.31 Gbits/sec 6 sender
[ 6] 0.00-5.87 sec 4.99 GBytes 7.30 Gbits/sec receiver
[SUM] 0.00-5.87 sec 10.0 GBytes 14.6 Gbits/sec 8 sender
[SUM] 0.00-5.87 sec 9.99 GBytes 14.6 Gbits/sec receiver
iperf Done.
然后 udp 客户端
iperf3 -c 192.168.1.105 -u4b 10G -P 2 -n 10G -w 1M
和结果
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-106.05 sec 48.8 GBytes 3.96 Gbits/sec 0.001 ms 181932/6400000 (2.8%)
[ 4] Sent 6400000 datagrams
[ 6] 0.00-106.05 sec 48.8 GBytes 3.96 Gbits/sec 0.002 ms 182081/6400000 (2.8%)
[ 6] Sent 6400000 datagrams
[SUM] 0.00-106.05 sec 97.7 GBytes 7.91 Gbits/sec 0.002 ms 364013/12800000 (2.8%)
差别在哪里?
当我在具有 1Gbps 网络接口的笔记本电脑上运行客户端时,也会发生同样的情况。
从笔记本电脑客户端,对于 UDP,我的 Linux 子系统速度为 250Mbits/sec(任务管理器显示网络接口负载约为 25%)。对于 TCP,速度为 500Mbits/sec...