Tips how to reduce latency

If you haven't already, you can disable Nagle Algorithm from your registry.Since you'll be messing with your registry, it's up to you whether or not you want to.Before I tell you how to disable Nagle, let me tell you what it is.

Nagle Algorithm is a system which restricts the number of packets being sent to and from a network. Ping is then determined by the amount of time the packets are sent over a network. Disabling Nagle Algorithm equates to more packets being sent over a network, which equates to lower ping.

Alright now. Even if you didn't understand any of that, here are the steps:

======For Vista Users=======
1. Go to the Start Menu.
2. Type "regedit.exe" or just "regedit" (No quotations).
3. Browse to HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
4. Look for a folder that contains your LOCAL IP ADDRESS under the Data column. The folder that it's in should be named similar, but not restricted to {1C3DE298-6536-4E3B-8BE6-457838544F56}. If there are more than 1 folders that contain your local IP, follow steps 5~8 in those folders.
5. Go to [Edit]-[New]-[DWORD (32-bit) Value]
6. Name the new file TcpAckFrequency. This is CaSe SeNsItIvE.
7. Right Click on TcpAckFrequency and select [Modify]
8. Set the Value Data to 1 and check off Hexadecimal.
9. Restart your computer.
=========================


========For XP Users========
1. Go to Start Menu.
2. Click the "Run" button.
3. Type in "regedit.exe" and hit enter. (No quotations)
4. Browse to HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
5. Look for a folder that contains your LOCAL IP ADDRESS under the Data column. The folder that it's in should be named similar, but not restricted to {1C3DE298-6536-4E3B-8BE6-457838544F56}. If there are more than 1 folders that contain your local IP, follow steps 6~9 in those folders.
6. Go to [Edit]-[New]-[DWORD (32-bit) Value]
7. Name the new file TcpAckFrequency. This is CaSe SeNsItIvE.
8. Right Click on TcpAckFrequency and select [Modify]
9. Set the Value Data to 1 and check off Hexadecimal.
10. Restart your computer.
=========================

You may or may not notice a difference in performance, but the restriction is gone, and as long as you don't change computers, other online games should run with Nagle disabled. Those who are very close to the server should feel very minimal changes, though they will feel a big change if they are trying to communicate to a server that's overseas.


=========================
Another thing you can do to speed up your computer a little bit is adding the key TcpNoDelay to the registry. The process is the same for both Vista and XP so here goes:

1. Right click your desktop.
2. Select New > Notepad Document
3. Copy and paste this into the notepad.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters]
"TCPNoDelay"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\OCMsetup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\Security]
"SecureDSCommunication"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\setup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Setup][HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters]
"TCPNoDelay"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\OCMsetup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\Security]
"SecureDSCommunication"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\setup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Setup]

4. Go to File > Save As
5. Save the name as "NoDelay.reg" (No quotes)
6. Look for a file on your desktop that looks like a defragmenting box.
7. Right click the file and select MERGE.
8. If you don't notice a difference, try to restart your computer.

As stated already, this won't change your ping very dramatically, or at all. However, for some people, it will change a little bit.

Credit to Zephyre (Dragonica Online) for useful tips.

2 comments:

Anonymous said...

x membantu sgt dlm garena though.... T_T

Jason Policy said...

I believe that the parameter on XP is "TcpACKFrequency" (uppercase, as found in tcpip.sys); but I checked with a sniffer and it does not appear to be case-sensitive on Server 2003 SP1. I can't discount that it is on other versions though.

Raising the value causes TCP slow-start to become slightly slower, while also decreasing the packet count. With an odd value (for testing), I can see that an ACK is emitted some time after the initial burst of packets.

Post a Comment