Skip to content

Instantly share code, notes, and snippets.

@AlphaKR93
Last active July 6, 2024 12:39
Show Gist options
  • Save AlphaKR93/cb0be4a0ae09284e32e9818bc065204a to your computer and use it in GitHub Desktop.
Save AlphaKR93/cb0be4a0ae09284e32e9818bc065204a to your computer and use it in GitHub Desktop.
Disable Nagle Algorithm

Simple script that disables Nagle algorithm

Why?

  • See: Official Microsoft Document
  • TL;DR: The Nagle algorithm uses a queue to transmit packets, which can cause a delay of about 300ms, which is extremely fatal to gamers.

Usage

Just open PowerShell and run: (Automatically requesting administrator privileges)

iwr 'https://gist.githubusercontent.com/AlphaKR93/cb0be4a0ae09284e32e9818bc065204a/raw/run.ps1?cachebust=&' | iex
Start-Process 'powershell' -Verb 'runAs' -WindowStyle 'Hidden' -ArgumentList {@('CurrentControlSet','ControlSet001')|%{$i=$_;@('Tcpip','Tcpip6')|%{Get-ChildItem "HKLM:\SYSTEM\$i\Services\$_\Parameters\Interfaces"|%{$_.Name.Replace('HKEY_LOCAL_MACHINE','HKLM:')|%{$j=$_;@('TcpAckFrequency','TcpNODelay')|%{New-ItemProperty -Path "$j" -Name "$_" -PropertyType 'DWORD' -Value '1' -Force > $null}}}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment