|
/Admin/LAN:
Wondershaper: Give Interactive Users Priority
Over Downloaders / Uploaders
If you have a LAN where downloads / uploads that you have no direct control over are saturating your internet connection, "wondershaper"[5] is a relatively simple solution: cap total download and upload bandwidth so as not to saturate the connection, and give interactive users priority use of bandwidth. The tricky part is tuning, as wondershaper is invoked by:
wondershaper eth0 1000 300
where the first number is supposed to be maximum sustained download rate, and the second should be maximum sustained upload rate. Note that wondershaper must be run on your router, on the internet-facing ethernet interface (here, "eth0").
Unfortunately, at least where I live (in Asia) available bandwidth can be highly variable with the day of the week and the time of the day. No bandwidth guarantees. Just be happy both the ISP network and the power are up today....
I used various "speedtest" websites[1][2][3][4] to get some numbers. Note that the units of the wondershaper parameters are kilo BITS per second, *not* kilo BYTES per second, so the numbers will be quite a lot bigger then you might think. Docs emphasize experimenting to find the right numbers.
In practice, I find myself keeping a terminal open on my wireless router, and tuning wondershaper sometimes several times a day. If interactive response (ie. surfing, etc.) is sluggish, I reduce the parameters. And sure enough, in my own download client, I will see an immediate reduction in bandwidth consumption. If I am going out or working "offline" for a while, I increase the parameters, or turn wondershaper off entirely.
The nearest thing I can find to upstream for wondershaper is here[6]. Its a shame the author did not document his work in greater detail, because reading the source (a script) is not helpful either. The script is very compact, but I have no idea what it is doing without becoming an expert on "Linux Advanced Routing & Traffic Control"[7].
[1] http://wwitv.com/speedtest/asia.htm
[2] http://www.speedtest.jp/
[3] http://www.sijiwae.net/speedtest/
[4] http://www.numion.com/
[5] http://packages.debian.org/unstable/net/wondershaper
[6] http://lartc.org/wondershaper/
[7] http://lartc.org/
posted at: 08:41 | path: /Admin/LAN | permanent link to this entry