iPerf Client/Server Options

In the previous article, I introduced the behavior that was actually used for options common to Client/Server.

This time, I will try to check what can be done by actually using each individual option of Client/Server.

It will be an environment in which Qualcomm's Wi-Fi device (QCA9377/QCA6174A) and general PC Ethernet are connected.

* Options are iperf3.1.3 information.

Options for Server

option Default value explanation
D unspecified Start iPerf as a daemon.

I unspecified Write the PID to the specified file.

1 unspecified iPerf ends when one connection ends (end of reception).

I actually used it

I tried using some of them to see how they work.

"-D" option

Run iperf as a daemon (background).

After typing "iperf3 -s -D" the console will immediately return.

You can check iperf3 by executing "ps".

To terminate, you can either "kill" or use the "-1" option to terminate after one connection is completed.

 

"-I" option

Record the PID to the specified file.

The file will be deleted when iPerf ends.

If you set "iperf3 -s -D -1 -I ~/pidfile",

Start the iperf server as a daemon and record the PID in the pidfile.

After one connection is completed (after transmission is completed), the pidfile is deleted and iPerf is automatically terminated.

root@imx8mmevk:~# iperf3 -s -D root@imx8mmevk:~# ps | grep iperf 3643 root 6316 S iperf3 -s -D 3645 root 3360 R grep iperf root@imx8mmevk:~# root@imx8mmevk:~# iperf3 -s -D -1 root@imx8mmevk:~# ps | grep iperf 3640 root 3360 S grep iperf root@imx8mmevk:~# iperf3 -s -D -1 -I ~/pidfile root@imx8mmevk:~# ls pidfile root@imx8mmevk:~# vi pidfile 3689^@ root@imx8mmevk:~# ps | grep iperf 3689 root 6316 S iperf3 -s -D -1 -I /home/root/pidfile 3696 root 3360 R grep iperf

Option for Client

option Default value explanation
n 0

It ends when transmission of the specified size is completed.

<number>[format]

Example: 200M (200MBytes)

200000000 (200MBytes)

k 0

Specify the number of packets until transmission is completed.

<number>[format]

Example: 100M (100M packet)

1000000 (100M packets)

l

UDP: 8192

TCP: 128*1024

This is the data size (block size) for one transmission.

C

unspecified

Sets the TCP congestion control algorithm to use.

/pro/sys/net/ipv4/tcp_available_congestion_control

M

Kernel default

Specifies the size of mss.
N 0

Set TCP_NODELAY=1 on the socket to disable the Nagle algorithm.

* Nagle Algorithm: Send small data as much as possible.

4 unspecified Limited to IPv4.
6 unspecified

Limited to IPv6.

The format should be IPv6 address% interface name.

Example: iperf3 -c fe80::1234:5678:1234:5678%wlan0 -6

S 0 (Best Effort) Specifies the Type of service (DS field) in the IPv4 header, in the range 0-255.
L unspecified Specifies the IPv6 flow label.
Z unspecified Fill the transmission data with '0'.
O 0

Ignore the first few seconds of data.

Lower the impact of slow start.

T unspecified Add an arbitrary title to each transmission data.

I actually used it

"-n" option

If "-n 20M" is specified, it will end when 20MByte transmission is complete.

There is an implementation in iperf_send.

root@imx8mmevk:~# iperf3 -c 192.168.1.2 -n 20M Connecting to host 192.168.1.2, port 5201 [ 5] local 192.168.1.1 port 51400 connected to 192.168.1.2 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 11.3 MBytes 94.5 Mbits/sec 0 424 KBytes [ 5] 1.00-2.00 sec 9.69 MBytes 81.4 Mbits/sec 0 424 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-2.00 sec 21.0 MBytes 87.8 Mbits/sec 0 sender [ 5] 0.00-2.00 sec 18.7 MBytes 78.4 Mbits/sec receiver iperf Done.

"-k" option

If "-k 1000" is specified, it will end when 1000 packets have been sent.

The unit of one packet is 128*1024 bytes (default TCP block size) by default in implementation.

However, in reality, the default size is EAGAIN in the write function, so the size is undefined.

If it does not become EAGAIN, 1 packet will be the block size (-l option).

There is an implementation in iperf_send.

root@imx8mmevk:~# iperf3 -c 192.168.1.2 -k 1000 Connecting to host 192.168.1.2, port 5201 [ 5] local 192.168.1.1 port 51412 connected to 192.168.1.2 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 11.7 MBytes 97.7 Mbits/sec 0 433 KBytes [ 5] 1.00-2.00 sec 9.01 MBytes 75.6 Mbits/sec 0 433 KBytes [ 5] 2.00-3.00 sec 9.94 MBytes 83.3 Mbits/sec 0 433 KBytes [ 5] 3.00-4.00 sec 9.63 MBytes 80.8 Mbits/sec 0 433 KBytes [ 5] 4.00-5.00 sec 9.45 MBytes 79.2 Mbits/sec 0 433 KBytes [ 5] 5.00-6.00 sec 8.45 MBytes 71.0 Mbits/sec 0 433 KBytes [ 5] 6.00-7.00 sec 9.32 MBytes 78.1 Mbits/sec 0 433 KBytes [ 5] 7.00-8.00 sec 9.63 MBytes 80.8 Mbits/sec 0 433 KBytes [ 5] 8.00-9.00 sec 9.69 MBytes 81.3 Mbits/sec 0 433 KBytes [ 5] 9.00-10.00 sec 7.95 MBytes 66.7 Mbits/sec 0 433 KBytes [ 5] 10.00-10.05 sec 891 KBytes 140 Mbits/sec 0 433 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.05 sec 95.6 MBytes 79.8 Mbits/sec 0 sender [ 5] 0.00-10.05 sec 93.3 MBytes 77.9 Mbits/sec receiver iperf Done.

"-C" option

The supported TCP congestion control algorithms in my environment were:

reno cubic

It is possible to specify iperf's TCP congestion control algorithm by specifying these.

An error will occur if the algorithm is not supported.

test@test-Latitude-5300:~$ cat /proc/sys/net/ipv4/tcp_available_congestion_control reno cubic test@test-Latitude-5300:~$ iperf3 -c 192.168.11.2 -C cubic Connecting to host 192.168.11.2, port 5201 [ 4] local 192.168.11.9 port 40872 connected to 192.168.11.2 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 67.3 MBytes 565 Mbits/sec 0 3.01 MBytes [ 4] 1.00-2.00 sec 73.8 MBytes 619 Mbits/sec 0 3.01 MBytes [ 4] 2.00-3.00 sec 72.5 MBytes 608 Mbits/sec 0 3.01 MBytes [ 4] 3.00-4.00 sec 72.5 MBytes 608 Mbits/sec 0 3.01 MBytes [ 4] 4.00-5.00 sec 72.5 MBytes 608 Mbits/sec 0 3.01 MBytes [ 4] 5.00-6.00 sec 70.0 MBytes 587 Mbits/sec 0 3.01 MBytes [ 4] 6.00-7.00 sec 72.5 MBytes 608 Mbits/sec 0 3.01 MBytes [ 4] 7.00-8.00 sec 72.5 MBytes 608 Mbits/sec 0 3.01 MBytes [ 4] 8.00-9.00 sec 68.8 MBytes 577 Mbits/sec 0 3.01 MBytes [ 4] 9.00-10.00 sec 72.5 MBytes 608 Mbits/sec 0 3.01 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 715 MBytes 600 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 713 MBytes 598 Mbits/sec receiver iperf Done. test@test-Latitude-5300:~$ iperf3 -c 192.168.11.2 -C reno Connecting to host 192.168.11.2, port 5201 [ 4] local 192.168.11.9 port 40876 connected to 192.168.11.2 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 68.2 MBytes 572 Mbits/sec 0 6.00 MBytes [ 4] 1.00-2.00 sec 71.2 MBytes 598 Mbits/sec 0 6.00 MBytes [ 4] 2.00-3.00 sec 73.8 MBytes 619 Mbits/sec 0 6.00 MBytes [ 4] 3.00-4.00 sec 73.8 MBytes 619 Mbits/sec 0 6.00 MBytes [ 4] 4.00-5.00 sec 73.8 MBytes 619 Mbits/sec 0 6.00 MBytes [ 4] 5.00-6.00 sec 71.2 MBytes 597 Mbits/sec 0 6.00 MBytes [ 4] 6.00-7.00 sec 71.2 MBytes 598 Mbits/sec 0 6.00 MBytes [ 4] 7.00-8.00 sec 72.5 MBytes 608 Mbits/sec 0 6.00 MBytes [ 4] 8.00-9.00 sec 73.8 MBytes 619 Mbits/sec 0 6.00 MBytes [ 4] 9.00-10.00 sec 73.8 MBytes 619 Mbits/sec 0 6.00 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 723 MBytes 607 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 722 MBytes 606 Mbits/sec receiver iperf Done. test@test-Latitude-5300:~$ iperf3 -c 192.168.11.2 -C abc Connecting to host 192.168.11.2, port 5201 iperf3: error - unable to set TCP_CONGESTION: Supplied congestion control algorithm not supported on this host

"-M" option

You can specify the value of MSS.

The top is the default setting, the bottom is the log with "-M 1000" specified.

Each header is added to 1000 bytes to make 1054 bytes.

As an implementation, setsockopt sets TCP_MAXSEG as mss value.

"-6" option

Run iPerf through <interface name> to the device at <IPv6 address> with the following command.

”iperf3 -c <IPv6 address>%<interface name> -6”

"-S" option

Set a value in the TOS(DS) field.

Default->CS0

32->CS1

64->CS2

96->CS3

128->CS4

The log when setting "iperf3 -c 192.168.11.2 -S 96" is as follows.

"-L" option

Specifies the Flow Label field (20bit) of the IPv6 header.

If you set "iperf3 -c <IPv6 address>%wlan0 -6 -L 0x55555", you will see the following log.

"-Z" option

Set all data parts to '0'.

Summary

This time, I introduced each option of Client/Server of iPerf.

iPerf can be used not only for Wi-Fi but also for IP communication with OSS, so if you are concerned about throughput, why not try using it?

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.