Site Search

Measuring Throughput with iPerf

Wireless device throughput

We often receive inquiries like, "The throughput is low," when evaluating wireless devices. When we check the measurement environment, we sometimes find that the issue stems from how iperf (a throughput measurement tool) is being used.

Therefore, this time I'd like to introduce the basic usage of iPerf.

What is iPerf?

This tool measures network performance. It can measure using TCP/UDP, and operates two devices in Client/Server mode, routing specified traffic from the Client to the Server to measure TX/RX throughput.
iPerf can be downloaded from here.

The command format (iperf3) is:

Client: iperf3 -c <Server's IP address> [each option]
Server: iperf3 -s [each option]

is.

If you omit any options, the default values for each option will be used. There are several versions of iPerf (iPerf/iPerf2/iPerf3), but they are not compatible with each other. Use the same version for both the client and server.

This time we will use iPerf3.

iPerf options

iPerf offers various options to support measurements. You can view the details of each option by running `iperf3 -h`. Below are some commonly used options and their descriptions (iPerf3 v3.6). The available options differ between versions. For more information, please refer to the help documentation for your specific iPerf version.

option Default value explanation
s It operates in server mode.
c It operates in client mode.
u (Client only) TCP The data will be sent via UDP.
i 1 Specify the interval (in seconds) at which the transmission results will be displayed.
If you select "-i 1", the results for the most recent 1 second will be displayed at 1-second intervals.
t (Client only) 10 Specify the time (in seconds) for sending the data.
If you select "-t 30", data will be transmitted for 30 seconds.
b (Client only)

TCP: Unlimited

UDP: 1M

Specify the bitrate.
If you select "-b 100M", data will be transmitted at 100Mbps.
w Auto

Specify the window size and the send/receive buffer size.
If you select "-w 10M", a window size of 10MB and a send/receive buffer of 10MB will be allocated.

*If explicitly specified, the Auto setting will be temporarily disabled, which will affect kernel settings (/proc/sys/net/core, ipv4).

p 5201 Specify the port to connect to.
If you select "-p 9000", it will connect to port 9000.
P 1

Specifies the number of connections to which traffic will flow.

In the case of "-P 2", two connections are used to run traffic in parallel.

R (client only)

The client specifies the server, which then sends the data.

Throughput measurement

Now, let's actually perform the measurements. In this case, both the STA (the device under measurement (DUT): Qualcomm QCA6174A) and the rival device are running on Linux. For measurements to be taken, the rival device must support a transmission rate equal to or higher than that of the device under measurement (DUT). This time, we will be testing 11ac UDP/TCP TX/RX.

The DUT connects to the AP via 11ac, and the AP and the opposing device are connected via Ethernet (CAT6). If you want to try 11ax, the AP must support 11ax and 2.5/10G Ethernet, the opposing device must also support 2.5/10G Ethernet, and the APs must be connected with CAT6A or higher.

UDP TX

I will try it with the following command.

Client(DUT): iperf3 -c 192.168.11.21 -u
Client(DUT): iperf3 -c 192.168.11.21 -u -b 500M
Client(DUT): iperf3 -c 192.168.11.21 -u -b 1G

Server (opposing machine): iperf3 -s

This command means to send 1M/500M/1Gbps UDP traffic to the opposing machine at 192.168.11.21 for 10 seconds (default).

