LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-13-2022, 07:10 PM   #1
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Rep: Reputation: 17
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

Last edited by SlackIT; 10-13-2022 at 07:11 PM.
 
Old 10-13-2022, 07:34 PM   #2
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,385

Rep: Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103
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 
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.
 
Old 10-13-2022, 07:50 PM   #3
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by marav View Post
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 
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.
 
Old 10-13-2022, 09:17 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,689

Rep: Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376Reputation: 1376
What is your motherboard? It might be worth looking at what your PBO is set to.
 
Old 10-14-2022, 12:30 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
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.

Last edited by pan64; 10-14-2022 at 12:43 AM.
 
Old 10-14-2022, 01:11 AM   #6
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Original Poster
Rep: Reputation: 17
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.

Last edited by SlackIT; 10-14-2022 at 01:14 AM.
 
Old 10-14-2022, 01:19 AM   #7
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,385

Rep: Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103
Quote:
Originally Posted by SlackIT View Post
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.
Oups
Sorry, I don't do magic
 
1 members found this post helpful.
Old 10-14-2022, 01:52 AM   #8
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Original Poster
Rep: Reputation: 17
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 :/

Last edited by SlackIT; 10-14-2022 at 01:54 AM.
 
Old 10-14-2022, 01:59 AM   #9
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 10-14-2022, 02:03 AM   #10
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Original Poster
Rep: Reputation: 17
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?

Last edited by SlackIT; 10-14-2022 at 02:13 AM.
 
Old 10-14-2022, 02:16 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
Quote:
Originally Posted by SlackIT View Post

I don't think what I am seeing is about storage dragging it down, I'm using a Samsung 860 SSD.
Do not think or assume anything. Just try it. And you will definitely know the answer.
 
Old 10-14-2022, 02:25 AM   #12
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,385

Rep: Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103Reputation: 4103
Quote:
Originally Posted by SlackIT View Post
cpufreq-set -g performance is on the fly settings?
I use this:
Code:
for (( c=0 ; c<=$(expr $(nproc) - 1) ; c++ )) ; do cpufreq-set -c$c -g <SCALING GOVERNOR> ; done
Quote:
Originally Posted by SlackIT View Post
For the kernel CPU options for the Ryzen 5600x, is it better to use Opteron/Athlon64/Hammer/K8?
Don't know if it's better
Gentoo recommend it as an optimization for AMD processor
https://wiki.gentoo.org/wiki/Handboo..._configuration
 
Old 10-14-2022, 02:27 AM   #13
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by pan64 View Post
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.

Last edited by SlackIT; 10-14-2022 at 02:28 AM.
 
Old 10-14-2022, 02:47 AM   #14
SlackIT
Member
 
Registered: Mar 2022
Posts: 165

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by elcore View Post
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

Last edited by SlackIT; 10-14-2022 at 03:00 AM.
 
1 members found this post helpful.
Old 10-14-2022, 03:31 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
Quote:
Originally Posted by SlackIT View Post
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.
Quote:
Originally Posted by SlackIT View Post
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
So what is the design?
Never mind, just do not assume anything....
And you can also try -j100. That will definitely use the full power of your system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AMD Ryzen 5 5600X - Conky Not Properly Reporting CPU Speeds? SlackIT Slackware 22 08-18-2022 06:44 PM
LXer: Linux-ready SBCs and mini-PCs run Ryzen Embedded, including new 8-10W R1305G LXer Syndicated Linux News 0 02-27-2020 04:05 AM
LXer: Gaming system run on Ryzen V1000 or R1000 LXer Syndicated Linux News 0 10-15-2019 10:13 PM
LXer: Overclock your AMD Ryzen Mobile on Linux with Ryzen Controller LXer Syndicated Linux News 0 08-27-2019 06:31 PM
Is there a way to speed up NFS to the networks full speed BillyGalbreath Linux - Networking 3 10-09-2012 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration