D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Setting network bandwidths?

 

Simon Waters wrote:
> Grant Sewell wrote:
>   
>> Is there any way to restrict the network bandwidth usage a given 
>> application can use? 
>>     
>
> Yes Linux Advanced Routing and Traffic Control is the magic phrase (LARTC).
>   
>> For instance, I want to restrict the amount of 
>> bandwidth the machine doing a lengthy "apt-get upgrade" can use so that 
>> the other computers on my network can still use the Internet reliably.
>>     
>
> Wondershaper is the usual recommendation of "blackbox" style script,
> that uses LARTC for this. Already packaged in Debian and most derivatives.
>
> Be aware one can only control the sent data rate reliably, so whilst
> wondershaper will help, it is a lot more effective if the traffic is
> limited from the server end. I'm pretty sure that some of the UK Debian
> mirrors operate some sort of rate limiting or "fair share" policy.
> However one can rate limit the ACKs in a download, which has some effect
> on regulating the download speed.
>
> Personally I use "apticron" and/or "cron-apt" to ensure that the
> downloads take place at a sensible time of day. If you have multiple
> identical boxes consider also using a caching proxy (make sure it caches
> files this big), or apt-proxy.
Err... OK. Is LARTC something that is easily configurable on a single 
desktop machine? I have my mail server and web using apticron already so 
they do their updating overnight. I have just taken charge of a new 
machine that I'm setting up as a desktop machine - I'm going for a clean 
install of Debian/Testing rather than try to fix the horrible mess I 
made of Debian/Unstable from the old desktop machine.

There are some really nice tools around that are simple to use and do 
exactly what you'd expect... for example, "su -c 'command'". I would 
really like something that is just as simple, but designed to limit 
network usage. Something along the lines of "netrestrict -r 256k 
'command'" (a made up command, incidentally) would be ideal. Having 
briefly looked at the wondershaper man page, it doesn't seem to be what 
I'm looking for... I'm sure it works fine to limit upload/download 
speeds overall for an interface, but I'm looking for something that will 
work for a single application.

Cheers.
Grant.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html