在用iperf3单线程测速时,经常遇到速率不稳,跑不满,这有可能是网卡设置导致的性能低下。

例如如果开启了中断裁决(中断调控 interrupt moderation),那么网卡不会第一时间中断,而是有一个超时时间,这会导致性能低下,一般网卡驱动默认都是启用这个的,关闭后,测速性能大幅度提高

再就是可能开启了节能模式,会导致性能低。

我这边测试情况是,当开启了interrupt moderation后,千兆网卡 RTL8111E,很垃圾的那种淘宝16块钱买的,测速不到900Mbps,甚至有时候是 600~700Mbps。关闭interrupt moderation

Connecting to host 20.0.0.2, port 5201
[  4] local 20.0.0.1 port 53869 connected to 20.0.0.2 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   112 MBytes   939 Mbits/sec
[  4]   1.00-2.00   sec   112 MBytes   939 Mbits/sec
[  4]   2.00-3.00   sec   112 MBytes   940 Mbits/sec
[  4]   3.00-4.00   sec   112 MBytes   941 Mbits/sec
[  4]   4.00-5.00   sec   112 MBytes   940 Mbits/sec
[  4]   5.00-6.00   sec   112 MBytes   938 Mbits/sec
[  4]   6.00-7.00   sec   111 MBytes   928 Mbits/sec
[  4]   7.00-8.00   sec   112 MBytes   940 Mbits/sec
[  4]   8.00-9.00   sec   112 MBytes   937 Mbits/sec
[  4]   9.00-10.00  sec   112 MBytes   941 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec                  sender
[  4]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec                  receiver

千兆已经跑满了 940Mbps

 

另外就是手上有两块 MCX353A-FCBT,链路速度是56Gbps,单线程跑iperf3,只有4Gbps,开8线程跑也才只有21Gbps的样子。但是关闭interrupt moderation之后,单线程就能跑17Gbps

C:\iperf>iperf3.exe -c 20.20.20.2
Connecting to host 20.20.20.2, port 5201
[  4] local 20.20.20.1 port 50686 connected to 20.20.20.2 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  2.02 GBytes  17.3 Gbits/sec
[  4]   1.00-2.00   sec  1.95 GBytes  16.8 Gbits/sec
[  4]   2.00-3.00   sec  1.98 GBytes  17.0 Gbits/sec
[  4]   3.00-4.00   sec  2.01 GBytes  17.3 Gbits/sec
[  4]   4.00-5.00   sec  1.94 GBytes  16.6 Gbits/sec
[  4]   5.00-6.00   sec  2.02 GBytes  17.4 Gbits/sec
[  4]   6.00-7.00   sec  2.01 GBytes  17.3 Gbits/sec
[  4]   7.00-8.00   sec  2.02 GBytes  17.4 Gbits/sec
[  4]   8.00-9.00   sec  2.02 GBytes  17.3 Gbits/sec
[  4]   9.00-10.00  sec  2.01 GBytes  17.2 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  20.0 GBytes  17.2 Gbits/sec                  sender
[  4]   0.00-10.00  sec  20.0 GBytes  17.2 Gbits/sec                  receiver

 

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