Chris Lamb

Why does using all the upstream cause lag?

/wp-content/2007/upstream.png

It's a common story. A housemate starts torrenting some American television series of dubious artistic quality and/or legality, or perhaps starts calling their girlfriend on Skype and your SSH sessions start to lag. Why does this happen?

When the upstream channels become saturated, data must overflow into the modem's buffers. This causes TCP acknowledgement (ACK) packets originating from your SSH client to be delayed, resulting in an increase in the overall round trip time. This phenomena is usually worse on cable connections as their modems' buffers are generally larger.

Avoiding the problem can be pretty simple - limiting your upstream bandwidth just below its maximum helps, and some smarter solutions involving prioritising ACK packets work even better. Although these are best achieved at your router, a number of applications have their own limiting features: every BitTorrent client will have one, and other tools such as scp (via the '-l' option) have them too.


Chris Lamb is a freelance software developer and the current Debian Project Leader. You can read other posts by me, see software I have written or read more about me. You can also follow me @lolamby.


Planets: ALUG UWCS WUGLUG Debian

Saturday 15th September 2007


Three comments