powerd -v
:# service powerd stop
# powerd -v
powerd: unable to determine AC line status
load 0%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 0%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 4%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 0%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 14%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 0%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 16%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 0%, current freq 1096 MHz ( 0), wanted freq 3100 MHz
load 0%, current freq 1040 MHz ( 0), wanted freq 3490 MHz
load 0%, current freq 1040 MHz ( 0), wanted freq 3380 MHz
load 0%, current freq 1040 MHz ( 0), wanted freq 3274 MHz
load 0%, current freq 1040 MHz ( 0), wanted freq 3171 MHz
...
Please show:
% grep powerd </etc/rc.conf
% sysctl dev.cpu.0
# grep powerd </etc/rc.conf
powerd_enable="YES"
# sysctl dev.cpu.0
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.0.cx_usage_counters: 1853709 0 0
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 74422us
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_supported: C1/1/1 C2/2/151 C3/3/1034
dev.cpu.0.freq_levels: 3100/-1
dev.cpu.0.freq: 1096
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_SB_.PR00
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU
I guess you have multiple CPUs. If you have installed the sources (optional during installation) you can read /usr/src/usr.sbin/powerd/powerd.c for details.[…] I ran the above for a few minutes but "current freq" never approaches "wanted freq". Does this mean that powerd(8) is ineffective on my computer?
Code:# grep powerd </etc/rc.conf powerd_enable="YES"
powerd: unable to determine AC line status
Code:# sysctl dev.cpu.0 dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc dev.cpu.0.cx_usage_counters: 1853709 0 0 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 74422us dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1/1 C2/2/151 C3/3/1034
Code:dev.cpu.0.freq_levels: 3100/-1 dev.cpu.0.freq: 1096
Check /var/run/dmesg.boot: it's likely using "Speed Shift" rather than the older "Speed Step" that offers a range of freq_levels for selection.
# grep cpu /var/run/dmesg.boot
cpu0: <ACPI CPU> on acpi0
hwpstate_intel0: <Intel Speed Shift> on cpu0
hwpstate_intel1: <Intel Speed Shift> on cpu1
hwpstate_intel2: <Intel Speed Shift> on cpu2
hwpstate_intel3: <Intel Speed Shift> on cpu3
hwpstate_intel4: <Intel Speed Shift> on cpu4
hwpstate_intel5: <Intel Speed Shift> on cpu5
hwpstate_intel6: <Intel Speed Shift> on cpu6
hwpstate_intel7: <Intel Speed Shift> on cpu7
hwpstate_intel8: <Intel Speed Shift> on cpu8
hwpstate_intel9: <Intel Speed Shift> on cpu9
hwpstate_intel10: <Intel Speed Shift> on cpu10
hwpstate_intel11: <Intel Speed Shift> on cpu11
On halfway modern CPUs by far the most energy saving will be achieved by settingperformance_cx_lowest="Cmax"
in /etc/rc.conf.
performance_cx_lowest="Cmax"
?performance_cx_lowest="LOW"
and performance_cx_lowest="HIGH"
are documented:performance_cx_lowest
(str) CPU idle state to use while on AC power. The string
"LOW" indicates that acpi(4) should use the lowest power
state available while "HIGH" indicates that the lowest la-
tency state (less power savings) should be used.
What isperformance_cx_lowest="Cmax"
?
On halfway modern CPUs by far the most energy saving will be achieved by settingperformance_cx_lowest="Cmax"
in /etc/rc.conf.
performance_cx_lowest="Cmax"
without rebooting?How do I enableperformance_cx_lowest="Cmax"
without rebooting?
you'd have to set "dev.cpu.N.cx_lowest" for every core to C8 manually, e.g. via a loop from 0-N where N is your hw.ncpu value -1.
sysctl hw.acpi.cpu.cx_lowest=C2
too?How do I enableperformance_cx_lowest="Cmax"
without rebooting?
you'd have to set "dev.cpu.N.cx_lowest" for every core to C8 manually, e.g. via a loop from 0-N where N is your hw.ncpu value -1.
performance_cx_lowest="Cmax"
in /etc/rc.conf then b) run % sudo service power_profile 0x01
Should I dosysctl hw.acpi.cpu.cx_lowest=C2
too?
No, you just need to a) set
performance_cx_lowest="Cmax"
in /etc/rc.conf then b) run
% sudo service power_profile 0x01
apropos
couldn't find anything related...Thanks for that info. Is that "power_profile" service documented anywhere?apropos
couldn't find anything related...
sysctl hw.acpi.cpu.cx_lowest=C3
, and after a few hours, sysctl -a | grep dev.cpu.0.cx_
shows this:dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.0.cx_usage_counters: 7523 13735 129526
dev.cpu.0.cx_usage: 4.98% 9.10% 85.90% last 10235us
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_supported: C1/1/1 C2/2/151 C3/3/1034
dev.cpu.0.cx_usage_counters
and dev.cpu.0.cx_usage
show that C3's usage (85.90%) is higher than that of C1 and C2?dev.cpu.0.cx_usage: 4.98% 9.10% 85.90% last 10235us
, what does the "last" part mean? Does it mean that dev.cpu.0's most recent use of a C-state lasted for 10235 microseconds?I have tried the C3 state by runningsysctl hw.acpi.cpu.cx_lowest=C3
, and after a few hours,sysctl -a | grep dev.cpu.0.cx_
shows this:
sysctl dev.cpu | grep cx_usage
should give you some further clues, as you have 12 cpus and Speed Shift.Code:dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc dev.cpu.0.cx_usage_counters: 7523 13735 129526 dev.cpu.0.cx_usage: 4.98% 9.10% 85.90% last 10235us dev.cpu.0.cx_lowest: C3 dev.cpu.0.cx_supported: C1/1/1 C2/2/151 C3/3/1034
Questions:
1. Does this show that C3 is a good choice, sincedev.cpu.0.cx_usage_counters
anddev.cpu.0.cx_usage
show that C3's usage (85.90%) is higher than that of C1 and C2?
2. Indev.cpu.0.cx_usage: 4.98% 9.10% 85.90% last 10235us
, what does the "last" part mean? Does it mean that dev.cpu.0's most recent use of a C-state lasted for 10235 microseconds?
% stress -c 6 -t 120 &
and watch top, or systat -vm ono, while taking snapshots of cx_ states. That should give you a load average of ~6, i.e. ~50% of your beasts raw CPU capacity - and get it warmed up. Or more traditional methods like make buildworld. smithi@t430s:~ % t430stat
Fri Oct 27 00:15:04 AEDT 2023 dev.cpu.0.freq: 1200
cpu0: 0.65% 99.34% last 1620us 44.0C tz0: 42.1C
cpu1: 0.83% 99.16% last 1325us 45.0C { 0.08 0.08 0.08 }
cpu2: 0.73% 99.26% last 586us 48.0C { LAPIC one-shot }
cpu3: 0.70% 99.29% last 744us 48.0C { t.cnt: TSC-low }
dev.acpi_ibm.0.fan: 1 (auto) _level: 0 _speed: 0
high capacity: 99% time: unknown
rate: 0 mW voltage: 12193 mV
You can just set Cmax or C8. The CPU will use the lowest power state it supports, no need to set the "correct" C-state for the specific CPU.I have tried the C3 state