AMD Ryzen 3950X Linux CPU clock strange behavior

mikexrv

New Member
Feb 28, 2020
11
0
1
I notices huge difference in CPU clock behavior between Windows 10 and Linux with the same (default) BIOS configuration. Motherboard - ASUS WS PRO X570.
I run test with all 16 cores (HT - Disabled).

Maximum CPU speed (all cores) for Windows 10 is about 4.15GHz
Maximum CPU speed (all cores) for CentOS 7.8 is equal 3.5GHz

Do you know if there is any option in BIOS which could control this bahavior?
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,197
405
83
There's several utilities I've seen on linux that only report the maximum base clock, and not the maximum boost clocks. For quick and dirty tests you should be able to get the raw clock straight out of /proc/cpuinfo; here's my 3700X running a single-threaded workload under debian:
Code:
effrafax@wug:~$ awk '/cpu MHz/{print $4}' /proc/cpuinfo|sort -r
4330.617
4319.311
2196.950
2196.195
2195.163
2195.067
2194.704
2193.812
2191.333
2191.107
2164.031
2157.632
2157.102
2157.026
2156.159
2151.538
 

mikexrv

New Member
Feb 28, 2020
11
0
1
There's several utilities I've seen on linux that only report the maximum base clock, and not the maximum boost clocks. For quick and dirty tests you should be able to get the raw clock straight out of /proc/cpuinfo; here's my 3700X running a single-threaded workload under debian:
Code:
effrafax@wug:~$ awk '/cpu MHz/{print $4}' /proc/cpuinfo|sort -r
4330.617
4319.311
2196.950
2196.195
2195.163
2195.067
2194.704
2193.812
2191.333
2191.107
2164.031
2157.632
2157.102
2157.026
2156.159
2151.538
this command show only max base frequency , exaclty the same like the below one:
# watch -n1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""

as Zhang mention above turbostat show real values.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,197
405
83
this command show only max base frequency , exaclty the same like the below one:
Curious, I've not seen that behaviour myself - /proc/cpuinfo has always shown the raw clock for me. Does the scaling governor in sysfs show the same?
Code:
effrafax@wug:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
2195051
2188900
2196040
2157180
2157592
4342009
2157706
2197571
2191760
2192399
2158122
2155612
4334178
2155862
2195438
2194080
 

mikexrv

New Member
Feb 28, 2020
11
0
1
Curious, I've not seen that behaviour myself - /proc/cpuinfo has always shown the raw clock for me. Does the scaling governor in sysfs show the same?
Code:
effrafax@wug:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
2195051
2188900
2196040
2157180
2157592
4342009
2157706
2197571
2191760
2192399
2158122
2155612
4334178
2155862
2195438
2194080
Unfortunately the same results like in previous commands. Curious for me too.
The results is equal number 3500000 not something like 3498523 or etc. It means this is not realistic.

I have to verify where is knocking turbostat command which provide correct values.
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,197
405
83
It's possible that different kernel versions/configs and/or different CPU governors report numbers in different ways. FWIW these numbers are from a debian stable systems running 4.19 and 5.4 with the default "ondemand" governor. There's certainly been changes of this sort before.

As far as I'm aware, you should be getting the "theoretical" rounded numbers from /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq and /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq and the actual point-in-time raw clock speed /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq. Possibly worth having a look around other sysfs variables to see if there's any likely contenders there.