Upgraded from 10.3 to 11, now CPU won't idle lower than C1 state

Hi, not a novice to computing or Unix, but still needing help with the basics of power management under FreeBSD.

I'm running a NAS4Free installation on an old Core 2 Quad system. I had just managed to tweak power management to use C3 state under FreeBSD 10.3. As the machine is quite overpowered for home file server duty, I was seeing a lot of idle time spent in C2 state, and roughly 1/6th in C3.

I upgraded to the 11.0-RELEASE based version of NAS4Free last night, and now the CPUs won't idle below C1 state. I'm seeing dev.cpu.*.cx_usage of 100% in C1 and 0 in C2 and C3.

dev.cpu.*.cx_lowest and hw.acpi.cpu.cx_lowest are set to C3. powerd is running in 'adaptive' mode. Throttling is disabled.

And yes, I've already pored over the wiki page on power management.

Any idea what changed between 10.3 and 11.0, and how do I get the CPUs into a deeper sleep? Thanks in advance.
 
Deeper states can be blocked by selection of active timer. LAPIC timer has problems with C3 states on old systems, so those states may be disabled when it is active. You may try to force different timer hardware to use with kern.eventtimer.timer sysctl if you really want deeper C states to be used on your server.
 
Here is the relevant sysctl output:

Code:
nas4free ~/ chucko~$ sysctl -h kern.eventtimer
kern.eventtimer.periodic: 0
kern.eventtimer.timer: HPET
kern.eventtimer.idletick: 0
kern.eventtimer.singlemul: 2
kern.eventtimer.choice: HPET(450) HPET1(440) HPET2(440) HPET3(440) LAPIC(400) i8254(100) RTC(0)
kern.eventtimer.et.RTC.quality: 0
kern.eventtimer.et.RTC.frequency: 32,768
kern.eventtimer.et.RTC.flags: 17
kern.eventtimer.et.HPET3.quality: 440
kern.eventtimer.et.HPET3.frequency: 14,318,180
kern.eventtimer.et.HPET3.flags: 3
kern.eventtimer.et.HPET2.quality: 440
kern.eventtimer.et.HPET2.frequency: 14,318,180
kern.eventtimer.et.HPET2.flags: 3
kern.eventtimer.et.HPET1.quality: 440
kern.eventtimer.et.HPET1.frequency: 14,318,180
kern.eventtimer.et.HPET1.flags: 3
kern.eventtimer.et.HPET.quality: 450
kern.eventtimer.et.HPET.frequency: 14,318,180
kern.eventtimer.et.HPET.flags: 3
kern.eventtimer.et.i8254.quality: 100
kern.eventtimer.et.i8254.frequency: 1,193,182
kern.eventtimer.et.i8254.flags: 1
kern.eventtimer.et.LAPIC.quality: 400
kern.eventtimer.et.LAPIC.frequency: 0
kern.eventtimer.et.LAPIC.flags: 15
nas4free ~/ chucko~$ sysctl -h dev.cpu
dev.cpu.3.cx_method: C1/hlt C2/io C3/io
dev.cpu.3.cx_usage_counters: 29532425 0 0
dev.cpu.3.cx_usage: 100.00% 0.00% 0.00% last 21293us
dev.cpu.3.cx_lowest: C3
dev.cpu.3.cx_supported: C1/1/1 C2/2/1 C3/3/150
dev.cpu.3.temperature: 32.0C
dev.cpu.3.coretemp.throttle_log: 0
dev.cpu.3.coretemp.tjmax: 100.0C
dev.cpu.3.coretemp.resolution: 1
dev.cpu.3.coretemp.delta: 68
dev.cpu.3.%parent: acpi0
dev.cpu.3.%pnpinfo: _HID=none _UID=0
dev.cpu.3.%location: handle=\_PR_.CPU3
dev.cpu.3.%driver: cpu
dev.cpu.3.%desc: ACPI CPU
dev.cpu.2.cx_method: C1/hlt C2/io C3/io
dev.cpu.2.cx_usage_counters: 49972942 0 0
dev.cpu.2.cx_usage: 100.00% 0.00% 0.00% last 54us
dev.cpu.2.cx_lowest: C3
dev.cpu.2.cx_supported: C1/1/1 C2/2/1 C3/3/150
dev.cpu.2.temperature: 40.0C
dev.cpu.2.coretemp.throttle_log: 0
dev.cpu.2.coretemp.tjmax: 100.0C
dev.cpu.2.coretemp.resolution: 1
dev.cpu.2.coretemp.delta: 60
dev.cpu.2.%parent: acpi0
dev.cpu.2.%pnpinfo: _HID=none _UID=0
dev.cpu.2.%location: handle=\_PR_.CPU2
dev.cpu.2.%driver: cpu
dev.cpu.2.%desc: ACPI CPU
dev.cpu.1.cx_method: C1/hlt C2/io C3/io
dev.cpu.1.cx_usage_counters: 26415486 0 0
dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 3023us
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_supported: C1/1/1 C2/2/1 C3/3/150
dev.cpu.1.temperature: 27.0C
dev.cpu.1.coretemp.throttle_log: 0
dev.cpu.1.coretemp.tjmax: 100.0C
dev.cpu.1.coretemp.resolution: 1
dev.cpu.1.coretemp.delta: 73
dev.cpu.1.%parent: acpi0
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%location: handle=\_PR_.CPU1
dev.cpu.1.%driver: cpu
dev.cpu.1.%desc: ACPI CPU
dev.cpu.0.cx_method: C1/hlt C2/io C3/io
dev.cpu.0.cx_usage_counters: 48503126 0 0
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 5289us
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_supported: C1/1/1 C2/2/1 C3/3/150
dev.cpu.0.temperature: 39.0C
dev.cpu.0.coretemp.throttle_log: 0
dev.cpu.0.coretemp.tjmax: 100.0C
dev.cpu.0.coretemp.resolution: 1
dev.cpu.0.coretemp.delta: 61
dev.cpu.0.freq_levels: 2834/88000 2000/55000
dev.cpu.0.freq: 2,000
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
dev.cpu.%parent: 
nas4free ~/ chucko~$

Disabling APIC by adding

Code:
hint.apic.0.clock=0

to /boot/loader.conf.local made no difference at all, except that the APIC entry disappeared from kern.eventtimer.choice.
 
Thanks
lol.jpg
 
Back
Top