Limit the CPU usage of a process (Linux).

There have been times when I wished that I could limit the cpu usage of a process even though it might run slower , There is a simple way to do it on Linux .

Just type the following in terminal.

 cd /tmp
 wget 'http://downloads.sourceforge.net/cpulimit/cpulimit-1.1.tar.gz'
 tar -zxvf cpulimit-1.1.tar.gz
 cd cpulimit-1.1
 make
 cp cpulimit /usr/local/sbin/
 rm -rf cpulimit*

If you are a debain/Ubuntu user you can also do the following in terminal.


$ sudo apt-get install cpulimit

After installation to limit the cpu usage of a process :

cpulimit -p  -l

Happy cpu reduction !!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s