75

I am getting complaints that I consume lots of internet bandwidth.

Is there any software that can limit internet bandwidth on my computer from my own computer? I use Firefox as browser and use bittorrent and download software from software center.

(Is there also a way to monitor it?)

Zanna
  • 70,465
S L
  • 1,919

1 Answers1

88

You have 2 easy to use via terminal. Wondershaper and Trickle. There are more here: How to limit internet speed?

Anyway the basics are:

sudo apt-get install wondershaper

In terminal find out what is the name of the interface connected to your internet by using ifconfig. Could be eth0, eth1, eth2, etc... In my case is eth1. So, I would do this:

sudo wondershaper eth1 1024 256

This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.

If you want to reset that do this sudo wondershaper clear eth1

NOTE: That will limit ANYTHING in your PC, for example the torrent downloader, firefox, etc..

Another program is Trickle

To install do this:

sudo apt-get install trickle

To run firefox with a maximum of 120KB/s download and 32KB/s upload, run

trickle -d 120 -u 32 firefox

In my case I recommend wondershaper.

If you want more info for any of the two after installed type man wondershaper or man trickle depending on the one you installed.

Jo Liss
  • 265
Luis Alvarado
  • 211,503
  • 1
    Is it possible to limit/reverse internet bandwidth for each program instead of per device? – Nur May 02 '13 at 01:41
  • @Nur For what I know, it is possible but involves some kernel editing and other stuff outside of the user space. It would be awesome to have a similar approach as tools like the Windows Netlimiter. Of course netlimiter connects a process that manages the connection sharing, but the idea remains the same and would help a lot in network cases where this applies. – Luis Alvarado May 02 '13 at 01:43
  • 1
    Trickle can do that http://askubuntu.com/questions/776/how-i-can-limit-download-upload-bandwidth trickle -u (upload limit in KB/s) -d (download limit in KB/s) application – kenn Jan 25 '14 at 13:06
  • 1
    WARNING: as of writing this comment trickle only works for 32-bit operating systems, it does not support 64-bit – Karl Morrison Jun 29 '15 at 18:52
  • @KarlMorrison Thank you. VERY important to know that. +1 – Luis Alvarado Jun 30 '15 at 01:12
  • 1
    I might have to rephase because a person was able to get it working on 64bit vivid apparantly. I put a bug report in the github if you want to see more. Im running 14.04 and it does not work. – Karl Morrison Jun 30 '15 at 08:13
  • I recommend putting the link to the bug report here, so anyone with the same issue can go there quickly. – Luis Alvarado Jun 30 '15 at 14:14
  • @KarlMorrison Trickle is part of debian 32 and 64bit. – ctrl-alt-delor Aug 11 '18 at 08:53
  • I'm not able to use the version of Wondershaper in Ubuntu 19.04. It limits bandwidth, yes, to about 300 bytes per second, regardless of the desired speed I put in. – krubo Jul 04 '19 at 07:25
  • @krubo Thank you for the feedback. I also test this and although at around 250kb to 1MB I did not noticed anything, when I got to 10MB, 25MB and 100MB, everything got stuck in around 1.5MB, so yes, there is some bug with wondershaper. I suggest going to their site and posting this as a bug. – Luis Alvarado Jul 15 '19 at 17:56
  • @krubo The values you give to wondershaper are in kilobits per second. 300 bytes per second is barely even possible, the lowest value you can give is 1 (1000 bits per second), which is 125 bytes per second. It is as if you gave "3" in the parameter. I know people don't love hearing this: wondershaper works perfectly for me (in 18.04 LTS). LTS for the win. – doug65536 Oct 17 '19 at 19:35
  • @doug65536 yes, that was a long time ago. I assume they changed the minimum and the unit used for it. Have not tried it for years. – Luis Alvarado Oct 17 '19 at 21:26