Date: Tue, 27 Jan 2009 21:40:03 -0700 From: Shawn Badger <shawnbadger@gmail.com> To: Chuck Swiger <cswiger@mac.com>, freebsd-questions@freebsd.org Subject: Re: Laptop battery life on FreeBSD Message-ID: <497FE1A3.3060908@gmail.com> In-Reply-To: <BAA6EEC3-FF5A-4636-A63E-32B7ECB4C48A@mac.com> References: <497F9683.3080905@gmail.com> <2F8A37C3-178D-48CB-A17A-CBF6CAD86F60@mac.com> <497FAB99.1050607@gmail.com> <BAA6EEC3-FF5A-4636-A63E-32B7ECB4C48A@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?497FE1A3.3060908>