TCP Optimal Window Size Calculator

Calculate the optimal TCP window size needed to maximize throughput based on your link speed and network latency.

Tip: Common RTT values: Local network (0.001s), Regional (0.01s), Cross-country (0.05s), International (0.1s)

📊 Calculation Results

â–¼
TCP Window Size:
-
TCP Window Size:
-
Formula: Bandwidth (bps) × RTT (seconds) ÷ 8 = TCP Window (Bytes)

System Configuration Changes

Each operating system requires different configuration changes to adjust the TCP receive window.

Windows XP

  • Open regedit.exe
  • Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  • You can change the TcpWindowSize and GlobalMaxTcpWindowSize

Please note that several other factors in transfer performance can be adjusted on the same page. Please visit Microsoft for additional details.

Windows 7, 8, and 10

  • Open regedit.exe
  • Browse to HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  • You can change the GlobalMaxTcpWindowSize

Please note that several other factors in transfer performance can be adjusted on the same page. Please visit Microsoft for additional details.

Linux

As there are several variants of Linux not all the configuration options are described below. However the following commands may assist you. First to view the current configured network settings use:

  • cat /proc/sys/net/ipv4/tcp_mem
  • cat /proc/sys/net/core/rmem_default
  • cat /proc/sys/net/core/rmem_max
  • cat /proc/sys/net/core/wmem_default
  • cat /proc/sys/net/core/wmem_max
  • cat /proc/sys/net/core/optmem_max

To edit the configuration:

  • sysctl -p /etc/sysctl.conf
  • sysctl -w net.core.rmem_max=8388608
    • Configures the maximum OS receive buffer size
  • sysctl -w net.core.wmem_max=8388608
    • Configures the maximum OS send buffer size
  • sysctl -w net.core.rmem_default=65536
    • Configures the default OS receive buffer size
  • sysctl -w net.core.wmem_default=65536
    • Configures the default OS send buffer size

Please note that these values are not necessarily the final settings you want to use. If you have a Redhat enterprise support or Ubuntu enterprise support they can assist further.

Note: 65,535 bytes is historically the maximum value. However IETF RFC 1323 accommodates larger sizes.