Skip to contentSkip to conversation

tuning pstate driver for amd ryzen w/ kernel 6.8+: 'amd-pstate' vs 'amd-pstate-epp'?

DISCUSSION pgnd 1 participant 1 message Dec 29, 2023

lore
Share & tools
lore

pgnd

author
#0 lore raw

i'm upgrading a number of amd Zen 2/3 Ryzen servers & workstations, for general/mixed edge & developer server use.

kernels are all currently,

	uname -rm
	  6.6.8-200.fc39.x86_64 x86_64

checking 'scaling_driver' and 'scaling_governor' on multiple boxes, they're all over the map.

my inclination is to standardize for an adaptive load, with

cpupower frequency-set -g schedutil

and

"... intel_pstate=disable amd_pstate=guided" on kernel cmdline ..."

here's the result for one,

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

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
schedutil

cpupower frequency-info
analyzing CPU 0:
driver: amd-pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 20.0 us
hardware limits: 400 MHz - 4.46 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil current policy: frequency should be within 400 MHz and 4.46 GHz.
The governor "schedutil" may decide which speed to use within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 4.01 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
AMD PSTATE Nominal Performance: 145. Nominal Frequency: 3.90 GHz.
AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.37 GHz. AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.

for some, before the mods, i see 'amd-pstate-epp' in use; e.g.,

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

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

cpupower frequency-info
analyzing CPU 11:
driver: amd-pstate-epp
CPUs which run at the same hardware frequency: 11
CPUs which need to have their frequency coordinated by software: 11 maximum transition latency: Cannot determine or is not supported. hardware limits: 400 MHz - 4.46 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 400 MHz and 4.46 GHz.
The governor "powersave" may decide which speed to use within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 2.96 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz. AMD PSTATE Nominal Performance: 145. Nominal Frequency: 3.90 GHz. AMD PSTATE Lowest Non-linear Performance: 88. Lowest Non-linear Frequency: 2.37 GHz. AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.

NOTE
the similar frequency scales/limits,
and

driver: amd-pstate
CPUs which run at the same hardware frequency: 0

vs

driver: amd-pstate-epp
CPUs which run at the same hardware frequency: 11

reading up at,

amd-pstate CPU Performance Scaling Driver
https://docs.kernel.org/admin-guide/pm/amd-pstate.html

i can see _what_ some of the differences are.

but don't get from the read what's the "best" driver tuning for these bigger-boxes with variable demand.

for those 2 boxes, e.g., @ driver: amd-pstate

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

shows mixed freqs across CPUs,

total=$( lscpu | grep "^CPU(s):" | awk '{print $2}')
for ((i = 0; i < total; ++i))
do
echo "${i} $( cpupower frequency-info cpu${i} | grep "current CPU.*Hz" )"
done

0 current CPU frequency: 3.56 GHz (asserted by call to kernel)
1 current CPU frequency: 4.45 GHz (asserted by call to kernel)
2 current CPU frequency: 3.56 GHz (asserted by call to kernel)
3 current CPU frequency: 4.45 GHz (asserted by call to kernel)
4 current CPU frequency: 3.61 GHz (asserted by call to kernel)
5 current CPU frequency: 3.56 GHz (asserted by call to kernel)
6 current CPU frequency: 3.66 GHz (asserted by call to kernel)
7 current CPU frequency: 4.45 GHz (asserted by call to kernel)
8 current CPU frequency: 4.45 GHz (asserted by call to kernel)
9 current CPU frequency: 3.56 GHz (asserted by call to kernel)
10 current CPU frequency: 3.93 GHz (asserted by call to kernel)
11 current CPU frequency: 4.45 GHz (asserted by call to kernel)

same as for @ driver: amd-pstate-epp

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

shows same freqs across CPUs,

total=$( lscpu | grep "^CPU(s):" | awk '{print $2}')
for ((i = 0; i < total; ++i))
do
echo "${i} $( cpupower frequency-info cpu${i} | grep "current CPU.*Hz" )"
done

0 current CPU frequency: 3.55 GHz (asserted by call to kernel)
1 current CPU frequency: 3.55 GHz (asserted by call to kernel)
2 current CPU frequency: 3.55 GHz (asserted by call to kernel)
3 current CPU frequency: 3.55 GHz (asserted by call to kernel)
4 current CPU frequency: 3.55 GHz (asserted by call to kernel)
5 current CPU frequency: 3.56 GHz (asserted by call to kernel)
6 current CPU frequency: 3.55 GHz (asserted by call to kernel)
7 current CPU frequency: 4.44 GHz (asserted by call to kernel)
8 current CPU frequency: 3.55 GHz (asserted by call to kernel)
9 current CPU frequency: 3.55 GHz (asserted by call to kernel)
10 current CPU frequency: 4.44 GHz (asserted by call to kernel)
11 current CPU frequency: 4.44 GHz (asserted by call to kernel)

looking at these outputs, I don't see the difference/preference.

short of long-term power/preformance benchmarking, what up-front rationale should be used for selecting

driver: amd-pstate

vs

driver: amd-pstate-epp

?