Trickle, userspace bandwidth shaper

I'm sitting at work, reading my email though my home computer, listening to
Nectarine. I've been listening
Nectarine and
Kohina exclusively for ages. For some
reason I'm suddenly totally fed up with these tunes. I start transferring some
music (legally ripped from CDs I own, of course) from my home computer to my
workstation here, just to realize reading email has suddenly become very
sluggish. That is something you get with an asymmetric xDSL-cable with no
traffic shaping set.

I've used Wondershaper to set
up intranet-global traffic shaping rules back home, but since my upstream limit
varies from day to day, it's not very practical. One day I can upload 80 KiB/s
just fine, another day mere 50 KiB/s will bring my SSH-connections to
near-halt. Obviously I should be shaping the traffic per process. This is where
Trickle comes in
picture.

In the most basic use case Trickle is trivial to use. To copy a file to
remote host using scp, you can limit the upload speed to, say, 40 KiB/s:

trickle -u 40 scp bigfile host:

As I'm copying several files from my home computer while at work, I just
issue the following command: