Skip to main content

Posts

Showing posts with the label limit

Limiting the CPU usage of applications on Linux (ubuntu, debian, fedora etc.)

Monitor the CPU usage of applications that we use, it is recommended if you need to maintain a good performance on your system, sometimes in our system we have applications that should not stop working and we need some free resources on your computer for them. Linux can prevent other applications to consume these resources and the applications work properly within a cpu limit. To install in ubuntu: $ sudo apt-get install cpulimit It is in the universe repositories. To install it on any other Linux distribution follow this: $ wget http://downloads.sourceforge.net/cpulimit/cpulimit-1.1.tar.gz $ tar-zxf cpulimit * xxx.tar.gz $ cd cpulimit-xxx $ make Use it To use it, you will need to know the name of the application or PID, once you know it: Examples of use If we want to avoid that Firefox does not exceed 30% of CPU usage type cpulimit -e firefox -l 30 In the case of wanting to limit the process with PID 3675 to use only 40% CPU at maximum, for that type on your console as f...

How to limit the download speed of apt-get

Learn how to limit the download speed of the APT package manager in Kubuntu, Ubuntu or any Debian-based Linux system. Do you share your ADSL connection to your neighbors? Your broadband connection is shared by several computers on a small network or LAN? If so, it is likely that everyone will complain that the internet is very slow when doing a system update in broad daylight as apt-get will occupy the entire bandwidth of your Internet connection. To avoid this problem and have to do updates during the night, with a few lines in a text file you can limit the bandwidth consumed by apt-get and not saturate the Internet connection. For Kubuntu, Ubuntu and company Just as root, you must create a text file in the folder: $ vi /etc/apt/apt.conf.d/ limitlevel The text file can have any name. This example 'limitlevel'. This file should contain the following lines of text: Acquire { http { Dl-Limit "100"; } } The number 100 can be changed to your liking and represents...