# iperf3 -c 192.168.11.21 -u Connecting to host 192.168.11.21, port 5201 [ 5] local 192.168.11.100 port 33411 connected to 192.168.11.21 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 1.00-2.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 2.00-3.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 3.00-4.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 4.00-5.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 5.00-6.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 6.00-7.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 7.00-8.00 sec 129 KBytes 1.05 Mbits/sec 91 [ 5] 8.00-9.00 sec 127 KBytes 1.04 Mbits/sec 90 [ 5] 9.00-10.00 sec 129 KBytes 1.05 Mbits/sec 91 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 1.25 MBytes 1.05 Mbits/sec 0.000 ms 0/906 (0%) sender [ 5] 0.00-10.00 sec 1.25 MBytes 1.05 Mbits/sec 0.118 ms 0/906 (0%) receiver iperf Done. # iperf3 -c 192.168.11.21 -u -b 500M Connecting to host 192.168.11.21, port 5201 [ 5] local 192.168.11.100 port 52229 connected to 192.168.11.21 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 59.6 MBytes 500 Mbits/sec 43143 [ 5] 1.00-2.00 sec 59.6 MBytes 500 Mbits/sec 43170 [ 5] 2.00-3.00 sec 59.6 MBytes 500 Mbits/sec 43145 [ 5] 3.00-4.00 sec 59.6 MBytes 500 Mbits/sec 43163 [ 5] 4.00-5.00 sec 59.6 MBytes 500 Mbits/sec 43191 [ 5] 5.00-6.00 sec 59.6 MBytes 500 Mbits/sec 43124 [ 5] 6.00-7.00 sec 59.6 MBytes 500 Mbits/sec 43190 [ 5] 7.00-8.00 sec 59.6 MBytes 500 Mbits/sec 43155 [ 5] 8.00-9.00 sec 59.6 MBytes 500 Mbits/sec 43154 [ 5] 9.00-10.00 sec 59.6 MBytes 500 Mbits/sec 43174 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 596 MBytes 500 Mbits/sec 0.000 ms 0/431609 (0%) sender [ 5] 0.00-10.00 sec 596 MBytes 500 Mbits/sec 0.027 ms 144/431609 (0.033%) receiver iperf Done. # iperf3 -c 192.168.11.21 -u -b 1G Connecting to host 192.168.11.21, port 5201 [ 5] local 192.168.11.100 port 33252 connected to 192.168.11.21 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 88.1 MBytes 739 Mbits/sec 63802 [ 5] 1.00-2.00 sec 83.5 MBytes 700 Mbits/sec 60456 [ 5] 2.00-3.00 sec 82.8 MBytes 694 Mbits/sec 59949 [ 5] 3.00-4.00 sec 82.6 MBytes 693 Mbits/sec 59832 [ 5] 4.00-5.00 sec 85.0 MBytes 713 Mbits/sec 61569 [ 5] 5.00-6.00 sec 85.8 MBytes 720 Mbits/sec 62112 [ 5] 6.00-7.00 sec 85.6 MBytes 718 Mbits/sec 62000 [ 5] 7.00-8.00 sec 85.9 MBytes 720 Mbits/sec 62169 [ 5] 8.00-9.00 sec 85.6 MBytes 718 Mbits/sec 61975 [ 5] 9.00-10.00 sec 85.9 MBytes 720 Mbits/sec 62170 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 851 MBytes 714 Mbits/sec 0.000 ms 0/616034 (0%) sender [ 5] 0.00-10.00 sec 851 MBytes 714 Mbits/sec 0.021 ms 101/616033 (0.016%) receiver iperf Done.

Interval: The interval for aggregating subsequent data.
Transfer: Amount of data sent during the interval.
Bitrate: Throughput between intervals
Total Datagrams: Number of packets sent

If the '-b' option is not specified, the default bitrate of 1Mbps will be used. Even if specified, the expected results may not be achieved if the traffic volume is insufficient (500M).

This measurement uses 11ac, so if the options are 1G/500M/1M, 1G is the correct option setting. For UDP, you can check the results in the Client's "receiver" bitrate.

TCP TX

I will try it with the following command.

Client(DUT): iperf3 -c 192.168.11.21
Client(DUT): iperf3 -c 192.168.11.21 -w 10K

Server (opposing machine): iperf3 -s

The first Client command means to send TCP traffic to the opposing machine at 192.168.11.21 for 10 seconds.
The second Client command means sending TCP traffic to the opposing machine at 192.168.11.21 with a window size of 10KB for 10 seconds.

# iperf3 -c 192.168.11.21 Connecting to host 192.168.11.21, port 5201 [ 5] local 192.168.11.100 port 37906 connected to 192.168.11.21 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.01 sec 73.5 MBytes 609 Mbits/sec 0 3.18 MBytes [ 5] 1.01-2.00 sec 73.8 MBytes 626 Mbits/sec 0 3.63 MBytes [ 5] 2.00-3.00 sec 75.0 MBytes 629 Mbits/sec 1 3.63 MBytes [ 5] 3.00-4.00 sec 80.0 MBytes 672 Mbits/sec 0 3.63 MBytes [ 5] 4.00-5.00 sec 78.8 MBytes 660 Mbits/sec 0 3.63 MBytes [ 5] 5.00-6.00 sec 80.0 MBytes 672 Mbits/sec 0 3.63 MBytes [ 5] 6.00-7.00 sec 78.8 MBytes 661 Mbits/sec 0 3.65 MBytes [ 5] 7.00-8.01 sec 77.5 MBytes 647 Mbits/sec 0 3.67 MBytes [ 5] 8.01-9.00 sec 78.8 MBytes 662 Mbits/sec 0 3.67 MBytes [ 5] 9.00-10.01 sec 80.0 MBytes 666 Mbits/sec 0 3.75 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 776 MBytes 650 Mbits/sec 1 sender [ 5] 0.00-10.01 sec 776 MBytes 650 Mbits/sec receiver iperf Done. # iperf3 -c 192.168.11.21 -w 10K Connecting to host 192.168.11.21, port 5201 [ 5] local 192.168.11.100 port 33476 connected to 192.168.11.21 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 1.72 MBytes 14.4 Mbits/sec 0 21.2 KBytes [ 5] 1.00-2.00 sec 1.70 MBytes 14.3 Mbits/sec 0 21.2 KBytes [ 5] 2.00-3.00 sec 1.71 MBytes 14.3 Mbits/sec 0 21.2 KBytes [ 5] 3.00-4.00 sec 1.69 MBytes 14.2 Mbits/sec 0 21.2 KBytes [ 5] 4.00-5.00 sec 1.70 MBytes 14.3 Mbits/sec 0 21.2 KBytes [ 5] 5.00-6.00 sec 1.69 MBytes 14.2 Mbits/sec 0 21.2 KBytes [ 5] 6.00-7.00 sec 1.71 MBytes 14.3 Mbits/sec 0 21.2 KBytes [ 5] 7.00-8.00 sec 1.73 MBytes 14.5 Mbits/sec 0 21.2 KBytes [ 5] 8.00-9.00 sec 1.73 MBytes 14.5 Mbits/sec 0 21.2 KBytes [ 5] 9.00-10.00 sec 1.70 MBytes 14.3 Mbits/sec 0 21.2 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 17.1 MBytes 14.3 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 17.1 MBytes 14.3 Mbits/sec receiver iperf Done.

