Comments on How To Limit CPU Usage Of A Process With cpulimit (Debian/Ubuntu)
How To Limit CPU Usage Of A Process With cpulimit (Debian/Ubuntu) This tutorial shows how you can limit the CPU usage of a process with the tool cpulimit on Debian/Ubuntu. 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.
3 Comment(s)
Comments
cpulimit -e apache -l 80 -b >> /dev/null
Thanks Falko for this! Your piece helped me immensely when I found it!
When using Handbrake, my QuadCore heated up alarmingly, because Handbrake maxed all cores to 100%.
After installing, I found that cpulimit is a great help, assuring that Handbrake "behaves". Although makes Handbrake run slower (duh!), I don't have to keep an eye on my CPU temps all the time.
In practice, I start handbrake, pause it, get its PID with top (e.g. 123), and do in CLI:
cpulimit -p 123 -l 100
This limits (yes, the switch -l is a lower case L) Handbrake to 25% of my total (quadcore= 400%) CPU.
Works brilliantly! Me happy bunny!
Hi, i found a little problem with cpu limit, perhaps someone can help me
can i make cpu limit work in a background, i tried using screen but not working
any suggestion ?