Iperf3
From Leo's Notes
Last edited on 14 June 2020, at 22:02.
iperf3
is a TCP or UDP network performance testing tool. A test can be done by creating both a server and a client using the tool.
Usage Example
Benchmarking with iperf3:
On the server side, run:
$ iperf3 -s -p $Port
On the client side, run:
$ iperf3 -V -c $Server_IP -p $Port -f m -R --get-server-output -t 30
Where:
-f
is the format. (m = mbits, M = mbytes)-R
is reverse (server sends and the client receives)-t
is the duration of the test-u
specifies UDP rather than TCP-S
specifies the IP ToS service number--get-server-output
prints the server output at the end of the test.
Example Output
Here's an example of a test from a Raspberry Pi.
# iperf3 -V -c 10.1.1.9 -p 8888 -f m -R --get-server-output -t 30
iperf 3.1.6
Linux alarmpi 4.4.37-1-ARCH #1 Fri Dec 9 18:56:19 MST 2016 armv6l
Control connection MSS 1448
Time: Sun, 05 Mar 2017 22:23:53 GMT
Connecting to host 10.1.1.9, port 8888
Reverse mode, remote host 10.1.1.9 is sending
Cookie: alarmpi.1488752633.817938.09a602a74a
TCP MSS: 1448 (default)
[ 4] local 10.1.2.200 port 53740 connected to 10.1.1.9 port 8888
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 30 second test
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.01 sec 10.4 MBytes 86.8 Mbits/sec
[ 4] 1.01-2.01 sec 11.6 MBytes 97.9 Mbits/sec
[ 4] 2.01-3.01 sec 11.0 MBytes 91.7 Mbits/sec
[ 4] 3.01-4.00 sec 10.9 MBytes 92.0 Mbits/sec
[ 4] 4.00-5.02 sec 11.1 MBytes 92.2 Mbits/sec
[ 4] 5.02-6.01 sec 11.8 MBytes 99.4 Mbits/sec
[ 4] 6.01-7.00 sec 11.2 MBytes 95.0 Mbits/sec
[ 4] 7.00-8.01 sec 10.0 MBytes 83.4 Mbits/sec
[ 4] 8.01-9.01 sec 10.8 MBytes 89.6 Mbits/sec
[ 4] 9.01-10.01 sec 10.9 MBytes 91.3 Mbits/sec
[ 4] 10.01-11.01 sec 10.5 MBytes 88.4 Mbits/sec
[ 4] 11.01-12.00 sec 11.5 MBytes 97.3 Mbits/sec
[ 4] 12.00-13.01 sec 11.1 MBytes 93.0 Mbits/sec
[ 4] 13.01-14.01 sec 11.1 MBytes 92.8 Mbits/sec
[ 4] 14.01-15.01 sec 11.1 MBytes 93.6 Mbits/sec
[ 4] 15.01-16.01 sec 11.2 MBytes 94.4 Mbits/sec
[ 4] 16.01-17.01 sec 11.2 MBytes 94.0 Mbits/sec
[ 4] 17.01-18.00 sec 10.6 MBytes 89.8 Mbits/sec
[ 4] 18.00-19.01 sec 11.6 MBytes 97.0 Mbits/sec
[ 4] 19.01-20.01 sec 11.1 MBytes 93.1 Mbits/sec
[ 4] 20.01-21.00 sec 11.1 MBytes 94.1 Mbits/sec
[ 4] 21.00-22.00 sec 11.5 MBytes 96.7 Mbits/sec
[ 4] 22.00-23.01 sec 11.2 MBytes 93.4 Mbits/sec
[ 4] 23.01-24.00 sec 10.6 MBytes 89.9 Mbits/sec
[ 4] 24.00-25.00 sec 10.5 MBytes 88.0 Mbits/sec
[ 4] 25.00-26.01 sec 12.1 MBytes 101 Mbits/sec
[ 4] 26.01-27.01 sec 11.1 MBytes 93.2 Mbits/sec
[ 4] 27.01-28.01 sec 11.1 MBytes 93.5 Mbits/sec
[ 4] 28.01-29.01 sec 11.2 MBytes 94.2 Mbits/sec
[ 4] 29.01-30.02 sec 11.2 MBytes 93.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.02 sec 334 MBytes 93.4 Mbits/sec 144 sender
[ 4] 0.00-30.02 sec 333 MBytes 93.1 Mbits/sec receiver
CPU Utilization: local/receiver 47.8% (0.4%u/47.3%s), remote/sender 0.4% (0.0%u/0.4%s)
rcv_tcp_congestion cubic
Server output:
Accepted connection from 10.1.2.200, port 53738
[ 5] local 10.1.1.9 port 8888 connected to 10.1.2.200 port 53740
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 5] 0.00-1.00 sec 11.4 MBytes 95.4 Mbits/sec 0 460 KBytes
[ 5] 1.00-2.00 sec 11.1 MBytes 92.8 Mbits/sec 0 472 KBytes
[ 5] 2.00-3.00 sec 11.2 MBytes 94.3 Mbits/sec 0 501 KBytes
[ 5] 3.00-4.00 sec 11.5 MBytes 96.4 Mbits/sec 0 525 KBytes
[ 5] 4.00-5.00 sec 11.0 MBytes 92.3 Mbits/sec 0 576 KBytes
[ 5] 5.00-6.00 sec 11.5 MBytes 96.7 Mbits/sec 0 576 KBytes
[ 5] 6.00-7.00 sec 11.0 MBytes 91.9 Mbits/sec 0 576 KBytes
[ 5] 7.00-8.00 sec 10.8 MBytes 90.3 Mbits/sec 29 421 KBytes
[ 5] 8.00-9.00 sec 10.1 MBytes 84.4 Mbits/sec 51 225 KBytes
[ 5] 9.00-10.00 sec 11.2 MBytes 93.9 Mbits/sec 0 257 KBytes
[ 5] 10.00-11.00 sec 10.4 MBytes 87.3 Mbits/sec 0 287 KBytes
[ 5] 11.00-12.00 sec 11.1 MBytes 92.7 Mbits/sec 0 313 KBytes
[ 5] 12.00-13.00 sec 11.3 MBytes 94.7 Mbits/sec 0 332 KBytes
[ 5] 13.00-14.00 sec 11.3 MBytes 94.5 Mbits/sec 0 351 KBytes
[ 5] 14.00-15.00 sec 11.1 MBytes 93.0 Mbits/sec 0 366 KBytes
[ 5] 15.00-16.00 sec 11.4 MBytes 95.5 Mbits/sec 0 382 KBytes
[ 5] 16.00-17.00 sec 10.9 MBytes 91.7 Mbits/sec 0 395 KBytes
[ 5] 17.00-18.00 sec 11.3 MBytes 94.5 Mbits/sec 0 403 KBytes
[ 5] 18.00-19.00 sec 11.1 MBytes 92.9 Mbits/sec 0 407 KBytes
[ 5] 19.00-20.00 sec 11.6 MBytes 97.2 Mbits/sec 0 434 KBytes
[ 5] 20.00-21.00 sec 10.8 MBytes 90.7 Mbits/sec 0 448 KBytes
[ 5] 21.00-22.00 sec 11.3 MBytes 95.0 Mbits/sec 0 448 KBytes
[ 5] 22.00-23.00 sec 11.3 MBytes 94.8 Mbits/sec 0 574 KBytes
[ 5] 23.00-24.00 sec 11.4 MBytes 95.8 Mbits/sec 0 775 KBytes
[ 5] 24.00-25.00 sec 10.6 MBytes 88.6 Mbits/sec 64 379 KBytes
[ 5] 25.00-26.00 sec 11.0 MBytes 92.4 Mbits/sec 0 430 KBytes
[ 5] 26.00-27.00 sec 11.7 MBytes 98.0 Mbits/sec 0 447 KBytes
[ 5] 27.00-28.00 sec 10.9 MBytes 91.0 Mbits/sec 0 455 KBytes
[ 5] 28.00-29.00 sec 11.3 MBytes 95.0 Mbits/sec 0 460 KBytes
[ 5] 29.00-30.00 sec 11.4 MBytes 95.5 Mbits/sec 0 460 KBytes
[ 5] 30.00-30.05 sec 478 KBytes 74.9 Mbits/sec 0 460 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-30.05 sec 334 MBytes 93.3 Mbits/sec 144 sender
[ 5] 0.00-30.05 sec 0.00 Bytes 0.00 bits/sec receiver
iperf Done.
See Also
- https://www.mankier.com/1/iperf3
- Performance tuning - https://access.redhat.com/sites/default/files/attachments/20150325_network_performance_tuning.pdf