Trickle is a great tool to manage Network resources. Sometimes, it just happens that some process consumes resources to an extent that it starts to bog down other applications. That is definitely not what we want. Its just that, we may want other process to have their fair share. In such a scenario, we may want to limit bandwidth to that specific process which may hamper other applications. If you want to know about how Monitor Bandwidth usage by Process then, follow the link. Here, we cover how to Limit Bandwidth with Trickle in Ubuntu.
So, this is what we try to achieve with Trickle – limit upload and download speeds of an application. Besides, we can also set distinct download and upload speeds. But, there are couple of exceptions on which Trickle won’t work. Those exceptions are – setuid and statically linked executables.
First we cover installation steps. Thereafter, the limiting bandwidth part.
Note: Following installation steps would require superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.
Install Trickle in Ubuntu
Trickle package is a part of standard Ubuntu repository. So, we need to update the repository before installing the package. This ensures we get to have the latest version of the package. Hence, open a terminal and issue the following –
sudo apt update
Next, to install trickle –
sudo apt install trickle
Limit Bandwidth with Trickle in Ubuntu
Now comes the interesting part – limiting download and upload speeds. We can use the following syntax –
trickle -u <upload_speed_in_KB/s> -d <download_speed_in_KB/s> [process_name]
For instance, if want to limit the download and upload speed of a ELinks then,
trickle -u 10 -d 10 elinks
It would limit upload and download speeds of ELinks to 10 KB/s.
It is worth mentioning here that, it wouldn’t work with currently running instance of an application. So, we need to launch the application with trickle and only then things work. For instance, if we already had an instance of ELinks running. And, we tried to run the above command then, it would open a fresh instance of ELinks rather than limiting speeds for current instance.
In conclusion, we have covered here how to limit bandwidth with Trickle in Ubuntu here.