SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Ondemand - Commonly the default, it scales the the driver based on current load and will
usually go to the highest state then dropping back as deemed appropriate.
Performance - Aiming for running the CPU at its maximum frequency.
Schedutil - Schedutil is the newest governor and it's about making use of information from
the Linux kernel's scheduler to try to better change the CPU frequency in a timely manner
based on the scheduler utilization metrics.
Powersave - Powersave is a common governor for those looking to extend their battery life or
reduce power consumption by running at the lowest frequency state for longer periods of time.
Conservative - This is similar to powersave in its approach and prefers running at lower
frequencies for longer periods of time.
Ondemand - Commonly the default, it scales the the driver based on current load and will
usually go to the highest state then dropping back as deemed appropriate.
Performance - Aiming for running the CPU at its maximum frequency.
Schedutil - Schedutil is the newest governor and it's about making use of information from
the Linux kernel's scheduler to try to better change the CPU frequency in a timely manner
based on the scheduler utilization metrics.
Powersave - Powersave is a common governor for those looking to extend their battery life or
reduce power consumption by running at the lowest frequency state for longer periods of time.
Conservative - This is similar to powersave in its approach and prefers running at lower
frequencies for longer periods of time.
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.
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.
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?
Do not think or assume anything. Just try it. And you will definitely know the answer.
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.
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.
make -j12 is working the best, but the Boost Clock on these things is 4.7ghz and I'll see mine hit this, but for some reason make -j12 has it sitting the entire time at 4.4ghz, not sure why it's not going all the way to 4.7ghz... hmm
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.