Results 1 to 7 of 7

Thread: Latency problems

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Tankbuster's Avatar Analogy Nazi
    Join Date
    Jul 2006
    Location
    Belgium
    Posts
    5,228

    Default Latency problems

    Hi guys,

    For the last few weeks I've been having quite some problems with (read: raging pretty hard on) the network connection on my dormitory; in particular that it tends to lag really bad. It often goes all the way up to 500-600ms, which renders any kind of VPN connection with the university's software database into a frustrating acitivity, and it also makes me unable to play the only game I'm currently playing: League of Legends.
    The lag is worst during peak hours of the day (14h00-21h00) though disappears almost completely after 23h00 or in the morning. I realise that this probably has something to do with the fact that there are multiple people on this dormitory using this network to connect to the internet (though I'm not entirely sure how exactly we're wired up), but the fact that this is a pretty modern internet connection (2MBit+ and such) and that very few of my friends are having this problem, though they are obviously also on dormitories, seems to indicate that the problem is with my internet settings as well - or at least that I can change things to make things less of a headache.

    I've been experimenting with a couple of different programs and even ran a network diagnostic, but I'm having difficulty interpreting the results. The problem seems to be that my DNS and TCP have faulty settings, but to be honest that's about all I can get from it. I'd really appreciate it if someone could took a look at it and give me their take on it.

    I really don't expect you to solve all my problems for me, but if some of the network wizards around here could give me some pointers as to what might be going wrong and what I might do about it, that would be great
    The Sabbath was made for man, not man for the Sabbath
    --- Mark 2:27

    Atheism is simply a way of clearing the space for better conservations.
    --- Sam Harris

  2. #2
    Simetrical's Avatar Former Chief Technician
    Patrician

    Join Date
    Nov 2004
    Location
    θ = π/0.6293, φ = π/1.293, ρ = 6,360 km
    Posts
    20,154

    Default Re: Latency problems

    The latency is bad, but the packet loss is murderous. 9.5% packet loss is going to wreck network responsiveness. It should be 0%; if it's consistently anything higher, that's bad. A single dropped packet on a TCP connection will effectively cause transmission to stop for a long timeout period, like on the order of a second. (Actually it might continue, but the data won't be passed to applications until the lost packet is received, so you'll see a pause.) Dropped UDP packets will have application-specific behavior, possibly including data loss, possibly stalls like in TCP.

    You need to figure out what hop the packet loss is happening on first. To do this, run a traceroute to some random site, so you get a list of hops, something like this:
    Code:
    $ traceroute twcenter.net
    traceroute to twcenter.net (208.69.72.113), 30 hops max, 60 byte packets
     1  cpe-68-175-60-1.nyc.res.rr.com (68.175.60.1)  25.906 ms  25.906 ms  25.887 ms
     2  gig0-3-nycmnye-rtr1.nyc.rr.com (24.29.151.249)  13.763 ms  13.757 ms  13.724 ms
     3  pos-10-2-nycmnya-rtr2.nyc.rr.com (24.29.98.1)  13.706 ms  13.688 ms *
     4  gig11-0-0-nycmnya-rtr2.nyc.rr.com (24.29.130.186)  44.529 ms  44.562 ms  44.544 ms
     5  66.109.6.76 (66.109.6.76)  14.657 ms  14.527 ms  14.600 ms
     6  ae-0-0.pr0.nyc20.tbone.rr.com (66.109.6.157)  57.895 ms  12.368 ms  12.367 ms
     7  te2-8.mpd01.jfk05.atlas.cogentco.com (154.54.13.81)  15.113 ms te1-4.mpd01.jfk05.atlas.cogentco.com (154.54.13.185)  15.075 ms te2-8.mpd01.jfk05.atlas.cogentco.com (154.54.13.81)  18.051 ms
     8  te0-3-0-5.mpd21.jfk02.atlas.cogentco.com (154.54.26.61)  12.283 ms te0-1-0-4.mpd21.jfk02.atlas.cogentco.com (154.54.31.1)  13.905 ms te0-3-0-5.mpd21.jfk02.atlas.cogentco.com (154.54.26.61)  12.220 ms
     9  te0-2-0-7.mpd21.dca01.atlas.cogentco.com (154.54.41.17)  26.081 ms te0-0-0-6.mpd21.dca01.atlas.cogentco.com (154.54.5.98)  18.684 ms te0-3-0-6.mpd21.dca01.atlas.cogentco.com (154.54.41.21)  18.691 ms
    10  te0-1-0-4.mpd21.ord01.atlas.cogentco.com (154.54.40.222)  38.213 ms te0-0-0-4.mpd21.ord01.atlas.cogentco.com (154.54.40.218)  38.431 ms  38.210 ms
    11  te0-1-0-2.mpd21.mci01.atlas.cogentco.com (66.28.4.185)  56.163 ms te0-4-0-0.mpd21.mci01.atlas.cogentco.com (154.54.30.170)  63.515 ms te0-1-0-2.mpd21.mci01.atlas.cogentco.com (66.28.4.185)  63.386 ms
    12  te4-4.mpd01.den01.atlas.cogentco.com (154.54.24.81)  74.905 ms  74.947 ms  74.926 ms
    13  gi0-1.na01.b009854-0.den01.atlas.cogentco.com (66.250.10.218)  74.963 ms  74.892 ms  74.851 ms
    14  AxisInternet.demarc.cogentco.com (38.112.6.146)  74.723 ms  67.455 ms  67.548 ms
    15  * * *
    16  * * *
    17  * * *
    18  * * *
    19  * * *
    20  * * *
    21  * * *
    22  * * *
    23  * * *
    24  * * *
    25  * * *
    26  * * *
    27  * * *
    28  * * *
    29  * * *
    30  * * *
    This is Linux, but the principle is similar on any OS. On Windows, you can run cmd.exe and type "tracert twcenter.net", or any site of your choice.

    Now ping each of the hops, from first to last, until you start seeing packet loss. In cmd.exe for output like the above, this would look like "ping -n 20 cpe-68-175-60-1.nyc.res.rr.com", and so on for the other hops. It should report how many packets were lost at each hop, and that will tell you what hop is causing the packet loss, if all goes well.

    (It's possible something is blocking pings and/or traceroutes, in which case none of this stuff will work so well, and alternative strategies are needed. You can see in my traceroute that a router at TWC's host, Axis, is blocking traceroutes, which is why there are no results after that point.)

    While you're at it, the traceroute should also tell you which hop is causing latency. As you can see, the traceroute gives the latency to each hop (in this case, for three separate trials).


    You don't actually need to do that, of course, I can do it from here just fine. I can confirm I see 6% packet loss to your IP address right now, although only 280 ms average latency. But I see 0% packet loss to 195.254-244-81.adsl-static.isp.belgacom.be, the next hop from you. I also see only 100 ms latency. So the problem looks to lie between you and your ISP. I'd look at any switches or cables that lie in between you and your ISP. If your computer is hooked up to a switch, try hooking it up to the modem directly, if you have access to the modem. Also try using at least two different Ethernet cables, in case a cable is faulty. If that improves matters, replace the cable or switch as appropriate. Otherwise, the modem might be the issue.
    MediaWiki developer, TWC Chief Technician
    NetHack player (nao info)


    Risen from Prey

  3. #3
    Tankbuster's Avatar Analogy Nazi
    Join Date
    Jul 2006
    Location
    Belgium
    Posts
    5,228

    Default Re: Latency problems

    Hi Sim,

    Thanks a lot for helping me out
    The stalls you talk about do sound familiar: that's exactly what happens in many applications; the latency is bad enough, but there's periodic stalls and freezes which are actually worse.

    I did as you asked me to do,

    Code:
    C:\Users\Vista user>tracert twcenter.net
    
    Tracing route to twcenter.net [208.69.72.113]
    over a maximum of 30 hops:
    
      1    22 ms    22 ms    22 ms  192.168.254.1
      2   319 ms   358 ms     *     1.238-241-81.adsl-static.isp.belgacom.be [81.241
    .238.1]
      3   314 ms   292 ms   343 ms  192.254-244-81.adsl-static.isp.belgacom.be [81.2
    44.254.192]
      4   402 ms   458 ms   346 ms  ge0-0.intlmar1.isp.belgacom.be [194.78.0.47]
      5   117 ms    53 ms   129 ms  195.219.227.17
      6     *      272 ms   342 ms  if-6-0.core2.AD1-Amsterdam.as6453.net [80.231.81
    .9]
      7   533 ms     *      390 ms  if-15-0-0.core3.NTO-NewYork.as6453.net [80.231.8
    1.46]
      8     *        *        *     Request timed out.
      9   216 ms     *        *     te1-6.ccr02.jfk05.atlas.cogentco.com [154.54.12.
    93]
     10   505 ms     *      264 ms  te0-1-0-4.ccr21.jfk02.atlas.cogentco.com [154.54
    .31.10]
     11   223 ms   307 ms   312 ms  te0-2-0-7.ccr21.dca01.atlas.cogentco.com [154.54
    .41.1]
     12   165 ms   190 ms     *     te0-0-0-4.ccr21.ord01.atlas.cogentco.com [154.54
    .40.186]
     13   298 ms   180 ms   311 ms  te0-1-0-0.mpd21.ord01.atlas.cogentco.com [154.54
    .30.250]
     14     *      482 ms   288 ms  te0-0-0-3.mpd21.mci01.atlas.cogentco.com [154.54
    .2.233]
     15   485 ms   490 ms   314 ms  te4-4.mpd01.den01.atlas.cogentco.com [154.54.24.
    81]
     16   180 ms   180 ms   267 ms  gi0-1.na01.b009854-0.den01.atlas.cogentco.com [6
    6.250.10.218]
     17   226 ms   449 ms   479 ms  AxisInternet.demarc.cogentco.com [38.112.6.146]
    
     18   277 ms   173 ms   285 ms  twcenter.net [208.69.72.113]
    
    Trace complete.
    Most of the latency seems to come, as you noted, just from going to the first network; and that's where a lot of the packet loss seems to be occurring too (as much as 10% - 15% when I ping to it). I will follow your suggestions and see whether I find any problems with the hardware
    The Sabbath was made for man, not man for the Sabbath
    --- Mark 2:27

    Atheism is simply a way of clearing the space for better conservations.
    --- Sam Harris

  4. #4
    Tankbuster's Avatar Analogy Nazi
    Join Date
    Jul 2006
    Location
    Belgium
    Posts
    5,228

    Default Re: Latency problems

    Well, having now toyed around with my modem for a while, I think I can pretty definitively say that that's not the problem. I have:
    - replaced the Ethernet cable connecting my computer to the modem
    - replaced the cable (RJ45 jack) which connected the modem with the wall
    -replaced the modem itself
    Yet the packet losses persist...
    And also, when I ping the default gateway of my router I seem to be getting very low pings (22 ms and such), which is in bold contrast to what I'm actually experiencing.

    Does that mean that the problem is thus mainly in the router itself and has to do with the provider?
    The Sabbath was made for man, not man for the Sabbath
    --- Mark 2:27

    Atheism is simply a way of clearing the space for better conservations.
    --- Sam Harris

  5. #5
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Latency problems

    Yes but don't expect them to admit it.

  6. #6
    Simetrical's Avatar Former Chief Technician
    Patrician

    Join Date
    Nov 2004
    Location
    θ = π/0.6293, φ = π/1.293, ρ = 6,360 km
    Posts
    20,154

    Default Re: Latency problems

    Most likely, yes. If you hook a different computer up to the router, does it show the same kind of lag? (If not, it's a problem with your own computer somehow.) Do other people in your room/floor/building/whatever have similar problems? (If so, then it's certainly a problem beyond your router.)
    MediaWiki developer, TWC Chief Technician
    NetHack player (nao info)


    Risen from Prey

  7. #7

    Default Re: Latency problems

    Sounds like its the university's issue, I had the same problem back when I was in college and went from a university which was an internet hub to a much smaller school for a year. Ugh the lag.

    (Of course this was at the birth of the internet, so there is less excuse now).
    "When I die, I want to die peacefully in my sleep, like Fidel Castro, not screaming in terror, like his victims."

    My shameful truth.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •