Menu

MS Windows

January 14, 2025

MS Windows Tuning

Note: We use Linux for our high-performance hosts, and don't have any MS Windows expertise in house. Please help us keep this page up to date by sending us updates. Thanks!

Windows 10/11 TCP Stack Modifications

The PowerShell utility is the primary mechanism for modifying TCP stack settings in modern versions of Windows. Detailed documentation can be found on the official Microsoft site: Set-NetTCPSetting PowerShell Documentation.

Example Command: Modify Initial Congestion Window and Congestion Control Algorithm

To adjust TCP settings, use the Set-NetTCPSetting command. For example, this command sets the custom TCP configuration to use an initial congestion window of 64 and enables Compound TCP (CTCP), an advanced congestion control algorithm similar to Cubic on Linux.

Set-NetTCPSetting -SettingName "Custom" -CongestionProvider CTCP -InitialCongestionWindowMss 64
  • InitialCongestionWindowMss: Specifies the initial size of the congestion window. Acceptable values are even numbers between 2 and 64.

Other Useful TCP Settings

1. AutoTuningLevelLocal

Adjusts the TCP auto-tuning level for the receive window, which optimizes throughput on high-latency, high-throughput networks. Use the following values to configure this setting:

  • Disabled: Keeps the TCP receive window at the default size.
  • HighlyRestricted: Allows limited growth of the TCP receive window beyond the default value.
  • Restricted: Allows slightly more growth than HighlyRestricted.
  • Normal: Enables the TCP receive window to grow dynamically for most scenarios.
  • Experimental (recommended): Optimizes the TCP receive window for extreme throughput scenarios.

2. Timestamps

Timestamps, as specified in RFC 1323, facilitate round-trip time measurement and mitigate issues like sequence number wrapping on high-throughput links.

Set-NetTCPSetting -SettingName "Custom" -Timestamps Enabled
  • Enabled (recommended)
  • Disabled

3. ECN Capability

Explicit Congestion Notification (ECN), defined in RFC 3168, allows TCP endpoints to detect and manage congestion without packet loss.

Set-NetTCPSetting -SettingName "Custom" -EcnCapability Enabled
  • Enabled: Uses ECN capability.
  • Disabled (recommended): Disables ECN.

Notes for Older Windows Versions (Vista/7/8)

    • Windows 10/11 supports larger maximum receive windows (up to 1 GB), compared to 16 MB in Vista/7.
    • CTCP is available and can be enabled using PowerShell for modern systems or with netsh on legacy systems:
netsh interface tcp set global congestionprovider=ctcp
    • Auto-tuning can also be disabled/re-enabled using netsh:
netsh interface tcp set global autotuninglevel=disabled
netsh interface tcp set global autotuninglevel=normal

Launching an Administrator Command Prompt

To execute these commands, administrative rights are required. Follow these steps to launch an administrator PowerShell or Command Prompt:

  1. Click Start.
  2. Search for PowerShell or cmd.
  3. Right-click the application and select Run as Administrator.
  4. Confirm any UAC prompts.

Known Issues

  • Windows Vista/7 TCP buffer defaults to 64 KB and cannot be adjusted. For high-throughput scenarios on LANs, this small buffer may throttle performance.

For more advanced tuning, review Microsoft's official TCP/IP documentation for specific scenarios.

Also see: