22
5
Is there a way in Linux to give a specific application more/less priority for network bandwidth? Something like how nice
does for CPU priority.
Context: I'm currently on a very low bandwidth connection (3G dongle). While I'm performing a quite large upgrade using aptitude
, it becomes virtually impossible to browse the web since the upgrade download is hogging my Internet connection.
So what I would like to do is somehow decrease the network bandwidth priority of the aptitude
process (and all its children) so that it won't use too much bandwidth while another process is using it.
Does aptitude use a specific port for its connections? If so, you can set the priority of that port lower using QoS in your router (if your router has that capability). – MaQleod – 2011-07-12T00:55:20.017
@MaQleod: 1) No, it uses HTTP for its downloads. 2) Since I'm on a 3G network, I don't have a router (well, not one I can access anyway). – Job – 2011-07-12T06:39:46.577
I would just rate limit the download speed of aptitude/apt instead of trying to play with its priority. Set it to a half of your max bandwidth to leave some for browsing. I've tried to state my reason for not playing with QoS in the comment to Catalin's answer. – vtest – 2011-12-05T13:33:04.753