You did the correct thing already by setting the governor to performance.
In the default state amd_pstate is designed to lower the clocks when not much is happening as low as it can.
Setting it to performance will ensure the clocks will ramp up faster and ramp down slower / not as low for low and medium workloads. IIRC the default governor for AMD is schedutil which is also not very good for those kind of workloads.
Since you are still using a Ryzen 3000 series CPU the support for amd_pstate is not as good as it is on 5000 series or 7000 series. So your other option is to switch back to acpi_cpufreq since I don’t think you will gain much from using amd_pstate on that CPU anyway.
I have a 7800X3D and the best setup for amd_pstate on kernel 6.11 for me right now is:
- scaling_driver: amd-pstate-epp
- scaling_governor: powersave
- energy_performance_preference: performance
- scaling_min_freq: 2982000
Note that these values are specific to using amd_pstate in active mode (= amd-pstate-epp).
In active mode the scaling_governor powersave is the default and it does not behave like it does for all other operating modes or when using acpi_cpufreq. For the other modes and when using acpi_cpufreq it just limits the clocks to a very low value. In active mode it behaves more like ondemand.
The value I set for scaling_min_freq is equal to the value of amd_pstate_lowest_nonlinear_freq and might be different for each CPU generation / model.
You could also try running amd_psate in passive or guided mode and see if that works better for you.
These modes behave a bit more like acpi_cpufreq in that you control their bias torwards performance or power saving only by setting the scaling_governor since energy_performance_preference only exists when amd_pstate is used in active mode.
Also make sure that you are on the latest version of your motherboards BIOS and that CPPC is enabled since that is required for amd_pstate to function properly.
Note that not all motherboards vendors expose this setting for the end user and might just enable or disable it by default.
My Asrock mainboard for example has no option to enable or disable CPPC and it appears to be always enabled by default.
You can check it by running cat /proc/cpuinfo | grep CPPC
It should show up there when it is enabled.
If no CPPC support is showing up but amd_pstate can still be loaded then it is properly being enabled through Shared Memory Support because you using a Ryzen 3000 series CPU. I have no idea if it will work as well as it does with CPPC enabled or how to check for that tho.
If all of that sounds like way too much effort just switch back to acpi_cpufreq with ondemand and enjoy your CPU working as you expect it to .