[CentOS] Understanding cpuspeed/cpufreq

Fri Dec 22 12:06:02 UTC 2006
James Pearson <james-p at moving-picture.com>

[I sent this to the RHEL4 list - but maybe someone on this list knows more]

I have a number of dual CPU and dual CPU/dual core Opteron systems that
are used as compute servers. In an effort to reduce power consumption
and reduce heat output, I would like to make use of the PowerNow!
capabilities to clock back the CPUs when the machines are idle.

These machines are running a 2.6.9-42 RHEL4 kernel

However, in my tests so far in using the cpuspeed daemon or setting the
  kernel cpufeq governor to 'ondemand', the CPU will clock back their
frequencies in situations where one or more CPUs are being heavily used
i.e not what I want.

Having a look through the cpuspeed daemon src (there is no man page), it
forks a separate process to monitor each CPU - however, AFAIK it is not
possible to runs these CPUs at different speeds - so it appears that
when one of the daemons decides it should clock back 'its' CPU, all the
CPUs are clocked back ... regardless of the fact that one or more of the
other CPUs may be busy.

Something similar seems to be happening using the various cpufreq
governors - configuration is available for all CPUs separately (under
/sys/devices/system/cpu/cpuN/cpufreq). i.e. it appears you can configure
settings for each CPU independently, but in reality all CPUs must run at
the same speed.

Essentially what I want to achieve is something like: if _any_ CPU is
'busy' (usage over some threshold over some sampling period), then run
at full speed and if _all_ CPUs are 'idle' (all below some threshold
over some sampling period) then clock back the CPUs.

Is there something/some setting(s) that can do this?

Thanks

James Pearson