From owner-freebsd-questions@FreeBSD.ORG Wed Jan 28 01:39:40 2009 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 6117A1065670 for ; Wed, 28 Jan 2009 01:39:40 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 475E98FC0A for ; Wed, 28 Jan 2009 01:39:40 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out4.apple.com (Postfix) with ESMTP id 07DE9515CB9F; Tue, 27 Jan 2009 17:39:40 -0800 (PST) Received: from relay14.apple.com (unknown [127.0.0.1]) by relay14.apple.com (Symantec Brightmail Gateway) with ESMTP id E71B128085; Tue, 27 Jan 2009 17:39:39 -0800 (PST) X-AuditID: 11807134-a7859bb000000ff0-7c-497fb75b3bb1 Received: from cswiger1.apple.com (cswiger1.apple.com [17.227.140.124]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay14.apple.com (Apple SCV relay) with ESMTP id B94CC28041; Tue, 27 Jan 2009 17:39:39 -0800 (PST) Message-Id: From: Chuck Swiger To: Shawn Badger In-Reply-To: <497FAB99.1050607@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 27 Jan 2009 17:39:39 -0800 References: <497F9683.3080905@gmail.com> <2F8A37C3-178D-48CB-A17A-CBF6CAD86F60@mac.com> <497FAB99.1050607@gmail.com> X-Mailer: Apple Mail (2.930.3) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-questions@freebsd.org Subject: Re: Laptop battery life on FreeBSD 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: Wed, 28 Jan 2009 01:39:40 -0000 On Jan 27, 2009, at 4:49 PM, Shawn Badger wrote: >> Have you tried reducing HZ to 100 (put kern.hz="100" in /boot/ >> loader.conf and reboot)? >> Are you running powerd? Look into "sysctl hw.acpi" and "sysctl >> debug.cpufreq".... >> > Thanks for the ideas Chuck. I lowered kern.hz to 100 as you > suggested (does this affect the kernel's ability to track time in > milliseconds? ie. if I want to run a benchmark using the 'time' > utility?). Changing the scheduler quantum won't affect the system clock or the ability to do millisecond-level timing of userland processes. It does affect the granularity of things like ipfw/dummynet if polling is enabled, but shouldn't have any real negative effects otherwise. For most of Unix history, HZ=100 was a common default, and the reduced context switch frequency should result in a decent improvement to power drain. If you have a concern, consider comparing against HZ=250 and see how the battery life and responsiveness or granularity of network traffic, etc feel.... > And the output of the two sysctl queries is posted here: http://pastebin.com/m5ae8aa1c > > I'm not very familiar with acpi, so if you see anything that could > be optimized, I'd appreciate the feedback. I have limited experience with running FreeBSD on a laptop personally [1], so others will likely have more relevant feedback; I'm just aware of some starting points. :-) Regards, -- -Chuck [1]: I've helped a few people run FreeBSD 5.x/6.x on various IBM ThinkPads (circa T.42s) an maybe an HP Pavillion or Dell Latitude, and I've run FreeBSD a bit on a Mac mini and a MacBookPro (2,2), but I don't use FreeBSD on a laptop regularly...I think of it as a server OS. :-)