Interval: The interval for aggregating subsequent data.
Transfer: Amount of data sent during the interval.
Bitrate: Throughput between intervals
Retr: Number of retransmitted packets
Cwnd: Congestion window size

If you don't use the '-w' option, the window size and send/receive buffer sizes will be adjusted automatically, so there shouldn't be any problems in general. However, adjustments may be necessary depending on differences in kernel settings. If you are experiencing slow speeds, you might want to review the kernel settings for both sending and receiving (/proc/sys/net/core, /proc/sys/net/ipv4).

The final measurement result is for when '-w' is set to 10KB. In this case, the throughput is quite low because the window size is limited. When using the '-w' option, you need to check that your kernel settings are appropriate.

RX

In the case of RX,

iperf3 -s

Start it on the server,

iperf3 -c 192.168.11.21 -R

The client starts the application, but the '-R' option is specified to have the server send the data. With '-s', two machines need to be controlled, but with '-R', control is possible from a single client. This is useful when measuring with a shielded Box, for example.

# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.11.21, port 37694
[  5] local 192.168.11.100 port 5201 connected to 192.168.11.21 port 37696
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  50.1 MBytes   421 Mbits/sec
[  5]   1.00-2.00   sec  66.5 MBytes   558 Mbits/sec
[  5]   2.00-3.00   sec  62.7 MBytes   526 Mbits/sec
[  5]   3.00-4.00   sec  62.0 MBytes   520 Mbits/sec
[  5]   4.00-5.00   sec  66.1 MBytes   554 Mbits/sec
[  5]   5.00-6.00   sec  66.3 MBytes   556 Mbits/sec
[  5]   6.00-7.00   sec  66.1 MBytes   554 Mbits/sec
[  5]   7.00-8.00   sec  64.0 MBytes   537 Mbits/sec
[  5]   8.00-9.00   sec  66.8 MBytes   560 Mbits/sec
[  5]   9.00-10.00  sec  66.9 MBytes   561 Mbits/sec
[  5]  10.00-10.05  sec  3.48 MBytes   543 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.05  sec   641 MBytes   535 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
# iperf3 -c 192.168.11.21 -R
Connecting to host 192.168.11.21, port 5201
Reverse mode, remote host 192.168.11.21 is sending
[  5] local 192.168.11.100 port 33496 connected to 192.168.11.21 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  57.4 MBytes   481 Mbits/sec
[  5]   1.00-2.00   sec  66.7 MBytes   559 Mbits/sec
[  5]   2.00-3.00   sec  66.6 MBytes   559 Mbits/sec
[  5]   3.00-4.00   sec  66.5 MBytes   558 Mbits/sec
[  5]   4.00-5.00   sec  66.7 MBytes   560 Mbits/sec
[  5]   5.00-6.00   sec  65.5 MBytes   549 Mbits/sec
[  5]   6.00-7.00   sec  67.0 MBytes   562 Mbits/sec
[  5]   7.00-8.00   sec  66.6 MBytes   559 Mbits/sec
[  5]   8.00-9.00   sec  66.9 MBytes   561 Mbits/sec
[  5]   9.00-10.00  sec  67.7 MBytes   567 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   664 MBytes   557 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   658 MBytes   552 Mbits/sec                  receiver
iperf Done.

Summary

While iperf makes it relatively easy to measure throughput, incorrect options can lead to inaccurate results. If something seems wrong, it might be a good idea to first check your environment.

Next time, I'd like to use iPerf to measure the throughput of DBS (Dual Band Simultaneous) and verify its superiority over concurrent.

Inquiry

If you have any questions about Qualcomm products, please contact us from the link below.

To Qualcomm manufacturer information Top

If you want to return to Qualcomm manufacturer information top page, please click below.