Iperf - Simulating VOIP Traffic for UberNerds

Written by John Riordan - ⏱ 2 minute read

Iperf - Simulating VOIP Traffic for UberNerds

VoIP Resources VoIP Fundamentals Developer Blog

Have you ever wanted to hammer a part of your network or a particular system to get an empirical view of its performance characteristics under a VOIP load? Are you someone who is compelled to understand how things work in grim detail, even if the things in question are tedious in the extreme - like network performance measurement? If not, don't feel bad. As it was explained to me, "Not everyone who visits the blog is an UberNerd, or aspires to UberNerdity, but on the other hand those who display UberNerditude in the comment threads are treated with a respect bordering on lunacy. That’s just the way we are."

If you are an UberNerd like me, you may be interested in the topic of this post - a great little testing tool called Iperf which I recently had the opportunity to pull out of my UberNerd toolbox and use again. A quick look at voip-info.org should make clear that designing even a simple VOIP platform can be something of a black art. This is particularly true once you step outside a single vendors sandbox. In designing any platform, an understanding of the characteristics and limits of the individual components that will make up the platform is critical. And while mathematics, physics, and white boards are the basic engineering tools in any such design endeavor, at the end of the day some real world testing and data collection can be invaluable - and given (in many cases) the lack of readily available pertinent data, this is particularly true when it comes to VOIP platform design.

When testing components of a VOIP platform, Iperf can be quite handy. Quoting from the Iperf documentation, "Iperf creates a constant bit rate UDP stream. This is a very artificial stream, similar to voice communication but not much else." While it operates in TCP mode by default, simply adding the UDP flag (-u) to all the commands will flip Iperf into a more suitable mode and adjusting the datagram size (-l) to 250 gives a close approximation to 20ms g711.

Run Iperf on one system in server mode (-s) and on another in client mode (-c) and within seconds it starts spitting out nice reports on bandwidth, jitter, and loss. Finding the upper limit of system and network components is as simple turning up some of the Iperf dials (-b and -S among others) and waiting for jitter and dropped packets to show up. While it cannot provide the whole picture, combine Iperf data with the output of system monitoring tools like vmstat and an empirical baseline of how a system will behave in the face of VOIP traffic begins to materialize. So I recommend considering Iperf next time you are adding to your UberNerd toolbox.