Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[FYI] Sluggishness from AMD pstate and kernel upgrades
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Aradayn
n00b
n00b


Joined: 16 Jul 2017
Posts: 20

PostPosted: Sat May 11, 2024 7:03 pm    Post subject: [FYI] Sluggishness from AMD pstate and kernel upgrades Reply with quote

I had been experiencing sluggishness on my system recently, and just figured out what it was.

I have a Zen 2 processor and I had attempted to get AMD pstate support working, but I had left it partially configured because earlier releases of this driver didn't support Zen 2.

Recently, it appears it that it was fixed, and suddenly started being used. But it was stuck in a low-power state, when I ran this as root:
Code:
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor


everything started working again.

So if you suddenly notice extremely sluggishness on your AMD Gentoo box, make sure that AMD pstate is correctly configured!
From what I gather with the version 6 kernels, on Zen 2, it needs to be set as:
Code:
amd_pstate.shared_mem=1
on the kernel command line.

Later Zen processors use this:
Code:
amd_pstate=passive


If it's still sluggish, I recommend using the legacy P-state driver:

Code:
ACPI Processor P-States driver (X86_ACPI_CPUFREQ)


The Wiki goes into more detail: https://wiki.gentoo.org/wiki/Power_management/Processor#AMD_P-State
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 510

PostPosted: Sun May 12, 2024 11:22 am    Post subject: Reply with quote

I'm running zen3 so don't know how much will apply to you, but it's still worth noting my observations about the "new" AMD pstate scheduler.
  • Messing with the "default" speeds in bios disables "core freq boost"
  • amd_pstate=active amd_prefcore=enable gives the best result here
  • The powersave governor actually gives better results than performance
  • This is the only time anything other than "performance" has been effective at running games (re:without lag spikes)
  • (IIRC) From the kernel docs on the pstate driver, ondemand isn't a pstate scheduler
  • I'm running 6.8.2 (first time the driver was "finished"?)

Running performance here ties all CPU cores to 4.2GHz, which is the same as happens when pushing all cores to 100% when using powersave (during emerge or similar). But here's the difference, when most or some cores are idle the other cores run up to 4.6GHz (seen 4.8GHz more than once too). I get these numbers from a script that probes /proc/cpuinfo, then outputs min...max(mean) for conky to display. This does play into the idea that core boost frequencies are used when the "thermal opportunity" presents itself, which will be more often when some cores are running unused at 500MHz (also seen in conky).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum