Archive for August 29th, 2005

Shaping Internet Traffic

Monday, August 29th, 2005

When you are downloading/uploading full-bore using BitTorrent, often your connection is completely flooded.
Anything you try to do is dog slow, and conections are often lost in any internet games you play.

It turns out that there is a way to make your BitTorrent traffic have a lower priority than other traffic.
It’s called “traffic shaping”, and I’ve got it working on tnir thanks to
Wonder Shaper.

It’s just a shell script — it’s not even very long or fancy.
It makes use of the “tc” command, which is relatively new to Linux.
“tc” stands for “traffic control”.
Personally, I would have preferred “ts” for “traffic shaping”, but perhaps the tool predates the new (to me) terminology.

After installing it last night, I set BitTorrent to my highest usable level of upload speed (65 k/s), which usually kills any games or web browsing that is done.
Reports from Ronnie upstairs indicate that it’s as if there was no BitTorrent running at all.
Meanwhile, Azureus is reporting a full 65 k/s upload and often over 100 k/s download speeds.


Now, this is really a Linux-only script, so you can’t use it on your (eek) Windows firewall, or your Linksys or D-Link routers.
Well, maybe the LinkSys, since it apparently runs some version of Linux, but doing that is a definite exercise for the reader.
Otherwise, if you don’t have a Linux firewall, this won’t really help you very much.
But, at least you have another buzzphrase to look for in router advertising: “traffic shaping”.
Oh, you might also see the term “QoS” used in conjunction, which stands for “Quality of Service”, which shaping generally increases.

Other links:
an article
about traffic shaping;
Linux Advanced Routing & Traffic Control site;
traffic shaping