Noyzi!!a’s Blog


CPU Usage Limiter for Linux

Posted in Linux by Noyzi!!a on the August 25th, 2007

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 they 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

Examples of use

Limiting the program ‘bigloop’ by executable name to 40% CPU:
$ ./cpulimit --exe bigloop --limit 40
or
$ ./cpulimit --path /usr/local/bin/bigloop --limit 40
Limiting a program by PID to 55% CPU:
$ ./cpulimit --pid 2960 --limit 55

link : http://cpulimit.sourceforge.net/

Leave a Reply