1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lag spikes with certain games. Everything else is fine.

Discussion in 'Tomato Firmware' started by Perb, Apr 7, 2012.

  1. Perb

    Perb Serious Server Member

    Current setup:
    - ISP is Shaw Cable. Using a Cisco DPC3825 DOCSIS 3.0 modem in bridge mode.
    - Router is a Linksys WRT54GL v1.1 running Tomato v1.28.

    I'm experiencing some strange lag issues with a few games that I play, notably Path of Exile and Tera Online. Every other game I play is completely fine. I've tried playing with a few different combinations of routers and firmware and directly with the modem (I know the problem isn't limited to Tomato, but it's the firmware I'm using at the moment so I thought It'd be a good choice to post it here first instead of everywhere at once).

    Connected directly to the modem: Seems to work fine. Ping is a steady 65ms.

    WRT54GL v1.1: I tested this with the original Linksys firmware, Tomato firmware, and DD-WRT firmware. All 3 firmware results were the same. Lowest ping in game is about 65ms with constant spikes to 300ms every 5 seconds or so and occasionally going from 65ms -> 300ms -> 900ms -> 65ms. Strange part is seemingly randomly (random day and random time), the lag spikes will be gone. The spike patterns on the in game ping graph are still there, but they are really small of about 20ms, but the game is fully playable. This is the part that is really frustrating.

    Image showing what the spikes look like.

    Buffalo WHR-HP-G300N: I only tested this with the firmware it shipped with which was Buffalo's version of DD-WRT. I bought this router thinking it would solve the lag issue, but I'm going to return it so I didn't mess with the firmware other than simply updating it. Results were the same as the other router. Worked fine some days with tiny spikes and was unplayable with massive spikes other days.

    It doesn't look like it's an ISP routing issue since it works with just the modem, but also doesn't seem like a router issue since it does work some of the time. I was testing the routers with only one computer plugged in and also turned the wireless off.

    Some other points:
    - Pinging google while lagging in game was fine at 30ms and no spikes. Even pinging the game server I'm on (while lagging), is fine at 50ms and no spikes.
    - Both NA and EU experience the same lag spikes.
    - The other game, Tera Online, experiences the same lag spikes on both NA and EU (pretty much exactly the same lag as PoE gets). All other games that I play are completely fine.
    - Pinging the router/modem is a constant 1ms. Connection in general is flawless and running at 50mbps down and 3mpbs up.
    - I'm running Windows 7 64 bit.
    - If I'm connected to the VPN Hotspot Shield, these lag spikes are completely gone, regardless of which router I'm connected to.

    TL;DR: 2 specific games are getting lag spikes while using a router, but works fine with just modem. Every other game/app is fine with or without router. Pinging/tracerouting the game servers is fine, regardless of setup. Lag spikes are only while in game.
     
  2. Perb

    Perb Serious Server Member

    Few questions:
    - Is there anyway to find out where this lag is coming from? These spikes are happening every few seconds while in game, but I'm also pinging the same game server here in Windows.
    - I was playing around with Wireshark for a bit. Could it help at all? After a bit of messing around, I could filter it to show packets to and from the game server, but didn't really know if this info was useful or not.

    If there's any other info I can give or tests that I could be doing, please let me know. I wouldn't even be opposed to loaning my beta account out for Path of Exile either to see if anyone else has this issue.
     
  3. bluenote

    bluenote Networkin' Nut Member

    I'm going to take pity on you but I'm on my phone so i can't go into tonnes of detail.

    1) the way to troubleshoot lag is to use traceroute to your destination then run continuous pings to strategically chosen points on the path simultaneously. Local, router, outside of router, first hop, destination would be a general idea.

    2) unfortunately you haven't used good form designing your tests, at least, it sounds this way. 10 to 1 what you are seeing is congestion induced contention on your link. going direct is also eliminating any other pc's on your LAN from the equation leading you to a likely false conclusion.

    3) I'm guessing someone is using torrents in your house.

    EDIT: i just had a look at your pics. Your windows pings are fine, game server pings irregular is what it looked like. Conclusion - server. Do conclusive testing where it's present with router (no other devices present) , and without router until you have proved it's there on both. Or not.

    Sent from my LG-P999
     
  4. rs232

    rs232 Network Guru Member

    I would keep an eye on the CPU usage of the router... perhaps a scheduled task or something that spikes 100% CPU usage for too long?
    Also are you using Q0S at all?
     
  5. Perb

    Perb Serious Server Member

    Appreciate the replies. I think I actually found the problem. It involves BitTorrent but not in the way you'd think. Here's what I did this morning:

    I opened Path of Exile (which is almost part of my morning routine now) to check if it was spiking. It wasn't spiking this morning *gasp*. This computer is upstairs and on wireless, so I kind of just noted which other computers were connected and double checked that none had BitTorrent running. All good. While on the subject of BitTorrent I decided to open it and see if anything suspicious (lag spikes) happened. It was open for about 20 seconds and connected to a few peers. Damn. The spikes were actually back. I close BitTorrent expecting the spikes to go away--nope still there. I restart my computer to double-check nothing is still running or connected from opening BitTorrent. The spikes were still there. I went downstairs to the computer that can connect to the modem directly.

    I unplug the router from the modem and then plug the computer into the modem. I reset the modem to get an IP and open Path of Exile. No spikes. I then go back to using the router, reset modem to get an IP, and then open Path of Exile. Still good with no spikes. I curiously open BitTorrent again. Spikes are back. Close BitTorrent. Still spiking. I get the idea to clone the PC's MAC address (since it was fine with just the modem) to the router, reset modem to get an IP. Spikes are gone. I go back to being directly plugged into the modem. I didn't have to reset it since I'm using the same MAC address. Spikes still gone. Open up BitTorrent and the spikes are back. I go back to the router (same MAC still) and still spiking. Hm, I change the last two numbers of the router's MAC to something else and reset the modem. Spikes are gone.

    It looks like my ISP and/or modem is doing something everytime BitTorrent is opened. The duration of whatever it's doing is limited (explains the random times the game works), but unknown. Whatever it's doing apparently affects the games Path of Exile and Tera.

    Is there anything Tomato can do to help, besides changing it's MAC (and then me running downstairs to reset the modem)? I'll call my ISP and see what's going on, though, since they say they do not throttle BitTorrent at all.
     
  6. bluenote

    bluenote Networkin' Nut Member

    You stumbled on a real clue earlier when you said, this doesn't happen with hotspot shield vpn. I would work that into the equation now that you have a beginning grasp of whats going on and test with that.

    For the sake of gathering more data I would also see how long the behaviour lasts after you shut off your torrents without changing anything else.
     
  7. Perb

    Perb Serious Server Member

    For those curious, using Vuze instead of uTorrent solves this issue completely for some reason.
     
  8. Toastman

    Toastman Super Moderator Staff Member Member

    Anything to do with DHT and / or uTP?
     
  9. Perb

    Perb Serious Server Member

    It's possible unless Vuze doesn't support those features, because I've definitely spoken too soon. Vuze is doing the same thing now. The 'tipping' point for Vuze, I believe, was when I added a few more torrents to it (so about 5 total) since I only had 1 in there before. Connections weren't too crazy from what I could tell which was about 200.

    I did a quick test after getting a new IP and fixing the lag. Literally 5 seconds after opening uTorrent or Vuze, the lag spikes start again.

    Changing my router's MAC and resetting the modem (getting a new IP) remains the only way to fix the lag issue. I've tried the following to make sure:
    - Closing uTorrent/Vuze and then restarting the computer.
    - Resetting router and modem.

    Can my modem/ISP simply 'tag' my current IP to be awful? Or is this something else entirely.
     
  10. Planiwa

    Planiwa LI Guru Member

    It's not your ISP. It's you: User-generated Connection Storms.

    The dyslogic in the following is disconcerting:
    I'm sure that rebooting your PC and router would work just as well.

    (Possibly, frequent modem resetting may actually downgrade your WAN connection.)

    I suggest learning about Connection Storms and how to cope with them.
     
  11. RobF

    RobF Serious Server Member

    as Toastman has said in his QOS articles you should consider disabling UDP in your torrent clients.
    Then consider turning on QOS and giving your game protocols higher priority.
    He actually addresses this very topic so check the QOS link in his sig.

    The bottom line is that it sounds like your torrents are sucking up all of your outbound bandwidth which could cause these spikes.

    I hope you get it figured out.
     
  12. Monk E. Boy

    Monk E. Boy Network Guru Member

    There's also the possibility of you popping up on a public torrent is advertising your presence to certain unmentionable organizations, that start probing (and by probing I mean sending traffic, they don't just do a portscan and go along their merry way) your router's IP for vulnerabilities, which leads to a rise in traffic, which cause lag spikes. IM and P2P clients frequently cause a rise in such probes. Changing the IP makes these probes someone else's problem.

    You really need to enable QoS though, since it's likely just congestion... which QoS was designed to prevent. You prioritize certain traffic over other traffic and as a result ALL traffic runs more smoothly.
     
  13. Planiwa

    Planiwa LI Guru Member

    If the problem is a poisoned IP address, then . . .

    The correct way to get a new IP address is . . .

    In the GUI: Status > Overview > [Disconnect] ... [Connect]

    Command: service wan restart
     
  14. Perb

    Perb Serious Server Member

    Alright, I had some time today to do some tests and started with DHT. I opened uTorrent with DHT turned off and no torrents loaded. Good, no spikes. Turned DHT on and almost instantly the spikes were back.

    I'm glad it turned out to be an extremely simple fix, but I'm still slightly curious to know why closing uTorrent (after having DHT on) and even restarting the computer that had it running doesn't fix the problem. This is the reason it was so hard to track the problem down to uTorrent in the first place.

    Also, thanks for the replies everyone.
     

Share This Page