Google Plus

Setup maximum cpu consumption by a process with cpulimit

Written by Mel Kham on . Posted in Linux tutorials

cpulimit is a simple program that attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time). This is useful to control batch jobs, when you don’t want them to eat too much cpu. It does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly.




Install CPU limit on ubuntu :

sudo apt-get install cpulimit


How to use cpulimit?

Limit the process ‘bigloop’ by executable name to 20% CPU:

 cpulimit --exe bigloop --limit 20

 

cpulimit --exe /usr/local/bin/bigloop --limit 20 

Limit a process by PID to 45% CPU:

cpulimit --pid 2960 --limit 45

Use the  command bellow to find more about cpulimit:

man cpulimit


You can find a complete and more detailled about cpulimit use on this link

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Edson Carlos

|

In debian no found. I need link download install in linux debian

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

DragonFartOutLoud

|

it went to china.

DragonFartOutLoud

|

great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)

jet li

|

i try the method, and i unzip the image contain zip secret, i dont find the file that i was hide, where it go? and how to open it? :s

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .