[TEST/REVIEW] CPU accounting patches

Brian Candler B.Candler at pobox.com
Fri Jan 27 00:57:03 PST 2006

On Thu, Jan 26, 2006 at 06:44:32PM -0800, John-Mark Gurney wrote:
> The whole point of this discussion is regarding systems that scale
> back their cpu clock when not in use, and speed up when the system
> is heavily used...   in your example of a 1/3rd of the clock speed,
> the system would magicly make the other 2/3rds of the cpu cycles
> available by the auto scaling daemon...

Hmm. How is that decision made - based on the amount of time spent in HLT
state because there is no work to be done?

My initial feeling was that if something was using 100 CPU seconds per hour,
and then the clock speed is reduced by 1/3 (for any reason) I wanted to see
it using 300 CPU seconds per hour, because that is an accurate
representation of the usage. Also, noticing the process using
(proportionately) more of the CPU resource would make me investigate why,
and possibly lead me to adjust system clock settings to meet my needs

I think what you're saying is: I'm at no risk of my CPU becoming maxed out
when speed has been automatically reduced by a power-saving daemon, because
it will only stay there if there is still some spare capacity (i.e. some
time is regularly spent in the HLT state). If not, the daemon will keep
cranking up the clock speed until there *is* some spare capacity, or until
max clock speed is reached.

I guess this is OK, *if* you trust the power management system to do its job
properly. Unfortunately I have very bad experiences of such things. In many
cases I've ended up turning off power management completely and locking
everything at max clock speed. Mind you, if I do that, anything you do with
scaling factors isn't going to affect me, so actually I don't really care.
I'll shut up now :-)



More information about the freebsd-current mailing list