From owner-freebsd-questions@FreeBSD.ORG Tue Jan 22 03:58:52 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A3B216A419 for ; Tue, 22 Jan 2008 03:58:52 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7C513C458 for ; Tue, 22 Jan 2008 03:58:50 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id OAA07538; Tue, 22 Jan 2008 14:58:14 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 22 Jan 2008 14:58:13 +1100 (EST) From: Ian Smith To: Tijl Coosemans In-Reply-To: <20080121180417.5841A16A468@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Andreas Davour , Wojciech Puchar , freebsd-questions@freebsd.org Subject: Re: Throttle the CPU when the system is idle X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 03:58:52 -0000 On Mon, 21 Jan 2008 17:54:44 +0100 Tijl Coosemans wrote: > On Monday 21 January 2008 16:13:36 Andreas Davour wrote: > > On Mon, 21 Jan 2008, Tijl Coosemans wrote: > >> Throttling still made a huge difference on my systems. On my old two-speed Thinkpad, powerd nearly halves total power drawn! > > Many different opionions here. How did you do it then? > > In /etc/sysctl.conf: > debug.cpufreq.lowest=400 > > In /etc/rc.conf: > economy_cx_lowest="LOW" > performance_cx_lowest="LOW" > powerd_enable="YES" > powerd_flags="-i 92 -r 65 -p 200" The documentation on all of this could use a little expansion for those unable to locate/read the code. The BUGS section of powerd(8) states: "If powerd is used with power_profile, they may override each other." without saying what might be done about that. /etc/rc.d/power_profile is called by default (on ACPI laptops) in /etc/devd.conf like so: # Switch power profiles when the AC line state changes. notify 10 { match "system" "ACPI"; match "subsystem" "ACAD"; action "/etc/rc.d/power_profile $notify"; }; A browse of power_profile shows that using the below /etc/rc.conf values will prevent it from messing with dev.cpu.0.freq when using powerd (with notes from rc.conf on my Thinkpad T23 at 6.1-RELEASE): # 27/9/6 powerd manages cpu freq nicely, but not (yet?) CX states powerd_enable="YES" # default flags seem ok for T23 # disable power_profile management of cpu freq (fights w/ powerd) performance_cpu_freq="NONE" # Online CPU frequency economy_cpu_freq="NONE" # Offline CPU frequency # 24/9/6 power_profile still manages on/offline lowest CX state # 13/10/6 LOW value C2|C3 depends on whether booted on or offline? performance_cx_lowest="HIGH" # Online CPU idle state economy_cx_lowest="LOW" # Offline CPU idle state Andreas: Tijl's value of -p 200 (ie poll online status and idle percentage every 200ms instead of default 500ms) should help with concerns about how fast powerd ramps up frequency when load occurs. Copying Wojciech as well, as he seemed to be possibly? unaware of the difference using cx_lowest values (ie which method of halting the CPU) other than C1 can make to power consumption, and thus CPU temperature. HTH, Ian