Dear all,

I set up FreeBSD 8.2 on my Core i7 920 and also investigated reducing
power consumption, following the power tuning guide. It turned out that
using C2/C3 states yields the best benefit. Using EIST on top of C2/C3
barely yields any additional reduction in power consumption (measured
using power meter between wall outlet and PSU).
While C2/C3 basically works, I noticed that the cores (actually 8
hyperthreads) don't spend most of their time in C3 when idle, as can be
seen on a Core 2 Duo machine (virtually 100% in C3). Since I didn't find
any detailled discussion on this, I collected some data to illustrate
the problem. To get a really idle system I used 8.2 release and 9.0
snapshot 201101 (both amd64) off a USB stick and the following commands
to get the results:


[at loader prompt]
set hint.apic.0.clock=0
set hint.atrtc.0.clock=0
set kern.hz=100
set kern.timecounter.smp_tsc=1
boot

[at fixit console prompt]
sysctl kern.timecounter.hardware=TSC
for i in 0 1 2 3 4 5 6 7; do sysctl dev.cpu.$i.cx_lowest=C3; done
[wait ~10 secs]
sysctl dev.cpu | grep cx_usage (output see below)

FreeBSD 8.2 release booted off memstick:

dev.cpu.0.cx_usage: 0.07% 96.41% 3.50% last 6174us
dev.cpu.1.cx_usage: 0.20% 99.14% 0.64% last 3589us
dev.cpu.2.cx_usage: 0.14% 88.58% 11.27% last 1554us
dev.cpu.3.cx_usage: 0.07% 98.47% 1.45% last 3578us
dev.cpu.4.cx_usage: 0.47% 83.42% 16.10% last 1577us
dev.cpu.5.cx_usage: 1.68% 95.00% 3.30% last 3583us
dev.cpu.6.cx_usage: 1.18% 55.62% 43.19% last 3565us
dev.cpu.7.cx_usage: 0.00% 65.10% 34.89% last 3569us


FreeBSD 9.0 snapshot (201101) booted off memstick:

dev.cpu.0.cx_usage: 0.00% 98.83% 1.16% last 3477us
dev.cpu.1.cx_usage: 0.00% 72.76% 27.23% last 116268us
dev.cpu.2.cx_usage: 0.00% 91.13% 8.86% last 65923us
dev.cpu.3.cx_usage: 0.00% 82.67% 17.32% last 71835us
dev.cpu.4.cx_usage: 0.00% 90.88% 9.11% last 1370us
dev.cpu.5.cx_usage: 0.00% 87.15% 12.84% last 56682us
dev.cpu.6.cx_usage: 0.00% 70.87% 29.12% last 128520us
dev.cpu.7.cx_usage: 0.00% 83.24% 16.75% last 122017us


For reference, HyperThreading disabled doesn't change the behavior, once
could argue, it makes it worse (FreeBSD 8.2 release):

dev.cpu.0.cx_usage: 0.00% 99.51% 0.48% last 3460us
dev.cpu.1.cx_usage: 2.93% 95.80% 1.26% last 2729us
dev.cpu.2.cx_usage: 0.00% 97.51% 2.48% last 2277us
dev.cpu.3.cx_usage: 1.12% 94.79% 4.07% last 3250us


Also for reference, Ubuntu 11.04 has 100% in C3 on this system.


The current situation with C2/C3 on this machine is not a problem for me
(I am aware it impacts TurboBoost) and comparing with 9.0 snapshot there
seems to be improvement. So I assume there is work going on in
supporting these CPUs well with respect to C2/C3 sleep states.
As I'm probably not going to put the system into productive use in the
next 1-2 weeks, I wanted to ask whether there's anything I can try,
test, measure, etc. that can help the developers working on this.

Michael
_______________________________________________
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"

Reply via email to