Limiting the resources of Ubuntu

Last update on September 5, 2009 09:25 AM by jak58
Published by jak58

Limiting the resources of Ubuntu





Limiting resources of specific processes under Ubuntu


On Ubuntu (and on most Linux distributions) you can easily prevent a program to consume all the power of the computer. Here's how:

Limit CPU usage


If an application uses the CPU at 100%, this could block everything. You can limit the process with the cpu limit command. Open a terminal and type:
cpulimit -e process -l 40

In this example this "process" will be limited to 40% maximum.
You can also use the process PID (which can determine top):

cpulimit -p 130 -l 40


There the process with PID 130 would be limited to 40%.
We simply open the program then set the limit.
It may be that you have to install cpulimit before. Refer to your distribution for that. The official website is http://cpulimit.sourceforge.net/.

Restrict disk access


If an application is using excessive disk drive, the system may crash , You can use the ionice command to solve this issue.
ionice -c3 PID
This command reduces disk access priority of a process (defined by its PID).
We simply open the program then set the limit.
Again it must be installed if it is not. (official site?)

Limiting bandwidth


A good thing is to limit the bandwidth (upload and download).
The command to be uses is trickle. Close program and then launch the command:
trickle -d 90 program

The program will be limited to 90Kbps for download. To limit upload, use the option "-u":
trickle -u 90 program

Here, the program is closed, and is limited from the start. To remove the limitation you must close and re-open it.
Again, you may need to install trickle if it is not set up by default.

http://monkey.org/~marius/pages/?page=trickle
Best answers for « Limiting the resources of Ubuntu » in :
How to Limit internet access to users? Show How to Limit internet access to users? Why restrict access to the Internet in the business? Monitor employees or limit access to the Internet? Limiting access to the internet: Defining a code of conduct Modes of regulation of Internet...
Installing Java under Ubuntu Show Installing Java under Ubuntu Issue Solution Issue By default, Firefox does not come with Java. Solution Open a terminal (Application Menu/ Accessories/ Terminal) and type in: sudo aptitude install sun-java6-jre sun-java6...
Having a static IP address under Ubuntu 8.10 ShowHaving a static IP address under Ubuntu 8.10 To have a fixed IP persistent: Configure manually the interfaces For a fix IP (10.0.0.1 on your eth1 interface) use: To make use of dynamic IP (e.g eth0): DNS NetworkManager is a...
Ubuntu- Playing MP3 files with Amarok ShowUbuntu- Playing MP3 files with Amarok Amarok is a popular software probable one of the most appreciated in the world due to its efficiency and inclusive package under Linux. Amarok is however set as default standard under the OS...
Installing FreeNX under Ubuntu 9.04 ShowInstalling FreeNX under Ubuntu 9.04 Intro Adding FreeNX components Installing FreeNX Note Intro FreeNX allows you to access to a machine remotely via ssh. The display is more powerful compared to X11 over ssh and it can be describe as...
Download Resource Hacker ShowResHack (Resource Hacker) is a freeware allowing to view, change, rename, remove or extract resources in executable files (.exe, .ocx, .dll, .res, etc…). It has an built-in compiler and decompiler: To see the cursors, icons, BMP, GIF, AVI,...
Download Ubuntu ShowUbuntu is a developed operational system for laptops, desktops and servers on " live CD ". Wherever you are,either at home or at school, Ubuntu contains all the applications which you will need. It proposes in particular: - word processing, -...
Operating system ShowDescription of the operating system For a computer to be able to operate a computer programme (sometimes known as application or software), the machine must be able to perform a certain number of preparatory operations to ensure exchange between...
Enterprise Resource Planning (ERP) - Integrated Management Softw ShowIntroduction to ERP ERP (in English Enterprise Resource Planning), also called Integrated Management Software (PGI), are applications whose purpose consists in coordinating all activities of a company (so-called vertical activities such as...