The source of lag.

“IT’S NOT GRAPHICS! IT’S LAG!”
“IT’S MY PING TO THE SERVER!”
“STUPID SERVERS!”

The “server”, for some, is some magic giant factory that not only houses the game you play but the source of all “lag” (latency) everywhere. Well, I’m here today to help you understand a little bit of what the source of your slowdown woes are and I hope – with some new facts about it – you might be able to improve your experience or at least chill out and stop spamming scenario chat with nine iterations of “#%^&*#% LAG!”

I’m not going to teach you a semester’s worth of networks in an article, so if I get hand-wavy you are welcome to ask questions and I will go into deeper detail. Most of you are smart peeps though, so I trust you’ll spend some time on wikipedia reading into this further if you feel the need. So, here I go. (Wish me luck.)

“IT’S MY PING TO THE SERVER!”

Ping is a debugging-protocol for the internet; in particular, it’s used to determine whether a given destination is reachable. Since it can be used to map out topology for networks, many providers restrict the use of it within them. My friend once pinged Google (which they allow) and left his ping running over night, on accident. He received an email from Google the following day asking him to stop. (How on Earth did they find him so quick you might wonder? He’s a student at UMass, and UMass’s IT department was involved.) If you know what a network looks like, you’re in better shape to crack into it. Ping is not a unit of measure; it is a testing application. Ping can give a reasonably good average on round-trip time (RTT); that is, the length of time it takes for a message from your machine to reach the server AND receive an acknowledgement. Now let me load this up with some angry statistics: average is a terrible metric to base anything on, since outliers can skew your results…and frankly three to five attempts is a terrible sample set. Really you’d want to leave Ping running for a long time to get a firm handle on your true expected round-trip time. Why? Because paths on the Internet are by no means fixed. These paths frequently change.

Suppose you sign into WAR and as you’re playing you experience a large lag spike or choke that no one else experiences. Is it the server’s fault? Odds are: No. Here are some other possibilities:

– ROUTER DOWN: Your connection to the server (or any server really) is a series of hops from network to network…not necessarily the fastest way there, but almost certainly the most currently cost-effective way there for any ISPs involved. Suppose one of those nodes goes down. Happens all the time. Now the routers between you and them have to figure out how to redirect traffic around the dead node. This is just like a bridge going out and all usual bridge traffic being re-routed to some other bridge…the remaining bridge will become more packed and it will go slower, but messages will still get there. The computing of a new route happens fast (in fact often routers have a few alternate routes noted down just for this situation), but as it can clog other pathways it could cause a noticeable spike that you would experience but no one else would. (Unless of course they’re using one of the same hops you are, e.g. they use your ISP.)

– QUEUEING DELAY: What isn’t like real auto-vehicular traffic is that if a packet gets to a bridge and there isn’t any room on it, the packet doesn’t wait…it falls off of the bridge. It’s dropped. Discarded. And your computer has to resend it. Your computer will send only a certain number of messages to the server until it receives an acknowledgement from the server. If it hears nothing after a period of time (called a “time out”) it will just retransmit, hoping for the best. If a server goes down (or a major hop between you and them goes down) you know it: EVERYTHING seems to stop responding as you wait for repeated time outs to fire and you retransmit, hearing nothing. These time outs can be excruciatingly long. <3

– BUT MY OTHER ONLINE GAMES RUN FASTER THAN WAR: Perhaps your other online games are located in a place that your computer can more easily communicate with. Are you driving through NYC to get somewhere? Or are you driving through Hadley, MA?

– WAR IS NOT THE ONLY THING RUNNING ON YOUR COMPUTER: Despite all your best efforts using Spybot: Search and Destroy and your favorite free AV program Avast! (or maybe you got a free copy of Norton or McAfee…or possibly you broke down and bought such a thing), your computer will eventually get infected with something and be used to transmit stupid, possibly disregarded data over your internets. It’s one reason why we should be happy we pay a fixed rate for a fixed amount of bandwidth instead of paying per-bit-transferred…because we wouldn’t be paying only for our bits. We’d be paying for whatever viruses and spyware that are transmitting crap also. Oh, and if you are silly enough to be BitTorrenting while you’re playing WAR…srsly?

– BIT TORRENT IS RUNNING ON ANOTHER COMPUTER: So it’s not using your computer’s resources, but it’s using your network resources. If both computers are accessing the internet on the same modem, heavy traffic off of one machine will affect traffic to yours. Your own modem (or router) becomes a crowded bridge from which cars fall off.

