Thursday, December 10, 2009

Fix your WOW Lag NOW

I know some people hate going to sites like wowinterface but this is a must have script for all WoW gamers!

 Download the script!

What does it do?



Leatrix Latency Fix will reduce your World of Warcraft latency significantly by increasing the frequency of TCP acknowledgements sent to the game server. For the technically minded, this is a script which will modify TCPAckFrequency.



You will also see reduced latency in other online games such as Aion, Warhammer and Lord of the Rings. The average reduction in latency (based on feedback from comments) is 66%. Click the Change Log tab above to see a summary of player feedback.



System Requirements



Leatrix Latency Fix is supported on these operating systems only.


  • Windows XP (SP2 or higher)
  • Windows Vista (SP1 or higher)
  • Windows 7
Both 32-bit and 64-bit versions of Windows are supported.

Macintosh users should read the relevant section in the FAQ below.





Installation Instructions



In the download, you'll find 3 script files - Install, Remove and Checker. Simply run the Install script and follow the prompts (as shown here).



If you're logged into your computer with an account which doesn't have Administator privileges (or you're using Windows Vista or Windows 7 with User Account Control enabled), you'll be prompted to enter the credentials of a user account which has Administrator privileges (as shown here).



After the installation, you should see a confirmation window (as shown here). Simply do what it says and restart your computer. If you don't see a confirmation window, or have any other problems with any of the scripts, read the FAQ below.



Once you've restarted your computer, you can login to Wow with reduced latency!



If you want to be sure that Leatrix Latency Fix is installed at any time, run the Checker script and it'll tell you (as shown here). To uninstall Leatrix Latency Fix, run the Remove script.



I recommend that you read this entire page to better understand the process and hopefully any questions you may have will be answered in the FAQ.



How It Works



Wow uses the TCP protocol which requires that network segments sent to your computer be acknowledged in order to provide a reliable connection.



Windows bundles these acknowledgements together and sends them in pairs. While this is an efficient way of dealing with them generally, the inevitable delays caused by the bundling process increase latency considerably.



This is because when Windows queues up an acknowledgement in order to bundle it with the following one, the game server has to wait for the acknowledgement timer to expire before sending new data.



Leatrix Latency Fix removes the acknowledgement bundling process so that an acknowledgement is sent immediately for every segment that's received. This produces a significant reduction in latency as there is no longer a delay before new data is sent to your computer.



In a normal networking environment, you would prioritise network efficiency over latency and use the Windows defaults, but in Wow the opposite is true and you want the lowest latency you can possibly get.



Typical Scenario



If you could listen to a conversation between your computer and the game server, this is what you would hear.



Before Leatrix Latency Fix is installed:
  • Server: "Ok computer, I just sent a data packet over to you, got it?"
  • Your computer: ...
  • Server: "Come on, answer me! I don't have all day!"
  • Your computer: ...
  • Server: "Ok, forget it, I've waited long enough, sending another one over! Got it?"
  • Your computer: "Yep, got that one, also got the one you sent before, thanks."
  • Server: "Well, why didn't you acknowledge the first one when I sent it? I was waiting ages!"
  • Your computer: "Sorry, I'm just trying to make the network more efficient by bundling the acknowledgements together in pairs."
  • Server: "Nevermind efficiency, this isn't a corporate domain you know. You do realise that the longer you take to acknowledge a packet, the more time I have to spend waiting around instead of sending more data?"
  • Your computer: "Well sorry but this is how I'm setup by default."
After Leatrix Latency Fix is installed:

  • Server: "Ok computer, I just sent a data packet over, got it?"
  • Your computer: "Yep, send the next!"
  • Server: "That was fast! Ok, here's another, got that?"
  • Your computer: "Yep, send the next!"
  • Server: "Wow! What an improvement! Now that's more like it! Much better than giving me the silent treatment so I am forced to wait for acknowledgement timeouts, isn't it?
  • Your computer: "Yep, it's certainly keeping me on my toes, thanks!"
Frequently Asked Questions



Got a question? You may find it's already been answered below.



The TcpAckFrequency Change

  • Isn't this the infamous TCP ACK fix?

    Yes, but it's packaged in a neat little script which will make the required changes for you, so you don't need to go messing about with the registry.
  • Doesn't more acknowledgements mean more upload bandwidth used?

    Leatrix Latency Fix doesn't produce more acknowledgements. It produces more frequent acknowledgements.



    Windows, by default, sends two acknowledgements for every two segments received. Leatrix Latency Fix sends one acknowledgement for every segment received. The number of acknowledgements sent in either case is the same, it's only the frequency which is different. The only additional upload bandwidth used is for packet headers.
  • Didn't Blizzard disable this already?

    This is a common misconception but the answer is no. What Blizzard did was disable nagling, way back in patch 2.3.2.



    Nagling bundles small packets together into larger ones for more efficient transmission. The effects are similar - bundling packets together always produces higher latency which is why it's bad for online games. Blizzard disabled nagling because of this, however, the acknowledgement queueing system used by the TCP protocol remains.



    For the technically minded, Blizzard made the TCPNoDelay function redundant, as Wow now includes it by default. They didn't change TcpAckFrequency. Leatrix Latency Fix changes that.
  • The displayed latency is lower but in-game latency is the same isn't it?

    As previously stated, when the game server sends data to your computer, the faster that your computer acknowledges that data, the faster the next lot of data is sent.



    Leatrix Latency Fix makes your computer acknowledge packets immediately, so subsequent data is sent to your computer in the shortest possible time. Anyone who thinks that this doesn't produce a genuine reduction in latency has failed to understand this simple process.



    The in-game latency stat is accurate. However, the amount of latency reduced and how much you notice the benefits depends on your connection and what your character is doing in the game world (since some activities will produce much more traffic than others).
  • Doesn't Wow use UDP for game data?

    No, Wow uses TCP port 3724 for game data and TCP port 1119 for Battle.net authentication. You can prove this to yourself by blocking all outgoing UDP traffic on your computer/router but keeping TCP ports 3724 and 1119 open, the game will still work. But if you block TCP ports 3724 and 1119 then it won't work, it doesn't matter whether UDP ports are open or not.
  • Is Leatrix Latency Fix against the World of Warcraft terms of service?

    Of course not, it's a local change to your computer's network configuration, nothing more. It's completely safe to use and it's nothing to do with Blizzard at all, or any other game publisher.
  • Does Leatrix Latency Fix work with tunneling services?

    Using LLF with a tunneling service probably won't give you any benefit, so you should decide to go with one or the other. There really is no way to find out which works best for you other than trying both yourself. The results really depend on a number of factors which are unique to your connection.



    But be aware. Tunneling services are essentially proxy servers which are rerouting game traffic and your account may be banned if you use these services because Blizzard may interpret your network routing to be suspicious.



    The Terms of Service state that "You agree that you shall not, under any circumstances..redirect the communication protocols used by Blizzard Entertainment in any way.., including.. tunneling.. or any other techniques.. including.. network play utilizing commercial or non-commercial gaming networks. All connections to the Game and/or the Service, whether created by the Game Client or by other tools and utilities, may only be made through methods and means expressly approved by Blizzard Entertainment."



    So use tunneling services at your own risk.



    Leatrix Latency Fix, on the other hand, is a local change to your computer's network configuration and is not against the Terms of Service.
Your Computer

  • Will Leatrix Latency Fix damage my computer? Can I remove it?

    There's a removal script included in the download which will completely erase all traces that Leatrix Latency Fix was ever installed. This isn't one of those scripts that changes all of your network settings and you have to reinstall Windows to get things back to normal. The installation script makes a simple change. The removal script reverses that change. You have nothing to lose.
  • Are there any down sides to running Leatrix Latency Fix?

    Your PC will process acknowledgements faster so it will have to work a bit harder. This may produce a small drop in framerates.



    Remember that Windows networks aren't designed for online games. They're designed for general desktop computing in large networks where traffic efficiency has the highest priority. In these environments, network latency isn't important at all and bundling acknowledgements together makes sense.



    However, Wow players are rather unique in that they'll often use a single TCP based application (the game client) for hours at a time and they'll want to give that application priority over any other function of their PC. It's for these players that Leatrix Latency Fix is designed for.



    Leatrix Latency Fix should not be installed on computers where you want to put more emphasis on network efficiency. Fortunately, this doesn't apply to most Wow players and having reduced latency is of considerably more importance.
  • Does Leatrix Latency Fix work with wireless networks?

    Yes, but for the best latency you should be using a wired connection to your router. Wireless connections have additional overheads and are subject to interference and signal quality. They also can't carry as much data as wired networks which can be a hindrance to the way that Leatrix Latency Fix works. If in doubt, install Leatrix Latency Fix and see for yourself. It won't break anything and there's a removal script included if you need it.
  • Does Leatrix Latency Fix work with routers?

    Of course. The router only forwards packets between your computer and the game server. It doesn't control what packets are forwarded. If your computer acknowledges every single TCP segment or every other TCP segment, it makes no difference, the router will just do what it's told.



    However, routers use a buffering system for forwarding packets and the increased frequency of acknowledgements sent to the game server may cause this buffer to fill up, which will give you lag spikes. This is more likely to happen if you have multiple computers connected to your router, or you're running network intensive applications in the background while playing Wow. There really is no way to find out whether your router will do this other than to try LLF for yourself.
  • Does Leatrix Latency Fix work with any other games?

    Leatrix Latency Fix modifies the way in which Windows handles acknowledgements to TCP segments. As such, it will affect any application that you have installed which uses the TCP protocol to transfer data. A lot of games use UDP so won't be affected but for the games that use TCP (such as World of Warcraft and Aion), you should see a significant reduction in latency.
  • Is there a Macintosh version?

    Leatrix Latency Fix isn't supported on Macs. However, you can achieve lower latency in OSX by entering the following command in a terminal window. This will disable delayed acknowledgements until you restart your computer.



    sudo sysctl -w net.inet.tcp.delayed_ack=0



    To disable them permanently, create a text file under "/etc/" called "sysctl.conf" and copy/paste the following line then restart your computer.



    net.inet.tcp.delayed_ack=0



    To set things back to default, just delete the "sysctl.conf" file and restart your computer.



    If you're not familiar with /etc, it's actually a symbolic link which goes to /private/etc. This is a hidden root folder which isn't normally visible in the Finder.



    To be able to see hidden folders in the Finder, open up a terminal window and type the following:



    defaults write com.apple.finder AppleShowAllFiles TRUE



    Then restart the Finder. To do that, hold down the option key then click and hold on the Finder icon in the dock. When the context menu appears, click Relaunch and the Finder will restart. You should now see all the hidden folders in the Finder, including /etc (either find the Symbolic Link or the actual folder which is inside /private).



    When you're done and you want to hide the hidden folders again, bring up a terminal window and enter the following:



    defaults write com.apple.finder AppleShowAllFiles FALSE



    Then restart the Finder in the same way as before. The hidden folders should now be hidden again.



    Hidden folders contain critical system configuration files so be careful that you don't delete or move anything by mistake while they are visible in the Finder.
The Leatrix Latency Fix Script File

  • I use Windows Vista or Windows 7 and User Account Control prevents me from running scripts. Can I get around it?

    Leatrix Latency Fix includes bypass support for UAC. If you are stuck behind UAC, it will ask you for the credentials of an account which has Administrator rights so that it can run (as shown here).



    Alternatively, you can run Leatrix Latency Fix from an elevated command prompt, which you can access by right-clicking Command Prompt from the start menu while holding down shift and choosing Run As Administrator.
  • Can I install Leatrix Latency Fix without restarting my computer?

    Leatrix Latency Fix will request that you restart your computer after installation. If you really don't want to do this, you can choose not to and instead disable and re-enable your network card.
  • Can I install Leatrix Latency Fix silently from a batch file?

    Yes, just use 'cscript <script name>' in your batch file (eg. 'cscript "c:\Install.vbs"'). Leatrix Latency Fix will detect that you're running it from cscript and output to the command window which launched it instead of a graphical window. The installation script, removal script and checker script all support batch mode, however you need to be logged into your computer with Administrator privileges. Examples of all 3 scripts running in batch mode are shown here.
  • Can I check if Leatrix Latency Fix is installed without running it?

    Simply run the script called "Checker" which is included in the download (as shown here).
  • Is this spyware, a trojan or any other nasty thing?

    No. I think Wowinterface would have closed my account by now if Leatrix Latency Fix was malicious. The script code can be inspected by anyone to see how it works and exactly what it does.
  • Why make a script, why not just make a registry file?

    Because the keys which are modified are unique to the computer you're using, so it's not possible to make a static registry file and expect it to work for everyone.
  • Do I need Administrator rights to run Leatrix Latency Fix?

    Yes, since it modifies keys in HKEY_LOCAL_MACHINE. If you run the script from an account without Administrator rights, you will be prompted for the credentials of a user account which has them (as shown here).
Help! It doesn't work!

  • I installed it and can't see any change in latency. Does it not work on every machine?

    As long as your operating system meets the minimum requirements shown at the top of this page, Leatrix Latency Fix should always work. However, you may have applied a similar fix in the past, either through manual registry changes or from using alternative software. You may not be aware that you have done this. The chances are that if you applied Leatrix Latency Fix on a fresh install of Windows on your computer, it will work, and the reason why it's not working is probably because you've already run some sort of optimisation fix or registry change in the past.
  • I am seeing lower latency values after installing Leatrix Latency Fix, however, I'm now experiencing lag spikes, especially during periods of frantic activity in dungeons. Why is that?

    The increased frequency of acknowledgements has caused your routers buffer to fill up (essentially creating a traffic jam). Very few people have reported this problem so I don't have much information on it. Lag spikes are more likely to occur when you have more than one computer on your network, or if you are running software which produces lots of network activity. If possible, try using a different router with only your computer connected directly to it and don't run network intensive background applications while playing (such as P2P or voice comms).
  • I get an error with code 80041002 (or similar). What's that?

    Leatrix Latency Fix requires a functional WMI to work and this error (or similar) suggests that the WMI repository on your computer is corrupt. You may find this site useful to help you fix that. It describes the steps necessary to rebuild a corrupt WMI repository. I advise you to have a backup in place first. Note that this is a problem with your computer, not with Leatrix Latency Fix.
  • I get an error "Can't find script engine VBScript" and some more text. What's that?

    For some reason, the VBScript engine has been removed from your system. Click Start, click Run and enter "regsvr32 VBScript" (without quotes). You should receive a message that it succeeded. If so, try Leatrix Latency Fix again.



    If you're using a 64-bit version of Windows, you may need to register vbscript.dll in the SysWOW64 folder. To do that, bring up a command prompt, type in "CD C:\Windows\SysWOW64" and then type in "regsvr32 VBScript.dll".
  • I get an error to do with NTVDM. What's that?

    NTVDM is the Microsoft Virtual DOS Machine and an error associated with this usually means that Windows is trying to run the script with an invalid shell. This could be because system files have been replaced on your machine (possibly the result of a virus attack). You should consider running a Windows repair or reinstalling Windows completely.
  • I get an error, it just says error 1. What's that?

    Error 1 is a generic runtime error. It's not possible to isolate the cause of this error, but it's probably related to the security configuration of your computer. This could be to do with group policy (domain controlled computer?) or something along those lines. Basically, your computer isn't letting LLF do its job.
  • When I double-click the script file, it opens in another application (such as Notepad) instead of running it. Why is that?

    For some reason, VBScript files are associated with another application on your computer. This is probably the result of some software you installed in the past or some registry change that you made.



    VBScript files should instead be associated with the VBScript engine so that they can run. This is the default behaviour in Windows.



    To rectify this, do the following.



    Right-click the script file and choose "Open With...". A window will appear listing a selection of programs that you can open VBScript files with. If "Microsoft Windows Based Script Host" (or similar) is shown in the list, choose that, then check the "Always use the selected program" button and click Ok.



    If "Microsoft Windows Based Script Host" (or similar) isn't shown in the list, click Browse. Navigate to your System32 folder (normally "C:\Windows\System32") and choose Wscript. Again, check the "Always use the selected program" button and click Ok.



    VBScript files will now open with the VBScript engine and they'll run fine.
  • I ran Leatrix Latency Fix and it didn't show a confirmation window. Did it work?

    No. If Leatrix Latency Fix installs successfully, it will always show a confirmation window and ask you to restart your computer (as shown here). If you don't see a confirmation window, then it hasn't installed successfully.



    The most likely reason for a confirmation window not showing is that you've encountered the User Account Control window (as shown here) but you haven't provided the credentials of an account which has Admnistrator rights.



    You should check the radio button for "The following user" and enter the username in the format of "computername\username". For example, if the computer name is AND and the username is Administrator, you should enter AND\Administrator (as shown here). The username which you enter must have Administrator rights on the computer.
  • Even after installing Leatrix Latency Fix, my latency is still terrible, how can I find out where the problem lies?

    You need to understand that Leatrix Latency Fix will make a good connection faster and more responsive. It won't magically fix a bad connection. You can get an indication whether your connection is good or bad using the PATHPING command which is included in Windows.



    First, uninstall Leatrix Latency Fix just to ensure that it doesn't interfere with the results.



    Now, you need to find out the IP address of the game server you're connected to. To do that, launch Wow, and ensure your realm is chosen and your character list is shown (you don't need to login to the game world with your character). Now bring up a command prompt (press CTRL and ESCAPE together if you can't see your desktop to do that).



    In the command prompt window, type in NETSTAT. You will see a list of active connections. One of the entries will have :3724 after it. This means port 3724 which is the port that Wow uses. This is the entry that you want. If you have more than one entry with :3724 after it, choose the one which says ESTABLISHED.



    To the left of :3724, you will see the address of the game server that your computer is connected to. For example, on my computer, one of the entries reads "213-248-123-43.customer.teliacarrier.com:3724 ESTABLISHED", so the address of the game server is "213-248-123-43.customer.teliacarrier.com".



    Now, type in "PATHPING <address>" where <address> is the address of the game server as explained above. In my example, I would type in "PATHPING 213-248-123-43.customer.teliacarrier.com".



    If you've done it right, you will see a route being traced from your computer to the game server. Packets travelling along this route hop from one router to another on their way to the game server destination and each line in the results represents one hop.



    Some of these hops will return * as the result, which means that the hop being polled didn't respond. That's fine as long as all the lines with * are grouped together at the bottom of the list, because the hops at the bottom of the list belong to Blizzard. Blizzard's network is protected so Pathping won't be able to detect that there's anything there.



    Now, you'll see a message saying "Computing statistics for...". Just leave it running there for a few minutes, after which it will output the final results.



    The first line or two in the results will show the address of your computer and gateway or router. The next few lines will be your ISP and you'll probably see references to it (or the carrier they are using) in the address field for each line. Then you'll see lines with "telia.net" in the address field. These hops are at Blizzards end.



    Each line of the results will contain something like this:



    7 56ms 0/ 100 = 0% 0/ 100 = 0% hbg-bb1-link.telia.net [80.239.147.182]



    In the example above, 7 is the hop number and 56ms is the ping for that hop. If you see a high ping for a particular hop which is not consistent with other hop pings, there could be a problem with that hop.



    The "0/ 100 = 0%" field shows how many packets were lost on that hop. It should show 0/ 100 to indicate 0 packets lost, but if there's a problem with that hop, you will see a higher number. For example, if there were 23 packets lost out of 100, you would see "23/100 = 23%".



    The address for that hop is shown at the end of the line (in the example above, the address is hbg-bb1-link.telia.net) along with the IP address.



    By looking which hop has a high ping time or shows a number of packets lost, and seeing which address that hop is for, you can get an indication whether the problem is with your ISPs routing or Blizzards routing.



    Your ISP will be able to conduct line tests and possibly suggest optimising your line for low latency (more on this further down in the FAQ). Sometimes, however, there's simply nothing that can be done due to the quality of your line or the distance from your local exchange, or perhaps the ISP (or carrier) is simply overloaded.



    Blizzard tend to look at latency issues only when they are widespread and affecting a lot of users (which doesn't happen very often). If you do submit a ticket to them for help with your latency, it will help your case greatly to include a PATHPING report. Note, however, that Blizzard won't do anything if they notice that your report shows higher latency or dropped packets on hops prior to reaching their network (telia.net). They will simply advise you to contact your ISP.



    To help you submit a Pathping report, you can output the results to a text file using the pipe switch. Using my original example, this is what I would type to pipe the results to a text file called results.txt.



    PATHPING 213-248-123-43.customer.teliacarrier.com > results.txt



    Entering this will not output anything to the screen, but when the command prompt has returned to you, there will be a file called results.txt which will contain the output of the PATHPING command, allowing you to copy/paste the text into a web form or email.
  • I think the problem is with my internet provider. Can they change anything from their end?

    You can contact your ISP and ask them to optimise your broadband line for low latency. The terminolgy used to describe a low latency optimisation differs depending on your location and broadband type. In the UK, it can be known as Fastpath or Max Delay Reduction. If in doubt what to ask for, speak to your ISP and tell them you have high latency in World of Warcraft.



    Optimising your line will lower your overall bandwidth slightly. In rare cases, it can make your line unstable if the quality of your line isn't very good to begin with. However, most people report a much improved experience with faster ping times and quicker in-game responses.
  • Is my latency affected by my choice of internet provider?

    Your choice of internet provider can have a big effect on your in-game latency. Most internet providers use traffic shaping to manage bandwidth efficiently, but this usually has a side effect of increasing your latency.



    Some providers use traffic shaping to prioritise gaming packets, resulting in lower latency when playing online games. On the other hand, some providers don't use traffic shaping at all, which is great as long as they maintain enough capacity to sustain that.



    Traffic shaping is like traffic congestion control on the roads. It slows everyone down a bit, but if the roads are busy then it helps things run smoothly. However, if the roads aren't so busy, congestion control will simply slow down your speed needlessly.



    You should do your research before choosing a provider to find out what they do for gamers. Traffic shaping is fine as long as the shaper detects and prioritises gaming packets. Unshaped traffic will produce the best results if the network has enough capacity, otherwise it will be worse than shaping. Finally, avoid internet providers that use traffic shaping but don't prioritise gaming packets.
  • I have an issue with Leatrix Latency Fix that is not mentioned above. Can you fix it?

    Reports of Leatrix Latency Fix producing an error or not working are very rare. However, if you experience an issue, I'll do my best to fix it. Please describe your issue in the comments section, giving me as much detail as possible. Don't just tell me that it doesn't work. The information that you give me is part of the solution.



    Include your operating system, service pack and exact error wording. Also explain what you have tried to do (i.e. install using Administrator account, install using batch mode, etc).



    Of the few problems that have been reported with LLF, it usually turns out to be a fault with the users own computer and a fresh install of Windows on the same computer does not reproduce the problem. Please keep this in mind.
And finally...!



Stop worrying and wondering whether Leatrix Latency Fix is right for you. It makes a simple change to your computer, there's a removal script in the download which removes that change.



Install it, try it for yourself over a period of a few days. If you aren't happy, remove it. Make up your own mind. It won't break anything. Most people report a noticeable improvement in button response times, as well as smoother mob movement patterns. You'll probably be one of them. So relax and stop worrying, try it and see for yourself.

No comments:

Post a Comment