"nice" for Networking

12

7

UNIXish systems have a command-line utility called nice that can be used to run programs at a low priority, so that they don't hog the CPU.

Is there anything analogous that will limit the amount of network bandwidth a program uses? Sometimes I'd like to start a big download, but want my web browsing and other interactive network usage to stay responsive.


Related questions:

Kristopher Johnson

Posted 2010-08-16T22:46:39.593

Reputation: 1 570

Answers

20

trickle -d 10 command runs command, limiting its bandwidth to 10kB/s. This is the analog of nice for bandwidth. It is packaged by at least Debian and Ubuntu.

ip_relay and redir are both tiny TCP proxies that support bandwidth limiting. Neither of them seem to have been maintained recently, but they're packaged by at least Debian and Ubuntu.

But maybe the tool you're using for downloading already supports bandwidth limitation, for instance wget --limit-rate=10k, curl --limit-rate 10k, rsync --bwlimit=10.

Gilles 'SO- stop being evil'

Posted 2010-08-16T22:46:39.593

Reputation: 58 319

Wish I could upvote this twice. – whitequark – 2010-08-17T00:02:04.800

made a point to login just so I could upvote this answer. trickle is great! – hometoast – 2010-08-17T17:47:25.437

If you want a priority, try configuring QoS in your router. – Michael Cole – 2017-09-13T17:55:18.203

9These are not the analog of nice (though they are very useful!). nice defines a priority, not a limit. An analog of nice would give a process unlimited bandwidth if no other process wanted it. – Ian Mackinnon – 2010-09-12T18:36:29.270