Page 1 of 1

understading cpu clockspeeds

Posted: Thu Aug 22, 2019 1:02 pm
by Fizz
I am having a hard time understanding cpu clockspeeds. I have a Ryzen 5 2500U. it has a nominal speed of 2GHz, and can burst to 3.2 (or somewhere in there i think).

I am keeping an eye on the cpu speed using: watch "grep 'cpu MHz' /proc/cpuinfo"

I am running four simulations in python. So the cpu's are being kept fairly busy. System Monitor is showing all cores hovering consistently between 60% and 80%.

Now, watching the cpu speeds, they are all just under 1.6GHz, and they hold steady while all four simulations run.

Next, if i UN-plug the machine so it's running on battery, suddenly the cpu speeds jump UP bouncing between 1.6 GHz as high as 2.7 GHz.

So the behaviour seems backwards. On battery, it wants to use higher clockspeeds, but plugged in, it's limited to the lower clockspeed. This makes no sense to me.

So what the heck is going on here? Any thoughts? Thanks!


-Fizz

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 11:48 am
by Fizz
Hmmm... no response. Am i the only one seeing this?

-Fizz

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 11:56 am
by athi
Is it going higher on all the cores or just 1 core? Maybe shutting down unused cores for power saving.

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 1:49 pm
by Fizz
It's on all the cores, but variably so. One moment it'll be core 1 jumping over 2.5GHz, and the next moment it'll be core 4 jumping to 2.5GHz while core 1 drops back to 1.3GHz

That said, the system doesn't always stay at 1.6GHz when plugged. At the time i posed this question, it was holding steady at 1.6 until i unplugged it, and then it spiked. Right now, it will go above 1.6 when plugged in, as high as 2.2 at times. But it still spikes higher when unplugged, going up to 2.5 at times. And again, these values are constantly bouncing across all cores.

Huh... and now after unplugging / re-plugging a few times, i had a period where plugged in it was jumping to as high as 3.1 GHz on all cores, but now it's dropped off again.

So the behavior is just all around confusing to me. I'd also like to know why the system thinks the base speed is 1.6GHz rather than the 2GHz with burst to 3.6GHz that it's supposed to be.


-Fizz

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 2:15 pm
by athi
Is there a BIOS update for your laptop that might help with this issue?

Also, you can try running top in a separate Terminal (ctrl+c toe end top) and see if you can correlate the spike to an application or activity.

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 2:41 pm
by Fizz
The applications are the Python simulations that i'm running- four separate processes. So why they spike upwards is not surprising. Rather, the question is why the cpu goes higher when on battery rather than plug power.

There is supposedly a new bios, but every time i have tried to update it (per Dell's own instructions) it claims it's not a valid file. So i've not figured out why it won't update yet.

-Fizz

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 3:13 pm
by athi
Dell is a notorious Intel centric shop, I can see how Ryzen firmware implementation would be less than ideal. Are you dual booting? With Windows, BIOS update should be fairly simple. Without Windows, it could be a challenge. If you run below command in Terminal to ouput system information and post results, that would help a bit.

Code: Select all

inxi -Fxz

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 10:07 pm
by Fizz
It is not dual boot, it's Linux only. The bios update is supposedly done through a flash drive on boot- it shouldn't have to do anything with the OS so far as i understood.

Below is the result of the inxi call:

System: Host: Minty Kernel: 4.18.0-25-generic x86_64 bits: 64 compiler: gcc v: 7.4.0
Desktop: Cinnamon 4.0.10 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic
Machine: Type: Laptop System: Dell product: Inspiron 5575 v: 1.1.5 serial: <filter>
Mobo: Dell model: 0M0Y6P v: X01 serial: <filter> UEFI: Dell v: 1.1.5 date: 06/13/2018
Battery: ID-1: BAT1 charge: 39.6 Wh condition: 39.6/42.0 Wh (94%) model: SDI 4D,38,37,53,00,00,00
status: Full
CPU: Topology: Quad Core model: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx bits: 64
type: MT MCP arch: Zen L2 cache: 2048 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 31939
Speed: 2303 MHz min/max: 1600/2000 MHz Core speeds (MHz): 1: 2305 2: 2302 3: 1829 4: 1790
5: 1810 6: 1836 7: 1437 8: 1416
Graphics: Device-1: AMD Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] vendor: Dell
driver: amdgpu v: kernel bus ID: 03:00.0
Display: x11 server: X.Org 1.19.6 driver: amdgpu,ati
unloaded: fbdev,modesetting,radeon,vesa resolution: 1920x1080~60Hz
OpenGL: renderer: AMD RAVEN (DRM 3.26.0 4.18.0-25-generic LLVM 8.0.0) v: 4.5 Mesa 19.0.2
direct render: Yes
Audio: Device-1: AMD vendor: Dell driver: snd_hda_intel v: kernel bus ID: 03:00.1
Device-2: AMD vendor: Dell driver: snd_hda_intel v: kernel bus ID: 03:00.6
Sound Server: ALSA v: k4.18.0-25-generic
Network: Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell driver: r8169
v: 2.3LK-NAPI port: 2000 bus ID: 01:00.0
IF: enp1s0 state: down mac: <filter>
Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Dell
driver: ath10k_pci v: kernel port: 2000 bus ID: 02:00.0
IF: wlp2s0 state: up mac: <filter>
Device-3: Atheros type: USB driver: btusb bus ID: 3-2.4:4
Drives: Local Storage: total: 931.51 GiB used: 109.26 GiB (11.7%)
ID-1: /dev/sda vendor: Samsung model: SSD 860 QVO 1TB size: 931.51 GiB
Partition: ID-1: / size: 915.40 GiB used: 109.26 GiB (11.9%) fs: ext4 dev: /dev/sda2
Sensors: System Temperatures: cpu: 74.8 C mobo: N/A gpu: amdgpu temp: 89 C
Fan Speeds (RPM): fan-1: 4500
Info: Processes: 289 Uptime: 1d 14h 14m Memory: 31.12 GiB used: 14.47 GiB (46.5%) Init: systemd
runlevel: 5 Compilers: gcc: 7.4.0 Shell: bash v: 4.4.20 inxi: 3.0.27

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 10:21 pm
by catweazel
Fizz wrote:
Sat Aug 24, 2019 1:49 pm
It's on all the cores, but variably so. One moment it'll be core 1 jumping over 2.5GHz, and the next moment it'll be core 4 jumping to 2.5GHz while core 1 drops back to 1.3GHz...

