Lope
Posts: 70
Joined: Tue Jul 02, 2013 7:53 pm

Underclock and Overclock - dynamic performance & efficiency

Mon Jul 28, 2014 1:32 pm

I'm running a standard 512MB Model B, with the latest Raspbian image 2014-06-20 installed and dist-upgraded.

I need burst (dynamic) performance
My RbPi doesn't work hard most of the time. So a CPU freq of 200mhz is fast enough. But when I do maintenance on it, or use the GUI, it's quite slow. So the dynamic overclocking option really appeals to me, with underclocking enabled also.

Dynamic Under/Over clocking working well so far
I just OC'd my RbPi using the raspi-config utility.
I've confirmed that my CPU freq scales dynamically according to use, but I can't confirm my memory speed or voltage are adjusting also.

#/boot/config.txt settings set by raspi-config
arm_freq=1000
core_freq=500
sdram_freq=600
over_voltage=6

#underclocking options added by me
arm_freq_min=200
core_freq_min=200
sdram_freq_min=200

I wanted to make sure that neither my underclocking nor my overclocking settings are going to cause instability.
I have run the above config headless (needing VNC access at the moment only) for a few minutes and it seems great. But I've read that if one of the freqs is <= 200mhz the screen won't work properly and the SD card can be corrupted.

SD card corruption caused by under/overclocking
What is the current status of this issue? I've read that Raspbian has made sd-card fixes to prevent corruption. Have they succeeded for all clock speeds? or just a range of clock speeds?

What are the recommended min/max for each speed?
arm_freq
core_freq
sdram_freq

How many steps are used in between min and max freqs?
Does it only switch between min and max speed?
I'm wondering if I can safely use over_voltage_min with a negative value to undervolt for my 200mhz speed without affecting my overvolted 1000mhz performance.

What will happen with my config if the core exceeds 85 degrees?
I've read that the RbPi will automatically reduce the voltage and frequency if it overheats. What voltage and freq would that be? The minimums? or does it just drop down gradually?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5091
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Underclock and Overclock - dynamic performance & efficie

Mon Jul 28, 2014 2:04 pm

Lope wrote: What is the current status of this issue? I've read that Raspbian has made sd-card fixes to prevent corruption. Have they succeeded for all clock speeds? or just a range of clock speeds?
I'm not aware of any sdcard corruption issue caused by overclock or underclock.
Lope wrote: What are the recommended min/max for each speed?
The defaults are the ones guaranteed to work. Anything else you'll have to test yourself.
Lope wrote: How many steps are used in between min and max freqs?
Does it only switch between min and max speed?
Yes, the default performance governor switches between min and max.
Lope wrote: I'm wondering if I can safely use over_voltage_min with a negative value to undervolt for my 200mhz speed without affecting my overvolted 1000mhz performance.
Yes, should be possible.
Lope wrote: What will happen with my config if the core exceeds 85 degrees?
I've read that the RbPi will automatically reduce the voltage and frequency if it overheats. What voltage and freq would that be? The minimums? or does it just drop down gradually?
It will switch to min settings (but in reality virtually never happens).

You may want to explain why you want to underclock?
It probably makes no measurable difference to cost of electricity used, or lifespan of the chip.

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: Underclock and Overclock - dynamic performance & efficie

Mon Jul 28, 2014 3:15 pm

I did some experements about a year agao to see if I could save power with a in-car media server and it wasn't worth it. I don't recall the clocks and undervolt I ended up with but I recall only saving 0.1W. What I did was set up a samba share and connected 2 tablets to it streaming movies. After that I ran the R Pi's clocks down until my logs read about 90 to 95% CPU use. Then undervolted to the max that was stable.

The problem is that you can't affect the ethernet/usb chip or vreg or any other components consumption. If you read some of the old blogs of the weather baloon guys they found the same results I did.

Lope
Posts: 70
Joined: Tue Jul 02, 2013 7:53 pm

Re: Underclock and Overclock - dynamic performance & efficie

Mon Jul 28, 2014 9:05 pm

My pi is currently running a VNC server (with no client connected) and an IRC client logging a channel.
That is pretty much it's main function at the moment. I just checked the CPU speed:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
200000

So it does drop to the min.

I hear what you guys are saying about not saving any significant amount of power. I guess the value is in the skills/experience of doing it.

As long as 200mhz (at stock volts) isn't going to corrupt anything it's all good.

If you do a google search for (underclock|overclock) raspberry pi sd card corruption you'll find a fair amount of people talking about it. I've not seen any thoroughly documented tests though.

Is there any reason not to underclock?

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Underclock and Overclock - dynamic performance & efficie

Mon Jul 28, 2014 9:28 pm

Lope wrote:Is there any reason not to underclock?
dom wrote:The defaults are the ones guaranteed to work. Anything else you'll have to test yourself.
;)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5091
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Underclock and Overclock - dynamic performance & efficie

Mon Jul 28, 2014 9:28 pm

Lope wrote:Is there any reason not to underclock?
There is some latency between the core becoming busy and the higher clock speed being engaged. This will reduce performance a small amount.

Lope
Posts: 70
Joined: Tue Jul 02, 2013 7:53 pm

Re: Underclock and Overclock - dynamic performance & efficie

Tue Jul 29, 2014 8:28 am

The other reason I thought underclocking is good, is to cool down the core so it's less likely to hit 85c and get throttled.

How easily do the cores hit 85c? (at the default turbo settings of 1000mhz with default overvolt of 6)

