Re: Fighting for the power.

From: Ian Smith <smithi_at_nimnet.asn.au>
Date: Tue, 12 May 2009 20:25:27 +1000 (EST)
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
[Rule]
name=AC Off - High Power
ac=off                   # (on/off)
battery_interval=70-100
#exec_post=echo 5 > /proc/acpi/sony/brightness profile=Performance Low
[/Rule]

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

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

##
# Special Rules
##
# CPU Too hot!
[Rule]
name=CPU Too Hot
acpi_temperature=55-100
cpu_interval=50-100
profile=Performance Low
[/Rule]

# use performance mode if I'm watching a movie
# I don't care for batteries!
# But don't heat too much.
[Rule]
name=Movie Watcher
programs=xine,mplayer,gmplayer
battery_interval=0-100
acpi_temperature=0-60
cpu_interval=0-100
profile=Performance High
[/Rule]

cheers, Ian
Received on Tue May 12 2009 - 08:53:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC