Bandwidth shaping made easy with Trickle
Posted by isilanes on February 24, 2007
I have recently downgraded the bandwidth of my internet connection, switching to a flat rate (previously I had a monthly traffic limit, albeit with a wider bandwidth). This means that now I can download to my heart’s content, but it also means that when doing things like upgrading my Debian OS with aptitude, it eats all of my bandwidth, and I can barely do anything else in the Internet, untill all packages are upgraded.
When dealing with programs that do not have this facility, we can always resort to Trickle, which can set arbitrary limits to any program it is used with. For example:
% trickle -d 20 aptitude upgrade
aptitude upgrade as usual, but with a maximum download rate of 20 kB/s. Note:
aptitude usually spawns two processes (downloads files in couples, not one by one), and the limit imposed by trickle is applied to each process, so the used download bandwidth will be double that specified in the command line. Or, in other words, if you want
aptitude to use X bandwidth, execute:
% trickle -d X/2 aptitude upgrade
This entry was posted on February 24, 2007 at 10:56 am and is filed under Free software and related beasts. Tagged: en, floss/linux, internet, networks, Software. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.