OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: harshw on January 29, 2022, 05:39:25 am

Title: [solved] With 22.1, is PowerD needed on modern (Coffee Lake+) Intel CPUs?
Post by: harshw on January 29, 2022, 05:39:25 am
I have used PowerD from 19.1 to 21.7 - it seemed to work well and keep CPU temps down + increase clock speed when required

I read that FreeBSD has a proper SpeedShift driver - hwpstate_intel ... so is PowerD something that works with hwpstate_intel or is it something that works in parallel? I disabled PowerD and still getting 900mbps from my 1Gig internet connection, with Suricata IDS turned on

So what is expert verdict? PowerD on or off for modern (Coffee Lake onwards) Intel CPUs?

[SOLVED]

PowerD or PowerD++ isnt necessary with the hwpstate_intel driver (present by default in FreeBSD 13's image for amd64)

Make sure Intel SpeedShift is enabled in the BIOS and performance is set to Max Non-Turbo performance. I have disabled powerd and can see dev.cpu.X.freq go from 900 to 4113 for my CPU (it's a E-2126G so all core turbo is 4.1 GHz)
Title: Re: With 22.1, is PowerD needed on modern (Coffee Lake+) Intel CPUs?
Post by: chris1gr on January 29, 2022, 08:36:32 am
To compile this driver (hwpstate_intel) into your kernel place the following line in your kernel configuration file:
device cpufreq


Is it compiled into kernel?
Also the CPU must support Intel Speed Shift Technology.
Title: Re: With 22.1, is PowerD needed on modern (Coffee Lake+) Intel CPUs?
Post by: fraenki on January 29, 2022, 11:19:04 am
So what is expert verdict? PowerD on or off for modern (Coffee Lake onwards) Intel CPUs?

I'd say powerd is mostly a power-saving measure. So let it run for a week with powed disabled, and then one week with power enabled. Afterwards compare the CPU temperature graphs to see if there is any difference. Not scientific method, but should be enough to come to a conclusion. :)
Title: Re: With 22.1, is PowerD needed on modern (Coffee Lake+) Intel CPUs?
Post by: harshw on January 29, 2022, 10:22:37 pm
To compile this driver (hwpstate_intel) into your kernel place the following line in your kernel configuration file:
device cpufreq


Is it compiled into kernel?
Also the CPU must support Intel Speed Shift Technology.

From dmesg

Code: [Select]
...
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
...

I'd say it is in the kernel and running as intended.
Title: Re: With 22.1, is PowerD needed on modern (Coffee Lake+) Intel CPUs?
Post by: harshw on January 29, 2022, 10:28:37 pm
So what is expert verdict? PowerD on or off for modern (Coffee Lake onwards) Intel CPUs?

I'd say powerd is mostly a power-saving measure. So let it run for a week with powed disabled, and then one week with power enabled. Afterwards compare the CPU temperature graphs to see if there is any difference. Not scientific method, but should be enough to come to a conclusion. :)

With FreeBSD 13.0, once the hwpstate driver is enabled (either hwpstate_intel or then amd) then powerd isnt really needed or necessary. In fact if you use powerd++, it will warn you that it will NOT work with hwpstate_intel

from https://lonkamikaze.github.io/powerdxx/man_8_powerdxx.html:

Code: [Select]
CAVEATS
     Unlike powerd(8), powerd++ refuses to run if the frequency control driver
     is known not to allow user control of the CPU frequency (e.g. hwpstate_intel(4) ).

Doing a sysctl dev.cpu.X.freq shows the CPU going from 900 to 4113 - so it appears that FreeBSD 13 finally has good support for Intel's hardware based CPU performance driver