Router Charts

Router Charts

Router Ranker

Router Ranker

Router Chooser

Router Chooser

NAS Charts

NAS Charts

NAS Ranker

NAS Ranker

More Tools

More Tools

LAN & WAN How To

Free and openly available, Iperf is a command line tool useful for measuring network performance. In my last post, I introduced some basic command line instructions to run Iperf between two endpoints and showed how the tool can be used to generate and measure both TCP and UDP performance. This time, I'll discuss Iperf's graphical cousin: Jperf.

Jperf, as shown below, is a free Java-based GUI tool that performs all the functions as Iperf, available for download here. For those who prefer graphical output and point and click functionality, Jperf is certainly welcome!

Installation is a breeze, it is simply a matter of downloading the file and decompressing it. Additionally, make sure you've installed Java and edit your firewall settings, as discussed previously.

Jperf screenshot
Click to enlarge image

Figure 1: Jperf screenshot

Using Jperf between two endpoints is as simple as choosing Server mode on one endpoint and Client mode on the other. You'll enter the URL or IP of the Server on the endpoint in Client mode. Finally, you'll click the Run Iperf! button which I've circled in diagram above on the Server and on the Client to perform a test.

Jperf is just a frontend to Iperf, so it performs the same tests and is interoperable with Iperf. You can even run Jperf as one end point and Iperf on the other. Notice that clicking various options in the graphical Jperf produces the Iperf command line sequence on the top of the display, also circled in the diagram above.

TCP is the commonly-used Layer 4 protocol for network applications like HTTP, FTP and SMTP. TCP manages an application's network performance by controlling how much data is sent in each packet (MSS), how many packets are sent before receiving an acknowledgment (Window Size) and how much memory is allocated to send and receive traffic flow buffers (Buffer Length). TCP is like a shipping company defining how much weight can be loaded in each box, how many boxes go on each truck and how many boxes can sit in the loading docks at either end.

There are numerous other capabilities and features to Iperf/Jperf. For example, we can adjust the values in Jperf for Buffer Length, Window Size and MSS and see the impact the changes have on throughput. Adjusting these values is as simple as selecting the parameter in the GUI, and using the up/down arrows to adjust the values as I've circled below.

Jperf TCP Settings
Click to enlarge image

Figure 2: Jperf TCP Settings

As stated on the Iperf website, "the most fundamental tuning issue for TCP is TCP Window Size, which controls how much data can be in the network at any one point." A reader commented on my last blog (Thanks!) that changing the TCP Window Size from the default value of 8KByte to 64KByte over a Gigabit LAN showed nearly a 3x increase in throughput. Interestingly, throughput gains with higher Window Sizes can be seen even over remote network connections.

On a recent business trip, I used Jperf to experiment with various TCP Window Size settings from a hotel network to my home LAN, producing Table 1 below. I adjusted the Window Size on my laptop using values of 1, 4, 8(=default), 16, 32, 56 and 64KBytes, and ran each test 3 times. All throughput results below are in Kbps.

Jperf Remote Throughput test results

Table 1: Jperf Remote Throughput test results

As you can see, I had varying, but lower throughput using Window Sizes from 1-8 KBytes, ranging from 696-751 Kbps. However, increasing the Window Size to 16, 32, 56 and 64KBytes produced increasing throughput, peaking at 2168 Kbps with a Window Size of 64 KBytes.

There are situations where reducing Window Size may also improve TCP throughput. Since TCP is a reliable protocol, it will retransmit lost data. On a slower network with more retransmissions due to packet loss, throughput may improve by sending smaller amounts of data between acknowledgments, which will minimize retransmissions.

In addition to adjusting Window Size, MSS and Buffer Length values can also be adjusted, and their effects on TCP throughput can be observed. I'll leave details on these options to a future blog. However, I do want to touch on the issue of units of measurement and how to normalize data between those units.

Storage and throughput are measured differently. Storage and file sizes are measured in bytes (1 byte = 8 bits) and commonly use binary units, with K indicating 1,024 (=2^10), M indicating 1,048,576 (=2^20), and G indicating 1,073,741,824 (=2^30).

Network throughput is measured in bits and commonly use metric units, or what is known as an SI unit (SI is French for International System of Units), with K indicating 1,000 (=10^3), M indicating 1,000,000 (=10^6), and G indicating 1,000,000,000 (=10^9).

So let's say you're trying to optimize your network for file transfer capability, and want to estimate how long file transfers will take per Gigabyte of data. Using Jperf, you can measure your expected throughput in kilobits per second. Let's say your expected throughput is 2168 kilobits per second as measured in the above table using 64K Window Sizes.

First, convert Gigabytes to bits. 1 Gigabyte is 2^30 bytes, and each byte is 8 bits, so 2^30*8 coverts Gigabytes to bits. Then, divide by the throughput rate in bits to get the total seconds it will take to transfer each Gigabyte. The math looks like this:

((2^30)*8)/(1/2168000)= 3962 seconds, or over 66 minutes per Gigabyte!

If "doing the math" isn't your deal, then Jperf's throughput measurements can be adjusted from bits to bytes per second by selecting the desired unit in a drop-down list as shown in Figure 3. For example, measuring network performance in kilobytes per second would eliminate converting bytes to bits and simplify the above equation.

Adjusting Jperf output format

Figure 3: Adjusting Jperf output format

The gist of this post was to demonstrate the use of Jperf to measure network performance. Measuring network performance isn't all that difficult, as I've shown with both Iperf and Jperf. As I've stated in various product reviews, it is useful to have objective measurements to evaluate or benchmark a network.

If you're considering adding a new router or switch to your network, do before and after tests to objectively determine the impact the new device has on your LAN. If you don't see improvement, you might want to check your configurations and consider the value of the device you just installed. If you do see improvement, Jperf test results can provide numerical evidence of the positive impact you just had on your LAN!

In the last post of this series, I'll look at how tweaking other iperf/jperf parameters can affect performance.

More LAN & WAN