PowerTop, AMD CPUFreq CPPC & Other Power Tests From The Ryzen 9 3900X On Linux

Written by Michael Larabel in AMD on 3 September 2019 at 11:13 AM EDT. 16 Comments
AMD
Continuing on from last week's testing that found the AMD Ryzen 9 3900X + ASUS CROSSHAIR VIII HERO WiFi consuming more power on Linux compared to Windows 10, here are some additional metrics after spending a good deal of time over the weekend on further tests.

From the aforelinked tests last week, a number of Phoronix readers simply suggested the difference be due to the default Linux behavior and that the AMD power consumption would be more in line with Windows if running Intel's PowerTop. So I did.
Ryzen 9 Kernel Power Compare

Idle load was about three Watts less for the overall AC system power consumption, the average power draw under idle and load came out to 2~3 Watts, and the peak AC power draw was just one Watt lower. That's the out-of-the-box state compared to setting all the PowerTop tunables to their "good" state. So it saved 1~3 Watts, but still off the 10~30 Watt differences seen on the same hardware between Ubuntu 19.04 (plus Linux 5.3) and Windows 10 1903.
Ryzen 9 Kernel Power Compare

One interesting discovery made was that the Linux 5.3 power consumption on this system is 8~10 Watts lower than pre-5.3 kernels... BUT my original Windows vs. Linux tests were already done with a Linux 5.3 Git kernel. So in fact the Windows vs. Linux power delta can be even worse than shown last week if using Linux 5.2 stable or older:
Ryzen 9 Kernel Power Compare

Across various workloads, using Linux 5.3 had on average consumed about 8 Watts less while the peak power consumption was down by 11~12 Watts for Linux 5.0 through Linux 5.2. The idle / minimum power draw was largely unchanged.
Ryzen 9 Kernel Power Compare

Linux 5.3 didn't regress the performance, so this is a slight improvement in power efficiency / performance-per-Watt with Linux 5.3. So for those AMD Zen 2 users running pre-5.3 kernels, the stable Linux 5.3 release in two weeks is something to look forward to.

Another thought for the possible Windows vs. Linux difference came down to the CPPC (Collaborative Processor Performance Control) support being in good shape for Windows but not Linux. AMD developers recently posted the new AMD CPUFreq CPPC driver for Zen 2 CPUs but as of Linux 5.3 that isn't merged and even for Linux 5.4 I haven't seen that driver queued in the power management tree. But I did a fresh kernel build with those new amd-cpufreq driver patches to see if it would explain the difference.
Ryzen 9 Kernel Power Compare

In a few workloads using that CPUFreq driver led to a slight performance bump, but most of the time was flat.
Ryzen 9 Kernel Power Compare

Except that using that driver led to an increase in power usage, not lowering it.

So at this stage I haven't found any combination (short of say switching to the "conservative" CPUFreq scaling governor) for lowering the power consumption to make it comparable to Windows. But the anecdotes around better power efficiency on Linux 5.3 will please Ryzen 3000 users (I still have to benchmark it with the power meters on other systems to see if this is a widespread improvement) while PowerTop wasn't too useful for the high-end desktop. The AMD CPUFreq CPPC driver also looks like it may help the performance of some workloads but at least in its default behavior hadn't helped the power usage. For those enjoying the investigative benchmarks and wanting to see more of them, consider showing your support by joining Phoronix Premium.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week