How To Make Ryzen 5600X Run Full Speed Compiling?
Hello,
Since getting a Ryzen 5600X, I've noticed in Slack it doesn't compile at full speed. For the most part, it's compiling on average at only 2.2ghz, but of course I do see the speeds fluctuating up and down, sometimes, for a brief moment it will hit full speed. I really don't want this conversative/performace approach the cpu takes when compiling, only using what it thinks it needs, I just want it rulling at full clock speeds, when I compile. The governor is onedemand, so I'm assuming this is the issue. But is it possible to have it run full clock when compiling, and not fluctuate, with ondemand? THANKS |
https://www.phoronix.com/review/amd-renoir-cpufreq
https://www.phoronix.com/review/amd-ryzen-cpufreq Code:
Ondemand - Commonly the default, it scales the the driver based on current load and will |
Quote:
Not sure why you are posting all this, that I already know. Please read my post again, I'm looking for a solution here, on how to use ondemand, but have compiling at full speed. :) |
What is your motherboard? It might be worth looking at what your PBO is set to.
|
Compiling can be slow for example when the storage device is slow. The compiler need to write a lot of files during compilation.
From my side I would increase the number of parallel threads at least to 2xN or 3xN (N is the number of cores). And you will see if that will make any difference. |
It's an Asus B550-F Gaming mobo, PBO is all default, except I put a Negative 28 to slighty undervolt it. But I still see that it will hit the Boost speeds of 4x
Not sure as an example for N, how you'd apply that to compiling the kernel... I don't think what I am seeing is about storage dragging it down, I'm using a Samsung 860 SSD. |
Quote:
Sorry, I don't do magic |
I went back and put the BIOS on all default settings, so now PBO is at AUTO.
Coming from the Intel world, of course on an i7 it has boost freq. too, but for some reason, when I compiled before on my i7 box, it would always stay at the max turbo boost clocks. But this 5600x only boosts up to it for a brief moment, then clocks down, my understanding, from what I've read, because the CPU is supposedly designed to be more efficent, and only uses what it needs, but then that doesn't make sense when compiling, that it won't hit the max boost clocks and just stay there for the entire compiling. I mean, what the flip, max clocks speeds equals faster compile times, so I don't get the design thinking here. hmm :/ |
1. TMP in RAM (tmpfs), there were talks over the last couple of years where tmpfs outperforms any filesystem.
2. cpufreq-set -g performance should be enough (or -g userspace and manually specify the freq, see man cpufreq-set and cpufreq-info). 3. make -j12 is the most I used on dual core amd, requires a bit more RAM but works well until it starts to swap. I'd generally use number of physical cores X 2 at minimum, X 6 at maximum BIOS default for virtual cores is usually physical X 2, but for make jobs you could use physical X4 if there's enough RAM. |
cpufreq-set -g performance is on the fly settings?
For the kernel CPU options for the Ryzen 5600x, is it better to use Opteron/Athlon64/Hammer/K8? schedutil is listed as the default in the kernel, but in /etc/default/cpufreq it has; SCALING_GOVERNOR=ondemand so I don't get why schedutil isn't listed in /etc/default/cpufreq? |
Quote:
|
Quote:
Code:
for (( c=0 ; c<=$(expr $(nproc) - 1) ; c++ )) ; do cpufreq-set -c$c -g <SCALING GOVERNOR> ; done Quote:
Gentoo recommend it as an optimization for AMD processor https://wiki.gentoo.org/wiki/Handboo..._configuration |
Quote:
I have increased the parallel threads before, it doesn't do anything, the CPU still runs the way it wants to run, that's the design of this thing. Also cpufreq-set -g performance doesn't do anything, that just has it run at the full Base Clock Speed, I'm talking about having it run at the full Boost/Turbo Speed. Do any of you actually own a 5600x? I am talking about running it at Full Turbo/Boost speeds, and I don't remember if Intel acts the same way too, but as I mentioned, my i7 would run at and stay at full turbo speeds when compiling. |
Quote:
THANKS P.S. Compiling 5.19.15 with make -j12 was only 4 mins! HOLY CRAP, this thing blazes, I've never compiled a kernel that fast before... LOL |
Quote:
Quote:
Never mind, just do not assume anything.... And you can also try -j100. That will definitely use the full power of your system. |
All times are GMT -5. The time now is 10:56 AM. |