Quickly Test Network Speed Between Two Servers

Quickly discovering the speed between two Linux servers can often be a chore of copying large files around.

There is a better way with iperf.

iperf can be used to quickly setup a server and client process on two Linux servers and report the max network throughput between them.


Run the following command on the server machine:

iperf -s -i 10


On the client run the following command:

iperf -i 10 -c <SERVER>


Every 10 seconds the measured network speed will be printed on the client and server. Here is the server’s output on my test machine:

# iperf -s -i 10
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
[  4] local port 5001 connected with port 36172
[ ID] Interval       Transfer     Bandwidth
[  4] 0.0000-10.0000 sec  2.27 GBytes  1.95 Gbits/sec
[  4] 0.0000-10.0163 sec  2.27 GBytes  1.84 Gbits/sec
[  4] 0.0000-10.0163 sec  2.27 GBytes  1.95 Gbits/sec

I’m getting a speed of ~1.9Gbits/sec between these machines.