Fighting for the power.
Alexandre "Sunny" Kovalenko
gaijin.k at gmail.com
Mon May 4 13:12:27 UTC 2009
On Mon, 2009-05-04 at 01:18 +0300, Alexander Motin wrote:
> I would like to summarize some of my knowledge on reducing FreeBSD power
> consumption and describe some new things I have recently implemented in
> 8-CURRENT. The main character of this story is my 12" Acer TravelMate
> 6292 laptop with C2D T7700 2.4GHz CPU, 965GM chipset and SATA HDD, under
> amd64 8-CURRENT.
> Modern systems, especially laptops, are implementing big number of
> power-saving technologies. Some of them are working automatically, other
> have significant requirements and need special system tuning or
> trade-offs to be effectively used.
> So here is the steps:
> 1. CPU
> CPU is the most consuming part of the system. Under the full load it
> alone may consume more then 40W of power, but for real laptop usage the
> most important is idle consumption.
> Core2Duo T7700 CPU has 2 cores, runs on 2.4GHz frequency, supports EIST
> technology with P-states at 2400, 2000, 1600, 1200 and 800MHz levels,
> supports C1, C2 and C3 idle C-states, plus throttling. So how can we use it:
> P-states and throttling
> Enabling powerd allows to effectively control CPU frequency/voltage
> depending on CPU load. powerd on recent system can handle it quite
> transparently. By default, frequency controlled via mix of EIST and
> throttling technologies. First one controls both core frequency and
> voltage, second - only core frequency. Both technologies give positive
> power-saving effect. But effect of throttling is small and can be
> completely hidden by using C2 state, that's why I recommend to disable
> throttling control by adding to /boot/loader.conf:
> In my case frequency/voltage control saves about 5W of idle power.
> - C1 stops clock on some parts of CPU core during inactivity. It is
> safe, cheap and supported by CPUs for ages. System uses C1 state by default.
> - C2 state allows CPU to turn off all core clocks on idle. It is also
> cheap, but requires correct ACPI-chipset-CPU interoperation to be used.
> Use of C2 state can be enabled by adding to /etc/rc.conf:
> Effect from this state is not so big when powerd is used, but still
> - C3 state allows CPU completely stop all internal clocks, reduce
> voltage and disconnect from system bus. This state gives additional
> power saving effect, but it is not cheap and require trade-offs.
> As soon as CPU is completely stopped in C3 state, local APIC timers in
> each CPU core, used by FreeBSD as event sources on SMP, are not
> functioning. It stops system time, breaks scheduling that makes system
> close to dead.
Did you try to see whether putting one of the cores in C3 state by doing
makes any difference?
# sysctl dev.cpu | grep cx_usage
dev.cpu.0.cx_usage: 0.00% 100.00% 0.00%
dev.cpu.1.cx_usage: 0.00% 5.18% 94.81%
Alexandre Kovalenko (Олександр Коваленко)
More information about the freebsd-current