Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2328  / 2 Years ago, wed, march 16, 2022, 6:48:26

Is it possible to reserve (at least so much bandwidth) or limit (no more than so much bandwidth) the network usage of certain processes or applications. Alternatively, reserve/limit the network usage of an/some user(s) and or groups?



I'm interested in...: Limiting the bandwidth of specific process (PID). Limiting the bandwidth of each process by a certain name (e.g. each instance of rtorrent could not use more than 20kb/s, but five instances could thus use 100kb/s). Limiting the usage of all instances of program (e.g. all instances of rtrorrent could use no more than 50kb/s). Limiting the usage of groups of programs - either for each and/or collectively (e.g. any - or all - web-browsers (obviously they'd be listed somewhere) could use no more than 100kb/s).



Bonus: Is it possible to place a per-computer limit? I have two coumputers sharing on Internet-connection, and sometimes one takes all the bandwidth. On the other hand, sometimes one computer uses non or very little bandwidth, so then the other obviously should be able to take all there is. I would be satisfied by setting a hard limit of about half for each; but a more dynamically approach that allowed one to take all when the other was not used, would be desirable.



I have no idea what is possible or how it may be done, which is why I'm asking.



I plagued by the web-browser timing-out, while I use wget or bittorrent-clients to download files, so I'd like to impose some limits to ensure the ability to browse.


More From » networking

 Answers
6

It is possible but it's very complex. For full control you need to use qdisc and iptables to 'shape' the network traffic. This 'network shaping' is one of the most advanced that it's possible to learn how to do. This website explains quite a bit of the process: http://laddumishra.wordpress.com/2011/12/27/traffic-control-using-tc-in-linuxubuntu/



For an easier time you can use Wondershaper, but it offers no options on which processes get priority and has trouble running on some versions of Ubuntu. http://lartc.org/



In conclusion, it looks like this particular functionality needs serious investment if it is ever going to become easier for users to control their network traffic in a simple way.


[#31852] Thursday, March 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enincroscope

Total Points: 252
Total Questions: 124
Total Answers: 104

Location: Tajikistan
Member since Thu, Apr 14, 2022
2 Years ago
enincroscope questions
Thu, Jan 20, 22, 08:33, 2 Years ago
Thu, Apr 7, 22, 01:09, 2 Years ago
Mon, May 16, 22, 09:08, 2 Years ago
;