neofetch says the CPU is working @ 1.5 GHz, but the performance is far from normal.
When using 7z 22.01’s performance test it reports that the CPU frequency is only 0.6 GHz. I’ve tried to overclock it to 2.2 GHz by adding config.txt, but still only neofetch reports this frequency while CPU still working on 0.6 when doing 7z performance test.
Is it working on powersave mode? If so, how can we change it to schedutil🤔
My first question would be: What kind of cooling parts do you have on your device? I use passive heatsinks over some of the key chips myself, but an active fan is also an option. If you don’t have any, the processor is likely to get really hot, really fast.
Here’s a little handy script for grabbing the temperature of your pi - just save this to something like “rpi_temp.sh” and run it when you want your values:
perhaps (I’m guessing here!) this has rather something to do with how 7z “calculates” the CPUs frequency based upon the features it uses to perform compression. To be on the safe side, although probably a bit tedious, I’d consider running a standard Raspbian or maybe give DietPi a try and then check out what 7z reports on these OS.
If there is no big difference, then it’s probably a 7z thing. If there IS a difference in speed, then it’s a RL (or even RHEL?) thing. Which might mean that there is some kind of optimzation not available in the stack (packages, etc.) used by RL. But that’s just pure guessing as said.
Thanks for the reply. I did have other systems in the past such as Rocky Linux 8.6, Oracle Linux 8.6 (so might not be RHEL related), Ubuntu 22.04 and even an OpenWRT router system. None of them have any issues like this. But since I’ve got a spare SD card, I will try flashing RL9 again to see if the problem is gone ( if so then I’ll be more confused what caused this issue since the system is pretty much a clean one😂)
UPDATE:
I reflashed RL9 on a spare SD card and tested 7z on the absolutely clean system and it is still the same. By the way, I discovered this issue not by using 7z benchmark, but when using a KVM virtual machine. The performance was about 1/4 to 1/3 of Rocky Linux 8.6 and Ubuntu 22.04 and then I used 7z to do some performance test and found the CPU was stuck at 0.6 GHz🤔 So I think this issue can be easily reproduced?
My RPI 4B is 2GB RAM, version 1.1
Thanks for your research! I’ll investigate further and try to figure out why exactly Rocky 9 in particular has this issue. Super odd, because on the rpi, Rocky 8 and 9 actually have extremely similar kernel versions and firmware packages.
Will look into it more and let you know what I find! Anyone else want to help out, please feel free!
Hey, mystery solved! We have the “powersave” profile turned on the CPU governor for whatever reason by default, which locks the speed at 600 Mhz.
Fix it like this (as root):
systemctl enable cpupower; systemctl start cpupower (To ensure the config file is present)
Edit /etc/sysconfig/cpupower, make both the lines end like this: "frequency-set -g ondemand" (we’re changing “powersave” to “ondemand”)
systemctl restart cpupower
Check the CPU governor: cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor . It should now say “ondemand” and not “powersave”. You can also echo values to this file to change it on-the-fly, but the changes won’t survive reboots.
This governor controls how hard the CPU works. “powersave” (our accidental default) will keep it at the minimum frequency (600 Mhz) no matter what in order to conserve energy and keep things cool. “performance” will run at the maximum clock speed (1.5 Ghz) no matter what. “ondemand” is a happy medium that will scale the rate up or down depending on workload.
Thanks for finding this, and sorry it got overlooked. You can bet we’ll have it set correctly by default in the upcoming 9.1 release. In the meantime, I hope this helps!