TCP tuning

From Wikipedia, the free encyclopedia

TCP tuning techniques adjust some parameters of TCP connection over high-bandwidth high-latency networks.

Observation, the "wizard gap" - people with well tuned networks perform 10x to 1000x as fast as ordinary users, especially on high speed (gigabit and beyond) networks.


Contents

[edit] Technical introduction

[edit] Network and system characteristics

[edit] Bandwidth-delay product (BDP)

Bandwidth × delay product (BDP) is a term primarily used in conjunction with the TCP to refer to the number of bytes necessary to fill a TCP "path", i.e. it is equal to the maximum number of simultaneous packets in transit between the transmitter and the receiver. TCP has a concept of windows which are used for congestion control and for determining the optimum size of packet that is resilient to packet loss, packet truncation (due to link layer maximum transmission unit) or reordering.

High performance networks have very large BDPs. To give a practical example, in the case of two satellites located 0.5 light-seconds apart, communicating over a radio link with a bandwidth of 10Gbit/second, there will be at most 0.5×10e9 = 5Gbits = 625MB of data in the space between them. Operating systems and protocols designed as recently as a few years ago when networks were slower were tuned for BDPs of orders of magnitude smaller, with implications for tuning.

[edit] Buffers

The original TCP configurations supported buffers of 64K Bytes, which was adequate for slow links or links with small round trip times (RTTs). Larger buffers are required by the high performance options described below.

Buffering is used throughout high performance network systems to handle delays in the system. In general, buffer size will need to be scaled proportional to the amount of data "in flight" at any time. For very high performance applications that are not sensitive to network delays, it is possible to interpose large end to end buffering delays by putting in intermediate data storage points in an end to end system, and then to use automated and scheduled non-real-time data transfers to get the data to their final endpoints.

[edit] TCP Networking Options for High Performance

  • RFC 2018 - TCP Selective Acknowledgment Options
  • RFC 1323 - TCP Extensions for High Performance
  • Maximum Buffer Sizes on the host
  • Application Buffers
  • Path MTU
  • TCP receive window (Rwin)

[edit] External links