[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Does nice-ness exist for bandwidth? [sic]



> Can I nice various network jobs [eg, web-browsing, apt-get update,
> mail-get]
> like I would a CPU process.
>
> Here's the deal.
>
> Using nice on my linux box is great.
> eg.
> nice make-kpkg --revision=x kernel_image
>
> While compiling my kernel I still get priority to other
> things that I'm doing [mozilla, ooffice, etc] but if I'm
> not doing anything all my cpu cycles go to the compile.
> [I'm sure most people know what nice is but I want to make
> sure my point is clear.]
>
> I'd like to do the same thing with respect to bandwidth.
> eg.
> netnice wget http://foo.com/dirty_big_download
> netnice apt-get dist-upgrade
>
> Now if I'm web-browsing and reading a page already loaded
> all the bandwidth goes to wget/apt-get.
> But when I am loading a web-site or checking my mail then
> the priority for the bandwidth goes to the browser like
> in the cpu-nice example.
>
> =======
> Does an application that achieves the above exist currently?
> If not; is it possible or even a good idea?
>
> Thankyou,
>
> Lex.
>
> PS - I'd appreciate a CC because I'm not on user list but
> I will check the web archives regardless.
>

I believe I read recently that tc (traffic control) and iptables can be
combined to provide a solution for what you're describing.  Someone
correct me if I'm wrong but it seems you can use iptables to set rules
such that all web traffic (port 80 and 443 for example) can be directed
into one traffic management queue (queue discipline?) and all apt-get
traffic can be routed into another queue (depending on which tcp port it
uses) and so on.  I plan to implement (try to implement) this myself soon.




Reply to: