Measuring Network Performance – Jperf and TCP, Part 2

Photo of author

Doug Reid

iperfIn the last part of our series, we’ll use Jperf results to make changes to a PC to improve network performance.

Having introduced Iperf and Jperf, as well as covering details on TCP throughput tests by adjusting Window Size values, it’s time to complete this series with comments on adjusting MSS and Buffer Length values. I’m also going to touch on using the results of Jperf testing to make changes to a PC to improve network performance.

Buffer Length

Buffers are memory allocated to network interfaces to store and queue packets prior to being transmitted or as they’re received. Adjusting Buffer Length can have an impact on TCP throughput as it affects network utilization. A Buffer Length that is too small may result in underutilization of the network due to the system waiting for packets to transmit, while too large of a Buffer Length can add network delay as the buffers are filled and emptied.

I ran Jperf TCP throughput tests with various Buffer Lengths remotely over a WAN connection (Table 1), as well as over my LAN (Table 2). I adjusted the Buffer Length on my laptop using values of 4, 8(=default), 16, 32, 64, 128, 512KBytes, and ran each test 3 times and calculated an average value. All throughput results below are in Kbits/sec.

Buffer Length (Bytes) – WAN Testing

Trial

4K

8K

16K

32K

64K

128K

512K

1

1184

1241

2674

2302

2721

2813

2719

2

1274

1501

2651

2802

2808

2817

2722

3

1275

1520

2438

2821

2803

2713

2734

AVG

1244

1420

2587

2641

2777

2781

2725

Table 1: Buffer Length Test – WAN

Buffer Length (Bytes) – LAN Testing

Trial

4K

8K

16K

32K

64K

128K

512K

1

136514

176469

217341

275592

276823

278079

279335

2

130702

170338

209606

277556

274919

279231

278498

3

140195

175848

222288

278472

277922

275462

278917

AVG

135804

174218

216412

277207

276555

277591

278917

Table 2: Buffer Length Test – LAN

As you can see, throughput improves both over a WAN connection and over my LAN as Buffer Lengths increase above the default value of 8KB, reaching peak performance at 32-64K. However, Buffer Lengths above 64k didn’t seem to produce any significant gains.

MSS

MSS, or maximum segment size, defines how much data is sent in each packet. In my discussion a couple months back on Jumbo Frames, I noted “the payload at Layer 4 is the MSS, or maximum segment size, and is typically 1460 bytes. Add the TCP/IP header of 40 bytes and we have the Layer 3 MTU, or maximum transmission unit of 1500 bytes”.

As I concluded in my Jumbo Frame discussion, increasing payload size can have positive impact over Gigabit or faster networks, assuming all endpoints, routers, and switch(es) in the transmission path are Jumbo Frame enabled.

Note that even though your NIC may run at Gigabit speed, it may not support Jumbo Frames. For example, both my laptop and desktop PCs have Gigabit NICs, yet my laptop’s Gigabit NIC doesn’t have options for larger frame sizes. Below, you can see the Control Panel Network Interface configurations available for my laptop (left) and desktop (right). Further, you can see the Jumbo Frame option (circled) on the right doesn’t exist on my laptop. Without Jumbo Frame capability, my Gigabit capable laptop is limited to an MSS of 1460 bytes.

Jumbo NIC controls

Jumbo NIC controls

With only 1 endpoint that supports Jumbo Frames, running Jperf tests with larger MSS sizes won’t work on my network, as the frames sent in the tests would be fragmented to the smallest max supported frame size of my endpoints, which is 1460.

If you’re running multiple PCs on a LAN that support Jumbo Frames and the switch between them supports Jumbo Frames, enable Jumbo Frame support on all three and try increasing the MSS size in Jperf up to 9k to see the impact on throughput. As demonstrated in my previous post, running Jperf tests with different values is as simple as point and click to change a test value. We’d love to see your results, please feel free to post them to this blog.

Windows Registry

With the results from Jperf testing providing optimal parameters for TCP throughput, it is possible to intelligently modify configurations on the actual devices, such as the PCs and Servers that are sending and receiving TCP data flows. Most PC and Server Operating Systems automatically manage TCP and UDP parameters. Still, adjusting these parameter can improve performance.

For a Windows XP PC, adjusting TCP transmission parameters is done via the Windows Registry. Note, working with the Registry is a potentially dangerous activity! Making a mistake in the Registry can crash a PC! With that said, if you take a few precautions, such as back up the Registry, and work step by step, editing the Registry isn’t difficult.

Microsoft has a nice guide for backing up and restoring both an XP and Vista Registry, located here. It’s always a good practice to backup files before changing them, so making a Registry backup is certainly advisable. I also recommend printing Microsoft’s restore process, that way you’ve got hard copy in the event of a problem. Finally, I recommend creating a Windows restore point before you edit the Registry, giving you a current good fall-back point.

Accessing the Registry is by clicking Start-Run and typing regedit, or from the command line by typing regedit. TCP/IP settings are in the directory listed as HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters. Below is a screen shot of my registry directory. As you can see, the TCP Window Size is an adjustable parameter.

Windows Registry TCP/IP Parameters

Windows Registry TCP/IP Parameters

Making changes to a registry value is done via this Registry Editor tool. To make Registry changes, change the value, in hexadecimal, to the desired new value. Due to the risks associated with changing the registry, I strongly recommend you refer to a guide such as Microsoft’s guide for changing TCP registry values on an XP PC here.

Using this guide, though, we see the values entered for TCP Window Size are hexadecimal values. Thus, to increase the TCP Window Size on my XP PC to 64K, I would change the registry value to 0xffff, which is the hexadecimal equivalent of 64k.

The bottom line here is it is possible to improve network throughput through the use of free software and adjusting existing values on network devices. Jperf is a powerful, yet openly available network measurement tool to help identify optimal values for networked PCs and Servers. These optimal values can then be applied to a network computer via the Control Panel or Registry, resulting in better network performance, for free!

Related posts

How To Remotely Connect Safely And Securely

Gettting secure access to your network when you're away is easy when you have the right stuff.

Taming Your Network’s Bandwidth Hogs – Part 1

Most consumer routers are no help in controlling bandwidth black holes. But in the first part of our series, we look at a router distro that can provide some easy relief.

How To Set Up Switch Link Aggregation

Link aggregation is easy to set up and is a quick fix for bandwidth bottlenecks.