Recent Topics

Ads

Nagle's Algorithm

Chat about everything else - ask questions, share stories, or just hang out.
User avatar
zabis
Posts: 1215

Nagle's Algorithm

Post#1 » Thu Dec 29, 2016 7:12 pm

Just recently came across this: https://en.wikipedia.org/wiki/Nagle's_algorithm
Any experts mind weighing in on this? Will disabling this help with performance for RoR?
Soulcheg wrote:Want mirrored classes - play chess.
Genisaurus wrote:You are not entitled to Best-in-Slot gear just because you log on.
#266

Ads
User avatar
blaqwar
Posts: 471

Re: Nagle's Algorithm

Post#2 » Thu Dec 29, 2016 8:05 pm

I always had Leatrix Latency Fix (which does the registry editing for you) applied back when I was playing WoW but can't say I've seen much of a difference between before and after. I never had latency issues though and since it didn't seem harmful I always used it whenever I reinstalled Windows. I believe I've also had those registry settings applied when I switched to WAR.

I'm not sure if it's still needed on Win10.

Edit: Actually looking it up it seems it's still useful:
Spoiler:
Disable Nagle's algorithm (Gaming)

Nagle's algorithm is designed to allow several small packets to be combined together into a single, larger packet for more efficient transmissions. While this improves throughput efficiency and reduces TCP/IP header overhead, it also briefly delays transmission of small packets. Disabling "nagling" can help reduce latency/ping in some games. Keep in mind that disabling Nagle's algorithm may also have some negative effect on file transfers. Nagle's algorithm is enabled in Windows by default. To implement this tweak and disable Nagle's algorithm, modify the following registry keys.

This setting configures the maximum number of outstanding ACKs:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{NIC-id}
There will be multiple NIC interfaces listed there, for example: {1660430C-B14A-4AC2-8F83-B653E83E8297}. Find the correct one with your IP address listed. Under this {NIC-id} key, create a new DWORD value:
TcpAckFrequency=1 (DWORD value, not present by default interpreted as 2, 1=disable, 2=default, specifies number of outstanding ACKs before ignoring delayed ACK timer). For gaming performance, recommended is 1 (disable). For pure throughput and data streaming, you can experiment with small values over 2. Wifi performance may see a slight improvement with disabled TcpAckFrequency as well.

In the same location, add a new DWORD value:
TCPNoDelay=1 (DWORD value, not present by default, 0 to enable Nagle's algorithm, 1 to disable)

To configure the ACK interval timeout (only has effect if nagling is enabled), find the following key:
TcpDelAckTicks=0 (DWORD value, not present by default interpreted as 2, 0=disable nagling, 1-6=100-600 ms). Note you can also set this to 1 to reduce the nagle effect from the default of 200ms without disabling it.

For Server Operating Systems that have Microsoft Message Queuing (MSMQ) installed, or if you have the MSMQ registry hive present, also add TCPNoDelay to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters
TCPNoDelay=1 (DWORD, not present by default, 0 to enable Nagle's algorithm, 1 to disable)
Taken from here.

Who is online

Users browsing this forum: wiscel and 10 guests