Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Pingle

Pingle is a PowerShell helper for conservative Windows networking and gaming tweaks. It measures your latency before and after every run, applies a short list of evidence-backed changes aimed at reducing latency, and backs everything up with a full undo path.

The tweak list is deliberately small. Every change is either documented by Microsoft as latency-relevant or measurable in practice; classic "tweak guide" items with no evidence (or with documented harm) were removed — see What Pingle deliberately does NOT do.

WARNING: The script modifies network settings and the registry. Test in a VM or non-production machine first.

Key features

  • Latency measurement built in: min/avg/max/jitter/loss to 1.1.1.1 is sampled before and after every apply run and saved as JSON in the backup folder, so you can see whether anything actually improved.
  • TcpAckFrequency=1 per interface — the Microsoft-documented delayed-ACK fix. This is the headline tweak for TCP games (Minecraft Java, many MMOs); it removes up-to-200 ms ACK stalls. Requires reboot. (Most shooter netcode is UDP and is unaffected by TCP tweaks — Pingle tells you this rather than pretending otherwise.)
  • Safe MTU probing: locale-independent binary search using .NET Ping with Don't-Fragment. Timeouts and blocked ICMP are never mistaken for success; if the path can't be probed cleanly, MTU is left alone.
  • Adapter tweaks with real effects: Interrupt Moderation off (Microsoft-endorsed for lowest latency; costs some CPU), Energy-Efficient Ethernet off, and NIC power management off via the supported Disable-NetAdapterPowerManagement cmdlet.
  • MMCSS fix: NetworkThrottlingIndex=0xFFFFFFFF and SystemResponsiveness=10, so Windows stops throttling non-multimedia packets to ~10/ms while audio/video plays (the classic "Discord open = higher ping" problem). Requires reboot.
  • TCP template hygiene: AutoTuning Normal, ECN enabled, scaling heuristics off. These repair old snake-oil tweaks and help latency-under-load on modern AQM routers.
  • RSC disabled globally (trades a little throughput CPU for lower receive latency, per Microsoft NIC tuning guidance). RSS stays enabled.
  • Wi-Fi awareness: if your active adapter is Wi-Fi, Pingle warns that wireless retries/scans cause latency spikes no registry tweak can fix, and points you at a bufferbloat test and router SQM (fq_codel/CAKE) — which is where the big latency-under-load wins actually live.
  • Process priority control: match by name, command-line substring, or executable path; optional persistence via a logon scheduled task that polls, so it catches games launched at any time (default level: AboveNormal).
  • Full per-run backups and an undo/restore path.

Opt-in extras

  • -SetDns — set Cloudflare DNS (1.1.1.1, 1.0.0.1) on connected adapters. Off by default: DNS affects lookup time only (never in-game ping), and silently overriding DHCP/Pi-hole/enterprise DNS is not a safe default.
  • -DisableGameDVR — turn off Xbox Game Bar background capture (GameDVR_Enabled=0, AppCaptureEnabled=0). Reclaims GPU headroom and reduces frame-time spikes. Game Mode itself is left ON (current guidance says keep it).
  • -ApplyVideoTweaks — set AFD FastSendDatagramThreshold=64000. Marginal for games; harmless; requires reboot.

What Pingle deliberately does NOT do

Earlier versions (and most "gaming tweak" guides) include changes that current Microsoft documentation and measurement say are useless or harmful. Pingle removed them:

  • No IPv6 unbinding / adapter binding "cleanup." Microsoft explicitly recommends against disabling IPv6 (unsupported configuration; breaks Xbox networking, Happy Eyeballs, and increasingly fast native-IPv6 paths). If IPv6 routing is genuinely bad on your line, the supported lever is the prefer-IPv4 prefix policy, not unbinding.
  • No checksum-offload or LSO disabling. Microsoft guidance: checksum offloads should always be enabled (they're prerequisites for RSS/RSC). Neither engages on small game packets, so disabling them buys ~0 latency and costs CPU.
  • No InitialRto/MaxSynRetransmissions changes. The old values (2000/2) were strictly worse than the Windows 11 defaults (1000/4) — a regression shipped as an optimization.
  • No TCPNoDelay/TcpDelAckTicks registry keys. Per-interface TCPNoDelay is not read by the modern stack (the only documented location is MSMQ's), and games that care set TCP_NODELAY on their own sockets (Minecraft has since 1.8.1). TcpDelAckTicks died with Windows 2000.
  • No TCP Chimney toggling. The feature was removed from Windows in 1709.
  • No blanket "disable anything matching Offload/Power" regex sweeps over vendor advanced properties (they hit things like ARP/NS offload and break Modern Standby wake).

Requirements

  • Windows 10/11 (Windows 11 recommended).
  • Run elevated: the script will relaunch itself as Administrator if necessary (preserving your parameters).
  • Some features require the NetTCP/NetAdapter cmdlets (present on Windows 10/11 with PowerShell 5.1 or 7+).

Safety notes

  • The script prompts to reboot by default at the end of a run. Use -NoReboot to skip the prompt. TcpAckFrequency, MMCSS, and AFD changes only take effect after a reboot — re-check your latency numbers afterwards.
  • Backups are created automatically before making changes; every run creates a timestamped folder under %LOCALAPPDATA%\PingBatBackups\<timestamp>\.
  • To restore the most recent backup use .\ping.ps1 -Undo. Some restored settings may still require a reboot to fully take effect.

Usage

Run the script from an elevated PowerShell prompt, or run it normally and allow it to relaunch elevated when prompted.

Basic apply (measures latency, applies core tweaks, measures again):

powershell -ExecutionPolicy Bypass -File .\ping.ps1

With the opt-in extras, skipping the reboot prompt:

powershell -ExecutionPolicy Bypass -File .\ping.ps1 -SetDns -DisableGameDVR -ApplyVideoTweaks -NoReboot

Restore the most recent backup:

powershell -ExecutionPolicy Bypass -File .\ping.ps1 -Undo

Command-line switches

  • -Undo : Restore the most recent backup (prompts before applying).
  • -NoReboot : Suppress the final reboot prompt.
  • -SetDns : Set Cloudflare DNS on connected adapters (off by default).
  • -DisableGameDVR : Disable Xbox Game Bar background capture (off by default).
  • -ApplyVideoTweaks : Set AFD FastSendDatagramThreshold (off by default).
  • -WhitelistAdapters : Adapter names to exclude from adapter-level changes.
  • -SetGamePriority : Set process priority immediately.
  • -PriorityProcess : Identifier used to match target processes (default javaw).
  • -PriorityMatchMode : Name | CommandLine | ExecutablePath (Name accepts game or game.exe).
  • -PriorityLevel : Normal | BelowNormal | AboveNormal | High (default AboveNormal; High can starve audio/system threads).
  • -PersistPriority : Create a logon scheduled task that keeps reapplying the priority (polls every 60 s, so it catches games launched later and relaunches).

Examples

  • Set running javaw processes to AboveNormal priority:
powershell -ExecutionPolicy Bypass -File .\ping.ps1 -SetGamePriority -PriorityProcess "javaw" -PriorityMatchMode Name
  • Use command-line matching to target a specific instance and make priority persistent:
powershell -ExecutionPolicy Bypass -File .\ping.ps1 -SetGamePriority -PriorityProcess "minecraft" -PriorityMatchMode CommandLine -PriorityLevel AboveNormal -PersistPriority
  • Everything on, skip reboot prompt:
powershell -ExecutionPolicy Bypass -File .\ping.ps1 -SetDns -DisableGameDVR -ApplyVideoTweaks -SetGamePriority -PriorityProcess "game.exe" -PriorityMatchMode Name -PriorityLevel High -PersistPriority -NoReboot

Adapter whitelist

Provide adapter names to skip adapter-level changes:

powershell -ExecutionPolicy Bypass -File .\ping.ps1 -WhitelistAdapters "Ethernet","Wi-Fi"

Undo / restore

Restore the most recent backup (prompts before applying):

powershell -ExecutionPolicy Bypass -File .\ping.ps1 -Undo

To remove the persistent priority task and helper script (if created):

Unregister-ScheduledTask -TaskName 'PingBat_SetProcessPriority' -Confirm:$false
Remove-Item -Path 'C:\ProgramData\PingBat\SetProcessPriorityHelper.ps1' -Force -ErrorAction SilentlyContinue

Backups and logs

  • Each run writes a backup folder in %LOCALAPPDATA%\PingBatBackups\<timestamp>\ containing Adapters.json, NetTCPSetting.json, NetOffloadGlobal.json, DnsClientServerAddress.json, latency_before.json / latency_after.json, a regbackups directory with .reg exports, and a run log.
  • Log filenames used by the script: apply_run.log (normal apply) and restore_run.log (undo/restore). A top-level ping_run.log may also be present.

Beyond this script: the tweaks that matter most

Honest ordering of what actually reduces gaming latency, biggest first — the first two can't be done from a Windows script:

  1. Fix bufferbloat at the router. If your ping rises when someone uploads/streams, enable SQM/Smart Queue (fq_codel/CAKE) on your router, shaped to ~90% of line rate. This is worth 10–100+ ms under load. Test: https://www.waveform.com/tools/bufferbloat
  2. Use Ethernet instead of Wi-Fi. Wireless retries, roaming and background scans cause periodic 50–300 ms spikes.
  3. TcpAckFrequency=1 (this script) — for TCP games only.
  4. Power management (this script): NIC power save off, EEE off; consider the High Performance power plan.
  5. MMCSS network throttling off (this script) — helps when game + voice/video run together.

Contributing

Contributions welcome. Test changes in a VM first, include measurements (the built-in before/after JSON makes this easy), and cite documentation for any new tweak — no folklore.

License

Pingle is licensed under the MIT License. See LICENSE for details.

About

Windows 11 network tuning and gaming-optimization utility (PowerShell)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages