TCP Receive Window

from Wikipedia, the free encyclopedia

The TCP Receive Window (Size) , also short RWin or Window , English for " Receive Window (size) ", is, in addition to the Maximum Segment Size (MSS), a parameter that controls the function of the Transmission Control Protocol (TCP) network protocol . It describes the maximum amount of data that a computer can receive without having to confirm data. Conversely, it is therefore the maximum amount of data that can send a computer without an acknowledgment (TCP ACK , from the English. Acknowledgment = confirmation to wait) of the receiver. This ensures that the receiving memory ( buffer ) of the receiver does not overflow , as the receiver never receives more data at a time than allowed the sender by transmitting its current receive window size. Only when the receiver has confirmed data (and thus removed it from the buffer) does the sender send the next data.

If the reception window selected is too small, the sender often has to wait for confirmation packets in order to be able to send again, while a larger reception window allows the sender to send more continuously. For this purpose, in the event of an error, i.e. if packets have not been transmitted or are faulty, a larger amount of data must be transmitted again, namely all data that have already been sent but not yet acknowledged by the recipient, maximum the size of the receiving window. If the network quality is very poor, a smaller size of the receiving window can be more efficient.

In addition, the size of the reception window, together with the round trip time (RTT) between sender and receiver, determines the theoretically possible data throughput, which corresponds to the quotient of the two sizes.

Optimal value

Various magazines and instructions in Internet forums promise to get more speed out of a DSL connection by “ tuningRWin and a few other values . In practice, the achievable acceleration - with the exception of older operating systems with very broadband connections - is often negligible, since the default value, which is fixed by the operating system or has been determined automatically since Windows Vista, is appropriately dimensioned for common applications.

In Microsoft Windows 9x , Me, and NT , the receive window was 8 kilobytes by default  . Windows 2000 and XP reserve 16 kilobytes. Since Windows Vista and Windows Server 2008, the size of the receiving window is determined automatically based on the type and quality of the connection and can be up to 16 megabytes. This behavior, called "auto-tuning", can be switched off.

Until 2006, Deutsche Telekom recommended a RWin value of 16 or 32 kilobytes for T-DSL connections . For modem and ISDN connections, the value should not exceed 8 kilobytes.

Upper limit

In order to fully utilize the packet lengths and avoid IP fragmentation , an integral multiple of the Maximum Segment Size (MSS) is generally recommended for the receive window and the value is therefore often only given as a factor. The MSS in turn corresponds to the Maximum Transmission Unit (MTU) minus 40 bytes for the IP and TCP headers ( 60 bytes for IPv6 ), so that with an MTU of 1492 bytes (standard of most Internet service providers ), the MSS is 1452 bytes.

In the TCP header , 16 bits are provided for the RWin value, which corresponds to a maximum of 65,535 bytes. The largest integer multiple that is smaller than this upper limit, for example, for Ethernet with an MTU of typically 1500 bytes and a corresponding MSS of 1460 bytes results in a maximum RWin value of 44 × 1460 = 64,240 bytes. For ADSL connections, which reduce the segment size by 8 bytes in accordance with PPP over Ethernet , this results in a corresponding maximum RWin value of 45 × 1452 = 65,340 bytes.

TCP Window Scale Option

RFC 1323 describes a TCP Window Scale Option ( Window Scaling for short ) called extension of the TCP header , which allows the RWin value to be multiplied by a factor of up to 2 14 and thus to a maximum of 1 gigabyte to increase. In Microsoft Windows, this option has been available as an option since Windows 2000 and has been activated by default since Windows Server 2008, but limited to 16 megabytes. The option is transmitted when the connection is established and only takes effect if it is supported by both sides.

Individual evidence

  1. tecCHANNEL: Added value with DSL . April 9, 2002
  2. Script Soft: Internet Tuning under Windows 7 and Vista . November 16, 2009.
  3. a b TechNet Magazine: TCP Receive Window Auto-Tuning . January 2007.
  4. T-Com: Frequently asked questions about T-DSL . July 5, 2006
  5. SpeedGuide.net: Why does RWin need to be a multiple of MSS? (English)
  6. SpeedGuide.net: Why 64240 (or 65535) RWin? (English)
  7. Microsoft: Description of TCP properties in Windows 2000 and Windows Server 2003 . April 2007.

Web links