Measure bandwidth between two computers with iperf

If you want to get an estimate of bandwidth speeds between two machines, but you don’t want to factor in storage read/write speeds, iperf is the perfect tool.

Start the iperf in server mode on one end:

# /usr/bin/iperf -s

Run the iperf in client mode on the other and point it to the server:

# /usr/bin/iperf -c serverhostname

To test the speed on the end of the machine you designate as “server”, you need to make sure you run the client from a similar or faster connection. I played with different TCP window sizes from a few kilobytes to 128K and it didn’t really make much of a difference. It would help if your machines aren’t busy chatting with other hosts too.

warpspeed

From a client on a 100 megabit switch connecting to the server running on a gigabit connection:

————————————-
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————-
[ 4] local 10.1.1.3 port 5001 connected with 10.1.9.1 port 39550
[ 4] 0.0-10.1 sec 113 MBytes 93.7 Mbits/sec
[ 5] local 10.1.1.3 port 5001 connected with 10.1.9.1 port 39551
[ 5] 0.0-10.0 sec 67.9 MBytes 56.9 Mbits/sec
[ 4] local 10.1.1.3 port 5001 connected with 10.1.9.1 port 39552
[ 4] 0.0-10.0 sec 112 MBytes 94.0 Mbits/sec
[ 5] local 10.1.1.3 port 5001 connected with 10.1.9.1 port 39553
[ 5] 0.0-10.0 sec 112 MBytes 94.0 Mbits/sec

From another client machine with a gigabit connection on the same gigabit switch as the server:

————————————-
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
————————————-
[ 4] local 10.1.1.3 port 5001 connected with 10.1.9.2 port 40208
[ 4] 0.0-10.0 sec 1.04 GBytes 887 Mbits/sec
[ 5] local 10.1.1.3 port 5001 connected with 10.1.9.2 port 40209
[ 5] 0.0-10.0 sec 1.09 GBytes 939 Mbits/sec
[ 4] local 10.1.1.3 port 5001 connected with 10.1.9.2 port 40210
[ 4] 0.0-10.0 sec 1.04 GBytes 895 Mbits/sec
[ 5] local 10.1.1.3 port 5001 connected with 10.1.9.2 port 40211
[ 5] 0.0-10.0 sec 1.07 GBytes 919 Mbits/sec

Posted by admica   @   29 October 2009

Related Posts

1 Comments

Comments
Trackbacks to this post.
Leave a Comment

Name

Email

Website

Previous Post
« Load balancing network bonding device from multiple physical interfaces
Next Post
Brute force restarting of services on a machine under heavy load in response to the slashdot effect »
Powered by Wordpress   |   Lunated designed by ZenVerse