In association with heise online

20 February 2008, 15:02

Tweaking TCP/IP

Christoph Lüders, Martin Winkler

A closer look at tuning tips (and not just for Windows)

image 1 [248 x 155 Pixel @ 9,4 KB]
Even though the speed of broadband connections keeps increasing, one disparity is becoming ever more obvious -- Windows PCs often fail to achieve maximum possible transfer rates on cable and ADSL connections. Dropouts can also interfere with VoIP telephony. Many suggestions for resolving these problems can be found doing the rounds on internet forums. Some are useless, some may even be harmful. But there are tricks which really do put your PC in the fast lane.

Windows doesn't provide utilities for diagnosing the causes of problems such as dropouts during VoIP telephony or halting transmission and low throughputs despite very fast DSL connections. In principle there are three possible sources of delay - the computer's TCP/IP settings may be wrong, one or more elements of the internet connection may be overloaded or, in the absence of overall traffic direction, data from different internet applications running simultaneously may interfere to slow data transmission.

The TCP settings which affect speed aren't accessible from the Windows GUI - they're hidden away in the registry. For this reason, most PCs run on autopilot and spotting incorrect settings requires an expert. We've collected together the most important TCP/IP settings that you can change in the registry and recommended settings under [anchorlink finetuning]fine tuning[/anchorlink].

Kick-starting your downloads

One reason for slow downloads on PCs with fast connections is that the window size, known as RWIN on Unix systems, which controls the quantity of data sent by the TCP/IP stack is too small . During a download this can lead to a server waiting for acknowledgements from the recipient more frequently than is actually necessary, so that a part of the connection capacity remains unused.

Internet users have no influence over server settings. Administrators may well deliberately choose a low setting in order to serve as many subscribers as possible simultaneously or to prevent server overload.

The server must provide a memory buffer of the selected window size for each TCP connection. For high use servers with modest amounts of memory the window size is limited to ensure that the server is able to get by with the available RAM. Internet service was for a while limited to 30kB per TCP connection and some gaming servers still use this method to limit demo access.

Where throughput per TCP connection is limited by the use of small window sizes, download managers can be of assistance. They open multiple connections simultaneously and download a file in multiple segments.

By contrast, if it's the window size on the local computer which is too small, this can be increased in the registry. Tuning utilities, of which there are many (e.g. T-Online's Speedmanager), take care of such settings automatically. A large window size can, however, increase latency, so that some care is required when changing this setting. A rule of thumb for optimising download settings can be found under fine tuning.

Far more common is the case that surfers themselves slow down a fast server by using one or more internet applications which utilise upstream capacity on the DSL connection in parallel to the download - this is because data sent by local applications impedes the transmission of acknowledgement packets (ACK packets), and without ongoing acknowledgements the download becomes slower.

The throughput throttles table shows the symptoms which arise in this case - ping times vary substantially according to the situation and uploads put the skids on simultaneous downloads.

The reason for this is that on the internet all packets compete for the available bandwidth in an uncoordinated, first come, first served fashion. Further, in contrast to telephone networks, there is no switched end to end connection, rather the packets are simply routed hop to hop until they reach their destination.

By taking different routes to their destination, the packets travel at different speeds and, if intermediate routers are overloaded, packets can go missing. The TCP protocol is generally able to deal with both situations thanks to a sophisticated flow control system. Internet users generally remain unaware of what is going on under the covers – complicated signaling, packet losses, dwell times and resent packets – merely registering the end result of disappointing throughput.

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit