TCP Window Size Auto-Tuning in Windows 2000

Microsoft Windows 2000 does not implement true real-time, continuous TCP Receive Window auto-tuning; instead, it uses an automated initial calculation to set the sliding window size during connection establishment. While modern Windows versions dynamically adjust the window size throughout the life of a connection based on bandwidth-delay product (BDP), Windows 2000 calculates an optimal static size upon connection setup and maintains that baseline unless throttled by standard TCP flow and congestion control algorithms.

Initial Window Size Determination

When a connection is established in Windows 2000, the TCP/IP stack automatically calculates the default receive window (TcpWindowSize) based on the Maximum Segment Size (MSS) negotiated during the three-way handshake:

  • MSS Multiples: The stack rounds the window size up to an even multiple of the network MSS.
  • Link Speed Thresholds: The operating system sets baseline maximums according to connection speed. For slower connections, the default is set to a minimum of 8 KB (or 4 times the MSS). For high-speed connections, the default scales up to 16 KB, 32 KB, or 64 KB, capped at 65,535 bytes without scaling extensions.
  • Auto-Sensing Ceiling: The automated calculation generally caps the unscaled receive window at the maximum 16-bit field limit (65,535 bytes) to avoid buffer exhaustion and maintain compatibility with standard network equipment.

RFC 1323 and Window Scaling Extensions

Because standard TCP headers limit window sizes to 65,535 bytes, Windows 2000 relies on RFC 1323 (TCP Extensions for High Performance) to support larger sliding windows on high-bandwidth, high-latency links.

  • Negotiation: Window scaling is not enabled universally by default for all adapters; it must be negotiated during the initial SYN packet exchange.
  • Scale Factor: If negotiated, both endpoints agree on a scale factor that bit-shifts the 16-bit window size field, allowing window sizes of up to 1 GB.
  • Static Nature: Once the scale factor is established during the initial handshake, Windows 2000 does not dynamically increase or decrease the scaling factor mid-session.

Registry Overrides and Manual Adjustments

System administrators can override the automated calculation by defining explicit parameters within the registry under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters:

  • TcpWindowSize: Sets the receive window for individual interfaces or globally. If this value is explicitly configured, it overrides the system's automated calculation entirely.
  • GlobalMaxTcpWindowSize: Sets an absolute upper boundary for the TCP window across all connections.
  • Tcp1323Opts: Controls RFC 1323 support. A value of 0 disables window scaling and timestamps, 1 enables window scaling only, 2 enables timestamps only, and 3 enables both features.

Through these mechanisms, Windows 2000 automates the initial sizing of the sliding window to match the negotiated packet size, but relies on static limits and manual configuration rather than continuous, runtime auto-tuning.