First, thanks for your answer!

On Saturday 8 July 2006 23:13, Richard Fish wrote:

> Well, I would first upgrade my cooling fans so the processor couldn't
> overheat! :-)

Upgrading cooling fan in a laptop isn't the easiest thing to do! :)

> But you could also enable "CPU freqency scaling" in the kernel, with
> the ondemand governor, and use the various settings in
> /sys/devices/system/cpu/cpu0/cpufreq to control the clock speed and
> behavior of the system.  You can use scaling_max_freq to specify the
> maximum frequency of the processor so that it will not overheat or
> throttle, no matter what the load is, and the
> ondemand/ignore_nice_load setting will tell the governor not to
> increase the clock speed for niced processes.

This is better, but still affects the system as a whole, and higly 
depends on the capabilities of your CPU.
What I really was looking for is something that can be configured 
per-process, to be able to limit only the CPU eaters.

Though not exactly what I was looking for, the ondemand/ignore_nice_load 
approach is probably the closest to what I want, although it still 
requires to be running at reduced CPU frequency. While certainly 
avoiding overheating, IIUC the governors.txt file all the system runs at 
reduced speed, but the CPU-intensive tasks (if suitably reniced) do not 
make the CPU increase its frequency. And we're still talking about CPU 
speed, not % usage.

I guess that truly limiting per-process CPU usage to a maximum percentage 
would require some modification to the kernel scheduuling code, After 
another bit of googling, I found this

http://www.tls-technologies.com/CPU/cpu-main.html

but unfortunately that is only for the 2.4 kernel.

Thanks for the answer,
-- 
[email protected] mailing list

Reply via email to