Date: Mon, 18 Apr 2005 20:02:25 -0500 From: Eric Anderson <anderson@centtech.com> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: freebsd-current@freebsd.org Subject: Re: powerd(8) Message-ID: <426458A1.7010008@centtech.com> In-Reply-To: <200504191026.55803.doconnor@gsoft.com.au> References: <20050418232944.271AD5D07@ptavv.es.net> <200504191026.55803.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel O'Connor wrote:
> On Tue, 19 Apr 2005 08:59, Kevin Oberman wrote:
>
>>I also have found that changing the polling interval to 150 is an
>>improvement. Half a second is just too long, IMHO. I also discovered
>>that with my system (P4M) that some settings can use substantially more
>>power than faster settings, so I have kludged an ugly hack to avoid
>>those settings. These changes make a significant difference in power
>>consumption.
>
>
> Can you elaborate on these?
> It may be worth adding a general algorithm to cull the frequency list powerd
> uses based on this info.
>
Here's a quick perl script that does what I think he was doing. The lines that
have "skipping" in it are inefficient. (sorry for the ugly perl)
#!/usr/local/bin/perl
$sysctl = `sysctl dev.cpu.0.freq_levels`;
$sysctl =~ s/.+\: //;
@vals = split/\s+/,$sysctl;
$lastenergy = 0;
foreach $val (@vals) {
($mhz, $energy) = split/\//,$val;
$energypermhz = $energy/$mhz;
$energypermhz = sprintf ("%0.3f", $energypermhz);
if ($lastenergy == 0) { $lastenergy = $energy; }
if ($energy > $lastenergy) {
print "skipping $energypermhz -> $mhz - $energy\n";
} else {
print "$energypermhz -> $mhz - $energy\n";
$lastenergy = $energy;
}
}
--
------------------------------------------------------------------------
Eric Anderson Sr. Systems Administrator Centaur Technology
A lost ounce of gold may be found, a lost moment of time never.
------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?426458A1.7010008>