Is the RAM also guaranteed to work at 600mhz under the standard turbo settings?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17554
Joined: Sat Jul 30, 2011 7:41 pm

Re: Underclock and Overclock - dynamic performance & efficie

Tue Jul 29, 2014 8:34 am

Lope wrote:The other reason I thought underclocking is good, is to cool down the core so it's less likely to hit 85c and get throttled.

How easily do the cores hit 85c? (at the default turbo settings of 1000mhz with default overvolt of 6)

Is the RAM also guaranteed to work at 600mhz under the standard turbo settings?
I'm not sure anyone outside a lab has ever hit 85 (and I think that required a hot air gun blowing on the SoC). Someone has reported 80, in a closed unventilated case, running GPU and CPU full tilt (a very unlikely scenario) in ambient of I think 25.

There are no guarantees on anything when you overclock.

Underclocking doesn't really make any difference to core temperature.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
RaTTuS
Posts: 9360
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Underclock and Overclock - dynamic performance & efficie

Tue Jul 29, 2014 8:41 am

there is no guarantee on speed other than stock YMMV
85deg C is hard to achieve - I've nerver got more than 58 on mine [in a very hot office]

a long time ago I ran it at very low speeds - to try an find what the minimum was - it took a long time to boot - ;-p

but you will not save any power that way [well nothing useful]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: Underclock and Overclock - dynamic performance & efficie

Tue Jul 29, 2014 7:30 pm

The other thing people tend to miss is that the faster a task completes the quicker a SOC can return to an idle power saving state. You can only save power with under-clocking/volting is if you plan on having persistent use.

Lope
Posts: 70
Joined: Tue Jul 02, 2013 7:53 pm

Re: Underclock and Overclock - dynamic performance & efficie

Wed Jul 30, 2014 6:22 am

So does 700mhz at idle use less power than 50% busy at 200mhz?

User avatar
RaTTuS
Posts: 9360
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Underclock and Overclock - dynamic performance & efficie

Wed Jul 30, 2014 7:41 am

Lope wrote:So does 700mhz at idle use less power than 50% busy at 200mhz?
possibly about the same...
the SOC will switch things off on the chip if it's not doing anything - so the GPU's are mostly quiet all the time unless you are using them
the ARM is a small part of the chip..
the LAN951[2-4] will eat up a shed load and the VR unless you are on a B+
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Vetals
Posts: 46
Joined: Thu Feb 28, 2013 10:37 am
Location: Eastern Europe

Re: Underclock and Overclock - dynamic performance & efficie

Fri Jan 09, 2015 11:03 pm

I have model B, and i have set from default params the following:

Code: Select all

arm_freg=500
sdram_freg=200
and then rebooted PI

I have noticed that speed of PI now a little bit increased, so how that can be true?
I did downclock for powersaving purposes, and saving even 0.1W is good for me.

qhiming
Posts: 2
Joined: Sat Jan 10, 2015 9:10 am

Re: Underclock and Overclock - dynamic performance & efficie

Sat Jan 10, 2015 9:16 am

if you put enough together, maybe you can surpass other cpus on the market. :)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5091
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Underclock and Overclock - dynamic performance & efficie

Sat Jan 10, 2015 11:20 am

Vetals wrote:I have model B, and i have set from default params the following:

Code: Select all

arm_freg=500
sdram_freg=200
and then rebooted PI

I have noticed that speed of PI now a little bit increased, so how that can be true?
Note you have typos in those two lines so they will have no effect.
If you believe performance is improved with locwer clock speed, then provide some evidence (e.g. before and after benchmarks like nbench).

User avatar
pluggy
Posts: 3636
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Underclock and Overclock - dynamic performance & efficie

Sat Jan 10, 2015 11:47 am

I read a blog on sending Pi's up with weather balloons and running the things on as small a battery as possible (less weight). All kinds of hardware mods & software stuff to shave milliamps off the load, his conclusion that underclocking was a waste of time, it made practically no difference to the electrical load. It makes sense because the Pi's SOC is 90+ % GPU and the CPU is a very minor player. Obviously the B/B+ was a non starter for current consumption. Electrical load is directly related to temperature. Any form of computer will ultimately turn all the electrical power into heat.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Vetals
Posts: 46
Joined: Thu Feb 28, 2013 10:37 am
Location: Eastern Europe

Re: Underclock and Overclock - dynamic performance & efficie

Sun Jan 11, 2015 12:20 pm

nbench cant finish this task.

I got:

Code: Select all

CPU:NNET--error in opening file
@ pluggy Thanks for the info.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5091
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Underclock and Overclock - dynamic performance & efficie

Sun Jan 11, 2015 12:24 pm

Vetals wrote:nbench cant finish this task.

I got:

Code: Select all

CPU:NNET--error in opening file
nbench requires two data files in the current directory NNET.DAT and COM.DAT - do you have those?

Vetals
Posts: 46
Joined: Thu Feb 28, 2013 10:37 am
Location: Eastern Europe

Re: Underclock and Overclock - dynamic performance & efficie

Sun Jan 11, 2015 2:46 pm

@ dom

Yes, i put 2 of those files in /usr/local/bin and still error.

Okay, i give up on this.

My info was based on visual basis only. And since i put info of my config.txt anyone can provide info from that app.

Its strange to me, that, with Raspi Default config apps like: screen, mocp, ssh sometimes work faster, sometimes slower. And after i downclocked Pi it seemed to me that Pi started to work a little bit faster.

Return to “General discussion”

Who is online

Users browsing this forum: Dr. Dante and 46 guests