unRAID - Reducing Power Usage (CPCC/PSTATE)

Hi all,

Since I upgraded my main gaming PC to a 7800x3D I decided to use my 5800x3D + Gigabyte B550i for an unRAID build, with a used 1660Ti for transcoding. Instead of selling + buying just decided to go with recycling.

So far so good but not too fussed with the power consumption. With all disks spun up I’m registering around 75w on idle (15 docker containers + 1 Home Assistant VM running). With all disks spun down it goes down to 60w.

Below are my PBO limits as well as a -25 CO. I could go to -30 as I’ve tested the cpu thoroughly when I used it for gaming.

PPT TDC EDC
65 65 90

What I’m going to do next is reduce VSOC etc as this Gigabyte board is known to add to be very generous with its auto voltage settings.

But one of the things that I also wanted to try was to get amd pstate working. Right now the governor driver returns the generic acpi which only encompasses 3 frequency steps. Has anyone successfully used pstate in unraid?

Also, does anyone have any idea if CPPC on Auto = Enabled? I hate that these mobos manuals lack any sort of specificity when it comes to simple questions like this.

Is there any other thing I could possibly do to reduce power consumption on idle? But also not lose a TON of performance?

Enable ASPM in bios, also in system, set cpu governor to powersave, run powertop. See thread about it on unraid forum.
My unraid NAS with 3xSSD has 3-5W idle (in 1 hour = ~4.5Wh) but it’s minimalistic fanless 12V mini pc Odroid H3 (Intel N5105). I have there also couple of dockers.
Without applied tweaks to lower power consumption it has 7-10W in idle.

I saw that thread but thought Powertop was for Intel systems only?

I only have a 1660Ti on the only PCIE slot, and it’s already idling on P8 at 8w. Is ASPM still needed? If so, L0 and L1 or just L1? Never used it and no full idea what it does

To paraphrase something I posted on Phoronix a few months ago, my understanding is that these MSRs Simply Don’t Work™️ as originally intended on Zen 3 MCM processors, and so they have been effectively disabled in the BIOS for those models. The good news is that the shared memory implementation is still quite good and a noticeable improvement over acpi_cpufreq+schedutil (IME). You just have to add amd_pstate=active to your kernel command line and you’ll be good to go.

I have a 5700X in a 1U server that I also struggle to keep under control. I have ECO mode set to 45W, which helps, but my board (ASRock Rack X570D4U) is stuck on an older BIOS that still has the EDC bug. Make sure you’re on AGESA 1.2.0.A or later before trying to tune EDC.

I’m not sure if unRAID has systemd-tmpfiles, but here’s my /etc/tmpfiles.d/energy_performance_preference.conf FWIW:

# amd_pstate w/ hardware-managed P-states [shared memory] (active)
# ** autonomous frequency scaling **

# CCX0 & hyperthreads
w /sys/devices/system/cpu/cpu[0123]/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu[89]/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu1[01]/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu[0123]/cpufreq/energy_performance_preference - - - - balance_power
w /sys/devices/system/cpu/cpu[89]/cpufreq/energy_performance_preference - - - - balance_power
w /sys/devices/system/cpu/cpu1[01]/cpufreq/energy_performance_preference - - - - balance_power

# CCX1 & hyperthreads
w /sys/devices/system/cpu/cpu[4567]/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu1[2345]/cpufreq/scaling_governor - - - - powersave
w /sys/devices/system/cpu/cpu[4567]/cpufreq/energy_performance_preference - - - - balance_power
w /sys/devices/system/cpu/cpu1[2345]/cpufreq/energy_performance_preference - - - - balance_power

Apply with sudo systemd-tmpfiles --create.

P.S. You can validate that CPPC is working by checking the scaling driver, e.g.:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
amd-pstate-epp

And as always the best source of knowledge is the kernel documentation.

Thank you for the thorough reply!

I’m actually using amd_pstate=passive atm because unRAIDs current kernel is 6.1.7 I believe. I think “active” is only available from 6.3. I’m also on the latest bios which is 1.2.0.B.

At least it’s downclocking to 500mhz. Turned ASPM (l0 and l1) on and “some” devices are using it but not all.

Weird because one nvme is using it, the other isn’t and both are capable of L1.2

I think in order to fully utilise cppc etc I’m gonna have to wait for the next big unraid update.

At least right now, all hdds spundown, 2 active nvmes it’s idling at 50-55w. Which isn’t bad. But not great!