Fighting for the power.

Ian Smith smithi at
Tue May 12 10:53:24 UTC 2009

On Mon, 11 May 2009, Gary Dunn wrote:
 > On Tue, 2009-05-12 at 02:13 +0300, Alexander Motin wrote:
 > ...
 > > 
 > > What's about general effect, the main idea here is the same as in audio 
 > > processing: result mostly depends on quality of the worst component. 
 > > Your system may just have some other consumers which I don't have. For 
 > > example, desktop CPU instead of mobile, desktop chipset instead of 
 > > mobile, powerful external video instead of (or even in addition to) 
 > > built-in, and so on.
 > > 
 > Interesting point. Is there a power consumption benchmark for evaluating
 > hardware for use with FreeBSD?

make buildworld, running on battery? :-)

More seriously: thanks to Nate's earlier niggling, I've been thinking 
towards a richer set of power profiles than our {performance,economy} 
dichotomy for a while, both in terms of various different work/play and 
AC/battery scenarious, and re specific settings that may be more or less 
optimal for particular hardware, that could be distributed or advised as 
more of a basic working set rather than as a series of 'try this' hints.

Many of the useful points Alexander makes apply to lots of recent kit, 
but perhaps not as applicably to some older machines - just one example 
being whether using C3 is likely to help or hinder, eg with the C3 
quirks for (some) PIIX4 chipset variants that got some work last? year.

I'm not a C programmer, so I've been thinking more towards inclusion as 
a deeper level of rc.conf variables and parsing of these by sh script, 
tweaking sysctls after the fashion of the present power_profile and 
its triggering by devd events.

Some features of individual machine / scenario profiles could include 
min/max cpu freq settings, whether or not to use p4tcc/acpi_throttle, 
highest C-state, powerd high/low load shift up/down percentages, and 
perhaps whether or not to power-down (D3) various devices/subsystems ..

Recent exposure to (debian etch) cpufreqd profiles provides a few more 
ideas, eg here are a few examples from its default cpufreqd.conf, noting 
that cpufreqd and friends are add-ons, not system components, in debian.

# stay in performance mode for the first minutes
name=AC Off - High Power
ac=off                   # (on/off)
#exec_post=echo 5 > /proc/acpi/sony/brightness profile=Performance Low

# conservative mode when not AC
name=AC Off - Medium Battery
ac=off                   # (on/off)
#exec_post=echo 3 > /proc/acpi/sony/brightness profile=Powersave High

# conservative mode when not AC
name=AC Off - Low Battery
ac=off                   # (on/off)
#exec_post=echo 3 > /proc/acpi/sony/brightness profile=Powersave Low

# Special Rules
# CPU Too hot!
name=CPU Too Hot
profile=Performance Low

# use performance mode if I'm watching a movie
# I don't care for batteries!
# But don't heat too much.
name=Movie Watcher
profile=Performance High

cheers, Ian

More information about the freebsd-current mailing list