So the behavior is just all around confusing to me...
-Fizz
That's normal.

Re: understading cpu clockspeeds

Posted: Sat Aug 24, 2019 10:42 pm
by athi
Link to BIOS download page for Inspiron 5575, instruction for DOS flashing at bottom of page.
https://www.dell.com/support/home/us/en ... erid=fvmpc

You can use unetbootin to creat freeDOS boot USB:
https://unetbootin.github.io/

Re: understading cpu clockspeeds

Posted: Sun Aug 25, 2019 11:02 am
by Fizz
athi wrote:
Sat Aug 24, 2019 10:42 pm
Link to BIOS download page for Inspiron 5575, instruction for DOS flashing at bottom of page.
https://www.dell.com/support/home/us/en ... erid=fvmpc

You can use unetbootin to creat freeDOS boot USB:
https://unetbootin.github.io/
Well, when i said "per Dell's instructions", that was the exact page to which i was referring. I even checked the chksums and they were correct. The bios sees the usb stick, i point it to the usb and the flash file. But it says it is an invalid bios. So everything that is on Dell's pages, i did, and yet it won't accept it.

I have not looked at unetbootin, so i may try that next.

-Fizz

Re: understading cpu clockspeeds

Posted: Sun Aug 25, 2019 11:05 am
by Fizz
catweazel wrote:
Sat Aug 24, 2019 10:21 pm
Fizz wrote:
Sat Aug 24, 2019 1:49 pm
It's on all the cores, but variably so. One moment it'll be core 1 jumping over 2.5GHz, and the next moment it'll be core 4 jumping to 2.5GHz while core 1 drops back to 1.3GHz...

So the behavior is just all around confusing to me...
-Fizz
That's normal.
That part i'm not worried about. It's the fact that it's jumping UP in speed when it is running on BATTERY, and then dropping speeds when plugged in.

-Fizz

Re: understading cpu clockspeeds

Posted: Sun Aug 25, 2019 11:06 am
by Pjotr
Whatever you do: install the latest kernel of the 5.0 series, because that's best for AMD Ryzen CPU's.
Update Manager - panel: View - Linux kernels. Reboot after installing it.

Re: understading cpu clockspeeds

Posted: Sun Aug 25, 2019 11:11 am
by Fizz
Pjotr wrote:
Sun Aug 25, 2019 11:06 am
Whatever you do: install the latest kernel of the 5.0 series, because that's best for AMD Ryzen CPU's.
Update Manager - panel: View - Linux kernels. Reboot after installing it.
I have not tried the 5.0 kernel yet. In another thread i have been discussing stability issues with the Ryzens and various boot parameters and kernels. Seems someone there has just as many stability issues on kernal 5 as 4.18.

And my desktop machine, a Ryzen 5 1600X, has been totally stable (running 27 days currently) completely stock- still on the base 4.15 kernel, and no updated grub parameters. Of course, it's not an apu like my laptop's Ryzen 2500U. So maybe that's the difference.

Is the 5 series kernel only meant for stability issues with AMD, or are there other advantages to it?

-Fizz

Re: understading cpu clockspeeds

Posted: Sun Aug 25, 2019 11:19 am
by Pjotr
Fizz wrote:
Sun Aug 25, 2019 11:11 am
Is the 5 series kernel only meant for stability issues with AMD, or are there other advantages to it?
See: https://kernelnewbies.org/Linux_5.0