Installing CPU limit and init script

CPULIMIT WEB PAGE: CPU limit

HOW TO: การติดตั้งโปรแกรม cpulimit](http://www.susethailand.com/suseforum/index.php?topic=1766.0)

So, the links are nice I guess, but normally we would expect more effort on your part including just why I would want to limit my CPU’s? What made you decide to post such information? Have you ever used the script before and if so why? I am not inclined to leave this post here without more information from you as the poster of said information that we would want to use.

Thank You,

While I am not the original poster, I can say that I’ve used cpulimit on several occasions and it is very useful.

The concept: You have a massive task that may take up far too much cpu and interfere with other more important operations. cpulimit can be invoked to limit the cpu usage of THIS task to 10%. This will cause the task to take much more time, of course, but will allow it to run concurrently without interference with other tasks.

In my case, this usually involves running a huge “delete all files in this folder over 6 months old” when the folder may contain several million audio recordings. This may not work nicely when mysql and many other processes are continually trying to use CPU at a fairly heavy rate. Having the ability to limit CPU usage to 25% or 10% or even 5% may cause serious delays … but the task will complete without breaking any other functionality.

I have used this utility on Ubuntu and Gentoo with great success to accomplish this task. I landed here today because we now use OpenSUSE for more than half our servers (we have several racks …) and it would be nice to know if this utility is easily installed/used in OpenSUSE … and Google landed me here! :sunglasses:

If you like bash scripts, have a look at my blog for lots more: https://forums.opensuse.org/blogs/jdmcdaniel3/

Thank You,

Hi
Version 1.7 is in the utilities repository, I have taken the liberty and pushed an update for version 1.9;

Since there was some abandonment of the code by the original author, it was resurrected here LimitCPU and is the version used.

On 2013-07-24 03:46, malcolmlewis wrote:

> Hi
> Version 1.7 is in the utilities repository, I have taken the liberty
> and pushed an update for version 1.9;
> https://build.opensuse.org/request/show/184130
>
> Since there was some abandonment of the code by the original author, it
> was resurrected here ‘LimitCPU’
> (http://limitcpu.sourceforge.net/index.php) and is the version used.

Thanks, that’s good to know. I have used cpulimit on the past, because
“nice” is at times not enough to make some tasks run nicely enough.
Another reason is that I may not want an intensive cpu task to heat the
cpu that much at 100% power for hours - some delay maybe “healthier”.

If it were possible to dynamically tune down a task - say: adjust
between 10…80% so that the total load is below 80%. This way if other
tools need cpu, they have it. If they don’t, this heavy task gets it, up
to 80%.

Another possibility would be to tune a task down if the cpu heats up.

Just wondering…


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))