RikardN
Posts: 1
Joined: Fri Apr 27, 2018 5:07 pm

Change max CPU freq without rebooting

Fri Apr 27, 2018 5:17 pm

I have a use case where the RPi will be running boinc and I would like to change the max cpu frequency, ie overclock, without rebooting. More specifically, a cluster of RPis will also work as a small heater, and if an external termometer shows too low temperature, a shell script shall increase the power consumption of the RPis. I've searched online and only found suggestions to change files in the /boot/ directory, which require a reboot to active. I would prefer to change the speed without rebooting.

Any suggestions are welcome!

henryww
Posts: 7
Joined: Fri Aug 10, 2018 12:23 pm

Re: Change max CPU freq without rebooting

Sun Aug 12, 2018 2:20 pm

My suggestion is to find the highest stable overclock for your Raspberry pi and set that in the config.txt, then use different CPU governors to adjust the clock rate.

BOINC is running all the time and if you need your Raspi to heat your room you set the governor to performance and if you do not need it to heat your room you set it to powersave.

Performance Governor: Sets CPU to highest clock rate
e.g. overclocked Raspi runs at 1500Mhz and no lower

Powersave Governor: Sets CPU to minimum clock rate
e.g. Raspi will run at 600mhz and go no higher (minimum clock rate can also be specified in config.txt )

There are many other governors but these two are probably the most useful to you.

I don't believe raspbian has alternative governors baked into the kernel so you will have to recompile the kernel with the governors you need. You may also need some other utilities to change the governor when you need.

Code: Select all

cpupower frequency-set -g performance

Code: Select all

cpupower frequency-set -g powersave

Code: Select all

cpupower frequency-set -g ondemand

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 11 guests