– PACKET CORRUPTION: This happens. Sometimes cars don’t fall off the bridge…sometimes instead, when they get to the bridge, they are barely recognizable as cars at all. Remember that packets are bits and bits are signals through a wire. (Signals are BLACK MAGIC. Srsly. It’s sort of like two tin cans with a string pulled tight between them, only thanks to some crazy math and electrical magic and some dood named Fourier – sounds like Perrier with an “ay” sound at the end – it works with wires.) So when the crappy packet gets to its recipient, the recipient is like “WTF IS THIS LOL” and it just throws it away. So your computer waits for time out and retransmits. This isn’t so bad with wires all the way, but wireless internet has HUGE amounts of packet corruption, just between your computer and the wireless link. Fluorescent lights, cell phones, your computer *itself*…anything that uses electricity in the room can mess up packets in the air. This includes other wireless computers. Oh, and if you are sharing that wireless connection with someone else, it’s like you’re using the same really shitty cable. Plug in…you’ll both get more bandwidth.

– YOUR GRAPHICS SETTINGS: This is huge in a way many people don’t understand. Turning your graphics settings down can dramatically improve your connection speed. It’s not just because your computer has less work to do…it’s because the server has less data to send to you. At High Quality it’s sending you the little tricky details for everybody’s equipment and spells all over the field…at Fastest Frame-rate, it just sends you the results and you see what you do (since your client already knows that anyway). I read recently about an add-on I might get…apparently in scenarios you get updated about everybody’s buff timers every five seconds or so…stepping that down a notch would improve performance a great deal, and that add-on claims to do just that. Might be worth looking into…let me know if you’ve tried this. Of course, if your computer has less things to draw, things will be faster. Just the way it works.

Can the server be responsible for lag? Sure…but if it is, usually we will all feel it. But holding the server responsible all the time is inaccurate. There is a lot that goes down between your machine and the server. Some of these things you can do something about: like pick a better ISP, turn down your graphics settings, and keep your computer (and other computers on your home network) free of viruses, spyware, and huge downloads. Are there causes I left out? Oh yea. But this is enough to start you thinking, I hope.

Advertisements

~ by thade on October 3, 2008.

5 Responses to “The source of lag.”

  1. Unfortunately I am one of those that uses Wireless. By choice? Hell no. I use AT&T UVerse (which is actually quite good from my current experiences) and the only place they were able to set up the “Gateway” (which is pretty much where everything comes from. My TV plugs into it and it acts as a wireless router too) was in my Living Room. I bought the best Wireless modem i could find but, I know it’ll never be as good as actually plugging in.

    To this day I am severely tempted to do go find myself a really long cord and just plug in, but unfortunately the shortest route would cross both the the door to my apt and the door to my kitchen, which either means snaking the cord over them, requiring even more distance, or attempting to tuck it under the carpet (which I can’t do at the kitchen doorway).

    It’s a pretty sh*tty setup but it works (I mean, wireless on a desktop? Really? Bleh!). But everytime I’m in a scenario and someone suddenly jumps from right infront of me to a considerable “hop” away I can’t help but think it’s likely due to the wireless.

  2. The rest of this article looks awesome, but I refuse to believe that your graphics settings cause network lag. What you are saying is that the server knows your graphics settings, and sends different information based on that. Instead, all the graphics, particle effects, and such are already on your PC (thick client), and the PC simply does something different based on what the graphics settings are.

  3. So, yes…in a way the server *does* know your graphics settings, because based on your settings your machine sends requests for different things to the server.

    I’m sorry you refuse to believe it. <3 I recommend you write some network software and rethink my postulations. ;)

  4. Sorry, Boris, but he’s right – graphics settings do have an impact on lag. You can actually test this if you’ve an addon that measures response time (lag). Log on, start the addon, stay in one place, and get a baseline measurement of the general lag you’re facing (Thade’s notes about ‘average being a lousy measure’ acknowledged). Now change your settings (lots of detail minimal detail) and continue to monitor the lag rate. You are right that the computer carries a lot of details. A lot is not all. That said, there’s another reason for the increased lag – and this is where I disagree with Thade (though I get his point.)

    Your computer can do one – or if a multiprocessor 2 or 4 – things at a time. It does them all very, very fast, but it’s still only one thing. One thing is ‘that bit’ sent to the server, receive another bit, modify a pixel on the screen, check for your location, check for … yeah, a lot of things. When you boost your graphics, you add a lot to the workload. Some of this is fobbed off on your graphic card if it’s the right kind of card, but a lot is still dependent on your processor. Your processor can only do one/two/four thing(s) at a time, regardless how fast. And a lot more to do means a lot more time needed to do it.

    Now between the point Thade made and my point, we’ve got a lot of reason for “lag” that specifically relates to the simple fact: increasing your graphics load CAN and probably WILL affect “lag”.

  5. Kirk touches on something that I really support, and if you’ve ever enjoyed an episode of MythBusters, you should too:

    Hold your beliefs and doubts to experimentation.

    http://xkcd.com/397/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: