[Tfug] "Normal" ondemand governor usage?

John Gruenenfelder johng at as.arizona.edu
Mon Nov 24 21:21:36 MST 2008


On Mon, Nov 24, 2008 at 02:23:32PM -0700, Claude Rubinson wrote:
>I was just reviewing Matthew Garrett's "good practices" for power
>management (http://www.codon.org.uk/~mjg59/power/good_practices.html)
>and one of the things that he discusses is that one should use the
>ondemand power governor.  I do, but only very rarely does my cpu go
>above 600MHz (it's an Intel Pentium M that runs up to 1.2GHz).  For
>example, when starting up Firefox (Iceweasel), the cpu will briefly
>jump to 1200MHz and then return to 600.  Even when I run fairly
>intensive statistical analyses (RAM tends to be the bigger issue here)
>or watch video, the processor sticks to 600MHz.
>
>I've always just assumed this was because the processor simply wasn't
>being taxed but after reading Garrett's comments, I'm wondering if
>this is correct.  Should my processor be bursting more frequently?
>More to the point: How can I know if something's normal/buggy with my
>cpu frequency scaling?

I think you're either not seeing it change or the brief period where your
machine needs the extra speed aren't occuring as often as you might think they
would.

Try running cpufreq-info (in the cpufrequtils package).  It will tell you what
governor you are currently using, which are available, what the current speed
is, and, most important to this question, what percentage time the machine has
spent at each of the available speeds.

On my new Mythbox/server, it's only been up five days and I've been running
some very long jobs on it (transcoding).  I get this output:

analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 2.70 GHz
  available frequency steps: 2.70 GHz, 2.60 GHz, 2.40 GHz, 2.20 GHz, 2.00 GHz,
  1.80 GHz, 1000 MHz
  available cpufreq governors: powersave, ondemand, conservative, userspace,
  performance
  current policy: frequency should be within 1000 MHz and 2.70 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
  cpufreq stats: 2.70 GHz:53.22%, 2.60 GHz:0.07%, 2.40 GHz:0.05%, 2.20
  GHz:0.05%, 2.00 GHz:0.04%, 1.80 GHz:0.19%, 1000 MHz:46.38%  (1656)

So, the CPU is basically on or off.  Spending little time inbetween.  The
stats for the second core are identical.  The only info not listed here are
the parameters which tell ondemand how to behave.  If you poke around in proc
or sys, you can change the threshold values, if you like.


-- 
--John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list