05/16/2007

Calculating real-time throughput between endpoints in a LAN.

Iperf is a program designed for the purpose of measuring TCP and UDP bandwidth. Iperf uses a client/server model for testing. For the purposes of your test, you'd set up a PC at one of the endpoints with iperf as a server, and at the other end, you'd use iperf as a client.

When run in UDP mode, iperf is testing the maximum amount of bandwidth between the client and a server. iperf provides a few different sections of output. These sections are the incremental output, the summary output, and the server output. The incremental output is useful as it shows you that yes, the program is in fact running, along with its current output speeds. The summary output shows the summary of the entire test - how much data was pushed and at what speed. The server output shows how much data the server received, and the rate at which it was received (which is calculated based on the total amount of data received, divided by the time of the test from start to finish). The server output is critical for UDP testing since UDP has no guarantee of delivery.

What does this mean to you? You need the summary output to be able to tell how fast the machine you were running the test from was able to generate traffic. This is critical as if the machine can't generate sufficient traffic, then we aren't testing the full capacity of the link, which is what we are trying to do. On the other hand, you can't use the summary results to tell you how the link tested, since its just reporting how much data it was able to dump and not how much data was received. Thats where the server summary output comes into play. The server summary tells you how much data arrived at the server, and then calculates the rate (or bandwidth used) by dividing that number by the amount of seconds used in the test.

So if you are doing a 100mbit test (FastE speeds), but have only a DS3 (45mbit) between your host and the server, while the summary output may tell you 90mbit/sec, the server is only going to tell you 40-43mbit/second. The other traffic was discarded by the router since the link (DS3) was full and there was no buffer space. Such is how UDP works, being connectionless, stateless, and having no guarantee of delivery.

When run in TCP mode, iperf is testing the total throughput of the connection - how quickly you will be able to push data via TCP across the link, from client to server. This differs from the total bandwidth available, since TCP is a connection oriented and stateful protocol, with error correction. Every packet sent needs to be ack'd, and only so many packets will be sent before the sender starts holding packets until it receives acks.

Output from a TCP test is similar to the UDP test, however, you only have the incremental and summary output; TCP being TCP, the client is able to determine how many packet drops there were by how many retransmits it needed to perform.

When testing, be sure to use the -d (dualtest, do bidirectional testing simultaneously) or the -r (dualtest, do bidirectional testing sequentially) options, so you are measuring available bandwidth in both directions (it isn't always the same).

HOTFIX AND PATCHES

IM me

Sponsors

Search

  • Google

My Online Status

Sponsor

.