<

Testing Network Performance

Published on
13,109 Points
4,809 Views
8 Endorsements
Last Modified:
Approved

Introduction


Many times we come across a slowness or instability between two hosts, and almost always we blame the poor networking guys, just because they're an easy target.  Sometimes we forget that other factors including disk bottlenecks, CPU overload or software may be the cause of the software.  Conversely, network engineers may automatically discount your claims by asking you to do a PING test.  It replied?  Well then, there is no network problem.

We're going to provide both the infrastructure team and networking team a very useful tool to help discount potential causes - and at the same time, providing a valuable tool to measure true network throughput between two hosts.

The tool of my choice is IPERF, and this article is going to teach this.

Why IPERF?


There are many other methods in which to calculate network performance - I myself have written an application to read a file from a network share to memory to test network performance, but that in itself is a flawed test because I may be limited by the Disk I/O of the source server.  Protocol overhead for storage protocols such as SMB/CIFS/NFS/NCP also affects my metering.

Some people rely purely on PING responses to test the stability of a network link, but this isn't good enough.  The standard packet size for a PING is 48 bytes, and although you can increase this, the delay between pings is insufficient to catch instability.

IPERF gets rid of these potential bottlenecks and tests at a pure TCP/IP level - talking directly to the winsock layer.

How it works


Simply put, IPERF runs as a listener on one machine, and you initiate a client on another.  The client will establish a communication between itself and the server, and then try to send as much data as it possibly can in a predetermined length of time (default is 10 seconds).

Here is the client:

Client

here is the server:

Server
As you can see the speeds are almost identical at both ends.  Why the small difference?  It all has to do with timing and buffering, but rest assured you're still getting a fairly accurate reading.  The speed you see there seems to be very poor, but rest assured, it's quite good considering it's switched gigabit.  Had these two machines been back to back hard wired (no switch involved) it would have been faster.

Playing with Options


Run iperf with the --help switch. You will see many options which may further aid in troubleshooting.  For example, I can improve my performance by selecting a larger TCP Window size.  A window size of 8 KB means that the client sends 8 KB of data to the server, and waits for a reply to say that the data was received.  It then sends another 8 KB chunk.

Imagine what would happen if we sent a 64 KB chunk?  Oh wait, we don't have to imagine, here's the result!

 Client Truer Speed
As you can see, the result is much truer to the actual capability of the network link.

Another option that is useful is the -t option - to increase the time of the test.  We're going to combine this option with the -i option - to tell the application to report every 10 seconds.  Our command line is therefore going to be this:

iperf -c <client ip address> -t 60 -i 10

Open in new window

the -t specifies 60 seconds, and the -i tells to report every 10 seconds.

Here is the result.

Client Longer Test
The above test can give a better averaging result - if there are occasional drops on the network, you may have to run the test for a while to track down how bad the network is affected during the problems.

Tips


Be sure that there are no firewalls blocking the machines.  If there is, then open inbound TCP port 5001 to the server.
Try and avoid doing this during business hours if there is a vital link which you intend to test.  Your organization will feel it.
You can install and run this as a service/daemon so that it's always running on a dedicated server

Where to Get


IPERF was originally designed for Linux, and can be obtained from http://sourceforge.net/projects/iperf/.  It may be included in your distribution - try apt-get install iperf if you have a Debian/Ubuntu distribution

IPERF is included in FreeBSD as a port - cd to /usr/ports/benchmarks/iperf and then do a make install clean

And finally, IPERF has very kindly been compiled and provided as a Win32 application by our good friends at the Computer Services & Telecommunications department of the University of Central Florida, and can be downloaded from their dedicated IPERF page, https://publishing.ucf.edu/sites/itr/cst/Pages/IPerf.aspx
8
Comment
3 Comments
 
LVL 15

Expert Comment

by:Eric AKA Netminder
Lester_Clayton,

Congratulations; your article has been published.

ericpete
Page Editor
0
 

Expert Comment

by:rdenoyer
Neat.. thanks!
0
 
LVL 18

Expert Comment

by:LesterClayton
Iperf Windows version moved to http://www.cst.ucf.edu/resources/iperf/
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Join & Write a Comment

In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month