Localhost network performance with iperf

0

I am trying to figure out why on my notebook the network performance on localhost is so slow.

I have an intel i5 6300u 2.4GHz with 8GB RAM (windows 7 64bit).

If I run

iperf -s

And then

iperf -c 127.0.0.1

This is the output that i get:

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

That means I am reaching maximum 115 Mbits (and for me it's a bit too low with localhost). If i run it with -P 8 option to use multiple thread I reach maximum 189 Mbits/sec (a bit better but not that much)

The CPU doesn't even reach 50%.

Additional information:

I tested it with a remote node (an instance in AWS) and is slower. I also tested with fast.com and I can reach 300Mbits/sec

enter image description here

Testing with multiple streams, getting max 187Mbits/sec

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

Regarding the MTU on the loopback:

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}

giò

Posted 2018-09-03T16:44:07.507

Reputation: 141

1The default TCP window size seems excessively small. See what results you get when you add -w 2M to both sides of iperf. Also, what is your MTU on your loopback interface? – Spiff – 2018-09-03T17:58:54.400

@Spiff: Thanks for the answers. I added -w 2M, and nothing changed. I also added the output of netsh to get the MTU in the original post (4294967295) – giò – 2018-09-04T09:42:24.697

You have both windows and linux tags, so do you have the same problem if you boot the notebook with Linux? – dirkt – 2018-09-05T06:09:58.507

sorry tested on windows 7 64bit – giò – 2018-09-05T07:26:20.283

No answers