Question & Answer
Question
How do I use iperf to benchmark network bandwidth?
Answer
Iperf is a simple-to-use benchmark tool that tests network speeds. It supports a wide array of options and is one of the few tools that has multi-threading built in. It is the only tool found that is capable of generating packets fast enough to test 10gig.
Location: /opt/nz-hwsupport/pts/network-tools/iperf3
Instructions
Set up a server.
[root@server]# ./iperf3 -s
-------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 256 KByte (default)
Run iperf with 5 threads connecting to the server IP address from step 1. Sample output is below:
Note: Replace 5 with the number of threads the user application will use for more accurate simulation
[root@client]# ./iperf3 -c <SERVER IP ADDR> -P 5
------------------------------------------------------------
Client connecting to 192.168.1.200, TCP port 5001
TCP window size: 256 KByte (default)
------------------------------------------------------------
[ 7] local 192.168.1.50 port 40464 connected with 192.168.1.200 port 5001
[ 3] local 192.168.1.50 port 40460 connected with 192.168.1.200 port 5001
[ 4] local 192.168.1.50 port 40461 connected with 192.168.1.200 port 5001
[ 5] local 192.168.1.50 port 40462 connected with 192.168.1.200 port 5001
[ 6] local 192.168.1.50 port 40463 connected with 192.168.1.200 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 5.0 sec 1.03 GBytes 1.77 Gbits/sec
[ 6] 0.0- 5.0 sec 1.16 GBytes 1.99 Gbits/sec
[ 7] 0.0- 5.0 sec 1.16 GBytes 1.99 Gbits/sec
[ 5] 0.0- 5.0 sec 1.03 GBytes 1.77 Gbits/sec
[ 3] 0.0- 5.0 sec 1.03 GBytes 1.76 Gbits/sec
[SUM] 0.0- 5.0 sec 5.42 GBytes 9.25 Gbits/sec
Location: /opt/nz-hwsupport/pts/network-tools/iperf3
Instructions
Set up a server.
[root@server]# ./iperf3 -s
-------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 256 KByte (default)
Run iperf with 5 threads connecting to the server IP address from step 1. Sample output is below:
Note: Replace 5 with the number of threads the user application will use for more accurate simulation
[root@client]# ./iperf3 -c <SERVER IP ADDR> -P 5
------------------------------------------------------------
Client connecting to 192.168.1.200, TCP port 5001
TCP window size: 256 KByte (default)
------------------------------------------------------------
[ 7] local 192.168.1.50 port 40464 connected with 192.168.1.200 port 5001
[ 3] local 192.168.1.50 port 40460 connected with 192.168.1.200 port 5001
[ 4] local 192.168.1.50 port 40461 connected with 192.168.1.200 port 5001
[ 5] local 192.168.1.50 port 40462 connected with 192.168.1.200 port 5001
[ 6] local 192.168.1.50 port 40463 connected with 192.168.1.200 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 5.0 sec 1.03 GBytes 1.77 Gbits/sec
[ 6] 0.0- 5.0 sec 1.16 GBytes 1.99 Gbits/sec
[ 7] 0.0- 5.0 sec 1.16 GBytes 1.99 Gbits/sec
[ 5] 0.0- 5.0 sec 1.03 GBytes 1.77 Gbits/sec
[ 3] 0.0- 5.0 sec 1.03 GBytes 1.76 Gbits/sec
[SUM] 0.0- 5.0 sec 5.42 GBytes 9.25 Gbits/sec
[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
NZ060560
Was this topic helpful?
Document Information
Modified date:
25 October 2019
UID
swg21576189