Thursday, March 20

Trickle the userspace traffic limiter

trickle (available in a package repository near you) is a neat little tool to limit network bandwidth of a particular app. It's very useful for those situations where you don't want your connection gobbled up, but the application in question does not implement traffic limiting. For example, to run a dist-upgrade capped at 30 KB/s, run this:

trickle -s -d 30 apt-get dist-upgrade

(Care to guess what I'm doing now?)

Note that trickle does not seem to work across the sudo boundary: don't do trickle -s -d 30 sudo foo, do sudo trickle -s -d 30 foo .