使用 iperf 进行本地主机网络性能测试

使用 iperf 进行本地主机网络性能测试

我试图弄清楚为什么我的笔记本电脑上的本地主机网络性能如此缓慢。

我有一台英特尔 i5 6300u 2.4GHz,配备 8GB RAM(Windows 7 64 位)。

如果我跑

iperf -s

进而

iperf -c 127.0.0.1

这是我得到的输出:

D:\>iperf -c localhost -t 100 -i 5
------------------------------------------------------------
Client connecting to localhost, TCP port 5001
TCP window size:  208 KByte (default)
------------------------------------------------------------
[  3] local 127.0.0.1 port 49743 connected with 127.0.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec  65.9 MBytes   111 Mbits/sec
[  3]  5.0-10.0 sec  67.4 MBytes   113 Mbits/sec
[  3] 10.0-15.0 sec  67.0 MBytes   112 Mbits/sec
[  3] 15.0-20.0 sec  68.4 MBytes   115 Mbits/sec
[  3] 20.0-25.0 sec  68.4 MBytes   115 Mbits/sec
[  3] 25.0-30.0 sec  68.9 MBytes   116 Mbits/sec
[  3] 30.0-35.0 sec  68.1 MBytes   114 Mbits/sec
[  3] 35.0-40.0 sec  68.5 MBytes   115 Mbits/sec
[  3] 40.0-45.0 sec  68.6 MBytes   115 Mbits/sec
[  3] 45.0-50.0 sec  68.0 MBytes   114 Mbits/sec
[  3] 50.0-55.0 sec  68.6 MBytes   115 Mbits/sec
[  3] 55.0-60.0 sec  68.5 MBytes   115 Mbits/sec

这意味着我达到了最大值 115 Mbits(对于我来说,使用 localhost 有点太低了)。如果我-P 8使用多线程选项运行它,我达到最大值 189 Mbits/sec(稍好一点,但不是那么多)

CPU甚至达不到50%。

附加信息:

我使用远程节点(AWS 中的实例)进行了测试,速度较慢。我还使用 fast.com 进行了测试,速度可以达到 300Mbits/秒

在此处输入图片描述

使用多个流进行测试,最高速度为 187Mbits/秒

D:\>iperf -c 127.0.0.1 -P 20
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 5001
TCP window size:  208 KByte (default)

Test with multiple streams (-P 20):

[  3] local 127.0.0.1 port 65106 connected with 127.0.0.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[ 18]  0.0-10.2 sec  12.5 MBytes  10.3 Mbits/sec
[ 16]  0.0-10.2 sec  11.4 MBytes  9.36 Mbits/sec
[ 20]  0.0-10.3 sec  13.2 MBytes  10.7 Mbits/sec
[ 15]  0.0-10.3 sec  12.5 MBytes  10.2 Mbits/sec
[ 11]  0.0-10.3 sec  12.0 MBytes  9.78 Mbits/sec
[  8]  0.0-10.4 sec  12.1 MBytes  9.82 Mbits/sec
[  7]  0.0-10.2 sec  11.2 MBytes  9.26 Mbits/sec
[  4]  0.0-10.3 sec  11.6 MBytes  9.50 Mbits/sec
[ 10]  0.0-10.2 sec  10.9 MBytes  8.92 Mbits/sec
[  9]  0.0-10.3 sec  11.2 MBytes  9.20 Mbits/sec
[ 21]  0.0-10.2 sec  11.1 MBytes  9.13 Mbits/sec
[  6]  0.0-10.3 sec  11.1 MBytes  9.04 Mbits/sec
[  3]  0.0-10.4 sec  11.0 MBytes  8.91 Mbits/sec
[ 19]  0.0-10.4 sec  13.1 MBytes  10.6 Mbits/sec
[ 12]  0.0-10.4 sec  12.2 MBytes  9.89 Mbits/sec
[ 13]  0.0-10.4 sec  11.5 MBytes  9.27 Mbits/sec
[  5]  0.0-10.4 sec  11.1 MBytes  8.95 Mbits/sec
[ 22]  0.0-10.5 sec  11.2 MBytes  9.02 Mbits/sec
[ 17]  0.0-10.5 sec  11.4 MBytes  9.08 Mbits/sec
[ 14]  0.0-10.5 sec  11.1 MBytes  8.89 Mbits/sec
[SUM]  0.0-10.5 sec   234 MBytes   187 Mbits/sec

关于环回上的 MTU:

D:\>netsh interface ipv6 show subinterfaces


   MTU  Stato Media Sense  Byte in ingresso Byte in uscita   Interfaccia
------  -----------------  ---------------- ---------------  -----------
4294967295                1          0       6232  Loopback Pseudo-Interface 1
  1500                2       2430      52320  Connessione rete wireless
  1280                5          0          0  isatap.{ADB31CE7-8DB4-4DCC-903D-A3C2562C77CC}
  1500                5          0       7856  Connessione rete wireless 2
  1280                5          0          0  isatap.{611E9776-B58C-419F-8389-53BE2684DEEF}
  1500                1     337173     301916  Connessione alla rete locale (LAN)
  1280                5          0          0  isatap.enelint.global
  1500                5          0       7856  Connessione rete wireless 3
  1280                5          0          0  isatap.{6F6BA9BA-0A83-49A7-B76C-28AD125C7D36}
  1500                5          0       6672  Connessione di rete Bluetooth
  1280                5          0          0  isatap.{65692E26-21CE-42F7-A3D7-2C76564895A7}
  1350                5          0        152  Connessione alla rete locale (LAN) 2
  1280                5          0          0  isatap.{F61455EB-6826-432D-9F25-3BE44BC5E7CA}

相关内容