Friday, January 18, 2008

Improving Your World Of Warcraft Ping

I'm fairly cautious about putting in system tweaks to improve game performance, but I actually do support this one particular change to improve your latency in World of Warcraft. I did a bunch of research into it and in my experience, the benefits far outweigh the costs.

Background information:

Our tale of this tweak begins way back in the days of telnet and dial-up modems. Applications like telnet tend to send a lot of really small bits of data, like when you press a key, it sends a packet of data containing what key it was that you pressed and then waits for an acknowledgment to make sure it went through. In a packet of data like this (either a single keystroke or an acknowledgment), the packet header and stuff is bigger than the meaningful data, so it's pretty wasteful to send out these packets like this. Along came a dude named Nagle, who came up with a clever optimization. He realized that you could combine multiple packets to reduce the wasted overhead by delaying just a little bit before sending a packet. In fact, you could even wait to acknowledge more than one packet at a time. This small delay (maybe 0.2 sec or so) was not particularly noticeable on a horrible dial-up connection with pretty bad latency to begin with and the bandwidth savings were much more important. Nagle's optimization became part of the standard TCP/IP implementation.

Fast forward to today. Windows at it's heart still tries to support the lowest end users so it still enables "Nagling" in TCP/IP connections by default. However, if you're someone who plays games online with a broadband connection, times have changed a lot. We have much higher expectations about reponsiveness in games and games rarely send enough data to saturate a broadband connection. World of Warcraft is no exception. It's now far more important to have a more responsive connection to World of Warcraft than it is to save a few bytes per data packet that we send out.

Applications in Windows are permitted to disable Nagling to improve responsiveness under TCP/IP. In the most recent World of Warcraft patch, Blizzard attempted to do so but failed. Therefore word has been spreading about how to disable Nagling yourself to improve your latency. The best article I've seen is this one:

Which explains how to disable Nagling under Windows XP as well as Windows 2000. I had seen another article explaining how to do it under Windows XP but it didn't fully disable Nagling on my Windows 2000 machine. After adding these registry changes, my latency at peak hours dropped from about 250 ms to 60 ms. This is like a night and day difference when it comes to precision necessary to do well in World of Warcraft Arena. Last night, I felt like I was playing a totally different game. I never really realized how used to having high latency I was.

Note that I would have probably adopted this change earlier if i had thought about or paid close attention to my ping before these last few days. I always trusted developers to make better choices about optimizing for game responsiveness these days. I know from past experiences that other games like first person shooters often don't bother with TCP/IP and use UDP for more responsiveness because the reliability of TCP/IP is not as important in an FPS. Out of date information is as good as no information in an FPS.

In any case I do fully recommend adopting this change until Blizzard fixes their attempt to disable Nagling. If you've never played the game with under 100 ms latency, you'll feel an incredible difference. Also, I even tried downloading some large files to test how badly it hurt my overall data throughput and I couldn't even tell a difference.

1 comment:

Don said...

A very interesting read. I don't show a setting for this under my GUID. Is this something I need to add?