12

My RasPi is configured to 900MHz overclock using raspi-config, but it keeps running at 700MHz even under load. I have found this answer already, and my system is also running with dynamic

for info in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_*
do 
  echo ${info}
  sudo cat ${info}
done

Output:

/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
700000
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
900000
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
700000
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency
355000

Even when serving large files via SMB and running apt-get update, the frequency will stay at 700 MHz. Why?

4
  • Oh wow, now I saw it twice going to 900 MHz. I am using watch -n 1 cat /sys/... to monitor the frequency. Maybe I don't have a problem after all.
    – Arne
    Commented Mar 15, 2013 at 17:24
  • 1
    Doing lots of IO (serving files, downloading via apt) is not a processor intensive activity as the IO itself is a bottleneck -- meaning, the processor must wait on it, so while the system is busy working as fast as it can in one sense, the processor may be mostly idle.
    – goldilocks
    Commented Mar 16, 2013 at 14:50
  • @goldilocks: Well, smbd and ntfs-3g were producing close to 100% load, about 50% user and 50% system load each. I would have assumed that's enough, but maybe the system load was some kind of I/O waiting.
    – Arne
    Commented Mar 16, 2013 at 16:18
  • FYI here is an easier way to print your settings : grep "" /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_* Commented Feb 9, 2017 at 0:07

2 Answers 2

15

Even with dynamic frequency set, the Raspberry Pi has a very high default frequency scaling threshold.

To quote this blog post on overclocking the Pi:

The ondemand governor used in the Raspberry Pi will increase the CPU speed to the maximum configured value whenever it finds it to be busy more than 95% of the time. That sounds fair enough for most cases, but if you’d like that extra speed bump even when the system is performing somewhat lighter tasks, you’ll have to lower the load threshold. This is also easily done by writing an integer value to a file (you can put the following for example in the /etc/rc.local startup file):

echo 60 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

Here we’re saying that we’d like to have the Turbo Mode kick in when the CPU is busy at least 60% of the time. That is enough to make the Pi feel a little snappier during general use.

You can also set to CPU governor to performance instead of ondemand using a similar command:

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Performance will keep the CPU clocked at 100% all the time. Detailed information about the available modes can be found here: https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt

1
  • That's what I was looking for!
    – Arne
    Commented Mar 18, 2013 at 10:13
0

I made a small programm to automate the process Jonathan Milford described very good. It does this at every boot to make it persist.

Link to my project

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.