0

I've been having network problems for a while and I'm trying to track down the source of the issue.

Yesterday, I was transferring a file from my laptop to my desktop with SCP, over my wifi connection. I when the download started, both computers had low ping to the local router (192.168.1.1, both sat around 10ms-50ms) and the download ran at 2-3 MB/s.

After a minute or so, I found that my desktop's latency to 192.168.1.1 shot up dramatically (> 1,000 ms) and the transfer slowed to a crawl (~200 KB/s). The laptop's latency to 192.168.1.1 stayed the same, however (10-50ms). Once the transfer finished, the desktop's latency dropped back down to its normal range.

Clearly, something goes wrong when the connection is saturated. What could it be? Does this suggest a problem with the router, or a problem with my desktop? Where would be the right place to start looking?

2
  • Ummm... if a connection is saturated, then it is performing at its maximum capacity. By definition adding further traffic is going to cause packets to be queued and cause latency.
    – cpt_fink
    Commented Apr 17, 2015 at 4:40
  • @cpt_fink The transfer rate drops to 200 KB/s and stays there, which definitely isn't enough to kill the router. This is also over Wifi across my local network -- I would have hoped that I could max out at least 54 Mb/s. Also, latency stayed low on one computer but not the other --- wouldn't what you're describing cause a network-wide slowdown? Commented Apr 17, 2015 at 16:53

2 Answers 2

2

Google for "buffer bloat".

As RAM became cheap, networking gear added frame buffers so they never have to drop a frame.

Unfortunately, frame drops was how TCP noticed congestion and knew when to back off. Without dropped frames, traditional TCP implementations never notice the congestion and never back off, so they just keep sending at high rates and make it worse.

If all your networking gear just buffers more and more frames during congestion and lets the queue length grow without bound, latency goes up and up as it takes longer and longer to drain the queues.

Active queue management (AQM) techniques and mechanisms like explicit congestion notification (ECN) can alleviate this, but since the issue is not very well-publicized, it's hard to know which products avoid buffer bloat and which don't. It's not like you can look for a "No Buffer Bloat!" logo on the side of a box and know you're getting good equipment.

There are, however, Wi-Fi router after-market firmware distros that specialize in avoiding buffer bloat. At least one distro was specifically developed by the TCP researchers who first recognized the problem, and was used as their research and development platform as they looked for solutions.

1
  • If it's a problem with congestion, why would the latency on my laptop stay low? Are there separate buffers for each connection? I don't have direct control over the router in this case (my landlord runs the network) but I believe that it's some stock Comcast product. Commented Apr 16, 2015 at 21:44
1

High latency happens when packets make it into a queue to be transmitted across a very busy link. All packets ahead of it in queue must be sent through first. When the demand on a link is great, and queue buffers are large, this leads to high round-trip times.

6
  • So does this imply an issue on the part of the router, or an issue with my wireless drivers? Commented Apr 16, 2015 at 21:37
  • The high round trip times are a feature, not a bug. Under saturated conditions, either a packet makes it into the queue to eventually be sent, or it gets dropped. Since a ping packet is about 27 times smaller than a fully laden data packet, it has a better chance of getting into a queue, which may not have had room for a full-frame packet. In saturated conditions, a high round trip time is probably better than no round-trip. Ping's default use of small packets probably misleads somewhat about the amount of packetloss actually occurring. Commented Apr 17, 2015 at 6:44
  • Okay. So if the router's queue was full, why would the computer sending data (my laptop) still have low latency? If that was the cause, wouldn't it kill everything attached to the network? Commented Apr 17, 2015 at 16:54
  • "one or more queues" I suspect ICMP gets its own low-priority queue on most consumer routers today, which lets actual data proceed ahead of content-free diagnostic traffic. Else, your pings would have interfered with the transfer, and you'd have a real problem, instead of just a momentarily high ping time. Commented Apr 18, 2015 at 18:23
  • That still doesn't make sense --- if ICMP got a separate queue, then both pings would have stayed low. Commented Apr 18, 2015 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .