How to Configure TCP Congestion Window Restart (CwndRestart) in Windows 11 Using PowerShell

In standard Transmission Control Protocol (TCP) specifications (RFC 5681), when an active connection experiences a period of inactivity that exceeds the current Retransmission Timeout (RTO), the sender cannot accurately estimate the state of the network path. During the idle period, intermediate routers may have become congested, or bottleneck bandwidth may have dropped. To protect the internet from line-rate packet bursts, standard TCP dictates that the sender must discard its previously expanded congestion window (cwnd) and restart transmission using the slow-start algorithm from the initial congestion window size.

This mechanism is known as Congestion Window Restart (CWND Restart). While essential for protecting public networks, CWND Restart causes severe performance penalties for modern distributed applications that utilize long-lived, persistent HTTP/2, HTTP/3, gRPC, database connection pools, or server-sent events (SSE). After an idle gap of just a few hundred milliseconds, the application is throttled back to slow-start speeds, triggering unexpected latency stalls. Windows 11 provides native controls within PowerShell’s NetTCPIP module to manage and toggle the CwndRestart parameter across network templates.

Understanding CWND Restart Mechanics and Network Impact

When an application transmits data continuously, TCP congestion algorithms (such as CUBIC or CTCP) expand the congestion window to match available bandwidth-delay product (BDP). If a burst of queries completes and the socket goes dormant for longer than one RTO (typically 200–300 ms), the kernel network stack must choose between two strategies:

  • CwndRestart = True (Default RFC 5681 Behaviour): The kernel collapses cwnd back to the initial window (typically 4 to 10 segments). When new data arrives, the sender must undergo multiple round-trip time (RTT) handshakes during slow start before regaining maximum line rate.
  • CwndRestart = False (Optimised Persistent Mode): The kernel retains the expanded congestion window across idle periods. When the application resumes transmission, it dispatches data at full line rate immediately without slow-start throttling.

In enterprise data centres, local 10GbE LANs, and high-frequency database replication clusters, disabling CwndRestart yields dramatic throughput improvements for bursty, transactional workloads.

Inspecting Current CwndRestart Configurations in PowerShell

To inspect whether Congestion Window Restart is currently active across your Windows 11 network templates, launch an elevated PowerShell session (Run as Administrator) and execute Get-NetTCPSetting:

Get-NetTCPSetting | Select-Object SettingName, CwndRestart, CongestionProvider, AutoTuningLevelLocal | Format-Table -AutoSize

To inspect the detailed attributes of the default client template (Internet) and high-speed data centre template (Datacenter):

Get-NetTCPSetting -SettingName "Internet", "Datacenter" | Select-Object SettingName, CwndRestart, MemoryPressureProtection, PacingProfile

A typical output displays the active boolean settings:

SettingName CwndRestart MemoryPressureProtection PacingProfile
----------- ----------- ------------------------ -------------
Internet    True        Disabled                 InitialCwnd
Datacenter  False       Disabled                 Offload

Notice that Microsoft pre-configures Datacenter with CwndRestart = False to optimize low-latency cluster communication, whereas the client Internet profile defaults to True.

Disabling CwndRestart Using Set-NetTCPSetting

To prevent slow-start restarts across persistent connections, configure the CwndRestart parameter using Set-NetTCPSetting.

Disabling CwndRestart on Custom Internet Profiles

Windows 11 protects the default Internet template from direct modification on certain consumer editions. The supported enterprise pattern is configuring the InternetCustom profile:

Set-NetTCPSetting -SettingName "InternetCustom" -CwndRestart False

To apply this customized profile to all standard outbound internet connections:

Set-NetTransportFilter -SettingName "InternetCustom" -ApplyProfile Yes

Enabling Non-Restart Mode Across Data Centre and Development Workloads

If you run local Hyper-V virtual switches, Docker/WSL2 containers, or database servers utilizing the Datacenter or Compat templates, ensure CwndRestart is explicitly set to False:

Set-NetTCPSetting -SettingName "Datacenter" -CwndRestart False
Set-NetTCPSetting -SettingName "Compat" -CwndRestart False

To disable CWND restart universally across all configured network templates in a single pipeline command:

Get-NetTCPSetting | Set-NetTCPSetting -CwndRestart False

Confirm the new configuration has taken effect:

Get-NetTCPSetting | Select-Object SettingName, CwndRestart

Configuring Adapter-Level Idle Congestion Settings via Registry

For dedicated storage or database adapters (such as iSCSI or SMB Direct over RDMA/TCP), you can verify and set underlying TCP/IP parameters directly in the Windows Registry.

Open an elevated PowerShell console and inspect the TCP/IP parameters key:

$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
Get-ItemProperty -Path $RegPath -Name "EnableCwndRestart" -ErrorAction SilentlyContinue

To enforce non-restart behaviour system-wide at the kernel driver layer:

Set-ItemProperty -Path $RegPath -Name "EnableCwndRestart" -Value 0 -Type DWord

Restart the network adapter to ensure the NDIS driver and TCP/IP stack reload the registry configuration:

Restart-NetAdapter -Name "Ethernet"

Validating Throughput Stability and Benchmarking Keep-Alive Sessions

After setting CwndRestart to False, validate that persistent connections do not suffer slow-start drops following idle pauses.

You can benchmark connection burst behaviour using PowerShell by initiating an HTTP keep-alive request, pausing for 2 seconds (exceeding standard RTO), and issuing a subsequent request:

$Session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
# First request: Expands CWND
Measure-Command { Invoke-RestMethod -Uri "https://speed.cloudflare.com/__down?bytes=10000000" -WebSession $Session }

# Idle pause exceeding RTO
Start-Sleep -Seconds 2

# Second request: Measures whether transfer achieves instant line rate
Measure-Command { Invoke-RestMethod -Uri "https://speed.cloudflare.com/__down?bytes=10000000" -WebSession $Session }

With CwndRestart disabled, the second transfer completes significantly faster because the sender bypasses the slow-start ramp-up phase.

Reverting to Default Windows 11 CWND Restart Settings

If your device frequently operates over congested, low-bandwidth mobile hotspots or public Wi-Fi networks where aggressive line-rate bursts cause packet drops on intermediate routers, re-enable standard RFC restart behaviour:

Set-NetTCPSetting -SettingName "InternetCustom" -CwndRestart True
Get-NetTCPSetting | Set-NetTCPSetting -CwndRestart True

To remove registry overrides:

Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "EnableCwndRestart" -ErrorAction SilentlyContinue
Restart-NetAdapter -Name "Ethernet"

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.