-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I noticed the following network tweaks were added when using the competitive gaming option:
REM Disable Nagle Algorithm (reduces input lag)
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" /v TcpAckFrequency /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" /v TCPNoDelay /t REG_DWORD /d 1 /f
The first key turns off delayed acks, however, this is a per interface setting - putting it in the Interfaces key itself won't do anything, it must be under the interface GUID (see https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/registry-entry-control-tcp-acknowledgment-behavior). Further, this setting is only really useful in situations where a TCP-based game is still using Nagle's algorithm, where the two interact poorly - Nagle wants to delay sending until it receives an ack, and delayed ack is delaying that ack (https://brooker.co.za/blog/2024/05/09/nagle.html). However, the few games still using TCP (typically MMOs) correctly set TCP_NODELAY these days, so trading off the potential of a game misusing TCP for higher ack overhead for all TCP connections on the system is debatable these days.
The second key is snake oil - there is no global way to turn off Nagle's algorithm in Windows, it must be done per application via socket options. This recommendation has been passed around for years under various keys, stemming from a misunderstanding of the Microsoft Message Queue service which does have a registry entry to disable its own use of Nagle's algorithm (https://support.microsoft.com/en-us/topic/fix-tcp-ip-nagle-algorithm-for-microsoft-message-queue-server-can-be-disabled-74ba2f6a-e558-d1df-1c60-57b0fab68ccc), but that has no impact outside of the MSMQ service.