From owner-freebsd-questions@FreeBSD.ORG Wed Jan 28 04:41:19 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 52C2E106564A for ; Wed, 28 Jan 2009 04:41:19 +0000 (UTC) (envelope-from shawnbadger@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by mx1.freebsd.org (Postfix) with ESMTP id DFEAB8FC0A for ; Wed, 28 Jan 2009 04:41:18 +0000 (UTC) (envelope-from shawnbadger@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so6882438rvf.43 for ; Tue, 27 Jan 2009 20:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=S8vgDDDikIDuLSK4BZJ4KMLgRN0GqzW+wjges5IiPtY=; b=Rtw6BQQLyHHPzuA6nhrk9VUNUGV1RLw67Q7EPa9lj+jYLR33WY6Yvu2LUclUG8uH6J bRi4309jlWw1XMr8+IF5Nj5YCWfZX3JAOrbS6hz7nMgXx6WIn8vMBroLbMkXv3l4br48 LQWd79bx+ZBU9Susv//IJAcpBZjkLsTHOuqSo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=qKwxpiSV2YgrjTdasWnsMQL8y/j/urDL066K3rLdYcW1J9lWxjY1mfobxuz4NRkhPA IPnHneTeXZKIbKYz1V2Ar1iWAQSv47UKFja3fKhmPNGaVraDlQgt+Y8jtp3pufeH3FA7 DexRjYZE7xmGOKqavihWEI+F0W/IsWjuG+mBg= Received: by 10.142.154.14 with SMTP id b14mr2966600wfe.69.1233117678382; Tue, 27 Jan 2009 20:41:18 -0800 (PST) Received: from ?192.168.1.132? (69.169.154.48.provo.static.broadweave.net [69.169.154.48]) by mx.google.com with ESMTPS id 30sm27682270wfc.35.2009.01.27.20.41.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Jan 2009 20:41:17 -0800 (PST) Message-ID: <497FE1A3.3060908@gmail.com> Date: Tue, 27 Jan 2009 21:40:03 -0700 From: Shawn Badger User-Agent: Thunderbird 2.0.0.18 (X11/20081205) MIME-Version: 1.0 To: Chuck Swiger , freebsd-questions@freebsd.org References: <497F9683.3080905@gmail.com> <2F8A37C3-178D-48CB-A17A-CBF6CAD86F60@mac.com> <497FAB99.1050607@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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 04:41:19 -0000 Chuck Swiger wrote: > 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.... > Thanks for the info. I'll definitely do some tests and find a good balance. >> 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. :-) I too generally think of FreeBSD as a server OS, but I just can't get over how nice the development environment is - hence the laptop. Shawn