2

I am currently testing iperf with a view to automating some testing servers for our company.

To do this I am using an iperf server in the cloud which is well connected and is only 5 hops away from my client. The command used to initiate the server is "iperf3 -s".

My client is connected to a low quality ADSL line and I know from long term testing that the line has an available bandwidth of between 500k and 1500k.

I am testing using a variety of test types. For example when I test using TCP and default settings I get the following output:

iperf3 -c xxxxxxx.co.uk
Connecting to host xxxxxxx.co.uk, port 5201
[  4] local 192.168.1.102 port 56608 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  95.0 KBytes   778 Kbits/sec    0   16.8 KBytes       
[  4]   1.00-2.00   sec  85.2 KBytes   698 Kbits/sec    0   20.9 KBytes       
[  4]   2.00-3.00   sec  79.6 KBytes   652 Kbits/sec    0   25.1 KBytes       
[  4]   3.00-4.00   sec  74.0 KBytes   607 Kbits/sec    3   19.6 KBytes       
[  4]   4.00-5.00   sec  72.6 KBytes   595 Kbits/sec    0   25.1 KBytes       
[  4]   5.00-6.00   sec  71.2 KBytes   583 Kbits/sec    2   19.6 KBytes       
[  4]   6.00-7.00   sec  61.4 KBytes   503 Kbits/sec    1   19.6 KBytes       
[  4]   7.00-8.00   sec  82.4 KBytes   675 Kbits/sec    0   19.6 KBytes       
[  4]   8.00-9.00   sec  71.2 KBytes   583 Kbits/sec    1   12.6 KBytes       
[  4]   9.00-10.00  sec  72.6 KBytes   595 Kbits/sec    0   19.6 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   765 KBytes   627 Kbits/sec    7             sender
[  4]   0.00-10.00  sec   735 KBytes   602 Kbits/sec                  receiver

iperf Done.

This is a little lower than I expected but I can accept it as being generally correct.

When I look to test udp performance, things get very strange.

If I test with the default udp bandwidth using the following command: iperf3 -c xxxxxxxxx.co.uk -u

I get the following output:

Connecting to host xxxxxxxxx.co.uk, port 5201
[  4] local 192.168.1.102 port 41387 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bandwidth       Total Datagrams
[  4]   0.00-1.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   1.00-2.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   2.00-3.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   3.00-4.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   4.00-5.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   5.00-6.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   6.00-7.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   7.00-8.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   8.00-9.00   sec   128 KBytes  1.05 Mbits/sec  16  
[  4]   9.00-10.00  sec   128 KBytes  1.05 Mbits/sec  16  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  4]   0.00-10.00  sec  1.25 MBytes  1.05 Mbits/sec  11.913 ms  136/146 (93%)  
[  4] Sent 146 datagrams

iperf Done.

BUT, if I set the bandwidth to say 100M, using the following command:

iperf3 -c xxxxxxxx.co.uk -u -b 100M

I get

Connecting to host xxxxxxx.co.uk, port 5201
[  4] local 192.168.1.102 port 53077 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bandwidth       Total Datagrams
[  4]   0.00-1.00   sec  10.5 MBytes  87.9 Mbits/sec  1342  
[  4]   1.00-2.00   sec  10.8 MBytes  90.3 Mbits/sec  1378  
[  4]   2.00-3.00   sec  10.8 MBytes  90.6 Mbits/sec  1382  
[  4]   3.00-4.00   sec  10.8 MBytes  90.8 Mbits/sec  1386  
[  4]   4.00-5.00   sec  10.8 MBytes  90.2 Mbits/sec  1376  
[  4]   5.00-6.00   sec  10.8 MBytes  90.2 Mbits/sec  1376  
[  4]   6.00-7.00   sec  10.8 MBytes  90.3 Mbits/sec  1378  
[  4]   7.00-8.00   sec  10.8 MBytes  90.8 Mbits/sec  1384  
[  4]   8.00-9.00   sec  10.8 MBytes  90.7 Mbits/sec  1384  
[  4]   9.00-10.00  sec  10.8 MBytes  90.5 Mbits/sec  1381  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  4]   0.00-10.00  sec   108 MBytes  90.2 Mbits/sec  8.214 ms  0/1 (0%)  
[  4] Sent 1 datagrams

iperf Done.

Which is crazy. I cant possibly achieve 90 Mbits/sec on this ADSL line. Can anybody help shed some light on this?

  • can you check the output on server also ? – Mr.lock Sep 20 '17 at 14:27
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Feb 19 '18 at 19:15
3

There is one particularity about iperf 2.0.x with UDP: Within the limits (CPU, NIC, UDP/IP stack and its buffers) of the sending system, iPerf will send traffic at the payload rate you specify with the -b parameter (if left out, iperf will default to 1Mbit/s).

EDIT: D'oh! Only now I spotted that you are actually using iperf3. I'll leave these comments here, all the same.

With UDP, iPerf 2.0.x will not bother nor check if and how much of the data the receiver/server is getting, or even if there actually is a receiver/server at the IP address given in the -c <ip.addr.ess.here> parameter. [1]

iperf 3.x changes this insofar as the receiver/server end no longer makes a difference between UDP and TCP, you just start iperf3 in "server mode". The client will specify if UDP or TCP is to be used, and there will be some form of negotiation between client and server, before the actual test is performed.

EDIT: If iperf3 client and server fail to negotiate, the UDP test will not start. However, if negotiation succeeds, the iperf3 client will still send at the configured data/payload rate, regardless if and how much of the data makes it to the server.

Therefore, with UDP testing, it is important to check the results at the server/receiver end, not on the client/sender. On iperf 1.7x and 2.0.x, you need to look at the server side output as it is generated there. With iperf3, you can "pull" the server side results with command-line parameter --get-server-output.

Suggestion for iperf2.0.x: run iperf -s -u -i 1 on the server side to get 1sec reporting intervals. Suggestion for iperf3.x.x: run iperf3 -s server-side and ... -i 1 --get-server-output client-side This will also give ou some information about the pps figures of your test stream and of course the packet loss rate, which is the interesting part.

[1] Especially this property of iPerf 2.0.x with UDP makes it a tool to use with great caution. Trying to pump a single 50Mbit/s stream of UDP across the upstream of a 100/20 xDSL line will make the entire access line unusable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.