Performance and Memory Questions


When "sleeping" it uses less energy anyway. It kind of sounds like there wouldn't be much of a difference (after all of these  optimizations you mentioned) from setting it to OPP3 @ 600 and OPP5 @ 1000 for my CC unit in terms of how much battery life I will have (if I was running the same set of applications in either instance)
Eeeh, the math actually starts getting kind of complicated.Suppose it takes 5 seconds @600Mhz to do something, and it takes only 3 seconds @1000Mhz to do that same something. For a fair comparison we'll normalize the time: at 1000Mhz you have 3 seconds of high overclock usage and 2 seconds of sleep, at 600Mhz you have 5 seconds of normally high usage.

The 3 seconds at 1000Mhz is going to use more than the first 3 seconds at 600Mhz, right? That should be obvious, it's going faster so it needs more power. And the last two seconds are going to use a lot less power, again obvious because sleep uses almost nothing while full usage at 600Mhz is going to use a lot.

What isn't obvious is exactly how much more is required in those first 3 seconds: power usage isn't linear, it's a curve; the faster the CPU goes, the more power it needs to go just a little faster, so 1000Mhz doesn't use 5/3rd of the power at 600Mhz as you might think, it's probably more like twice the power, but I don't actually know for sure (someone else probably has some fancy graphs with real numbers). The complication comes from whether the extra power used in those first three seconds is balanced out by the last two seconds of sleep. And then you throw in the power differences between OPP3 and OPP5 while active and idle and things get more confusing.

In a practical sense, it all balances out and you shouldn't worry about any of this. The CPU sleep is really, really good, just set it to OPP5, 1000Mhz and forget it.
 
power usage isn't linear, it's a curve; the faster the CPU goes, the more power it needs to go just a little faster, so 1000Mhz doesn't use 5/3rd of the power at 600Mhz as you might think, it's probably more like twice the power, but I don't actually know for sure (someone else probably has some fancy graphs with real numbers).
Here you go :)

post-4382-0-41309600-1380030470.png


So in general you're right, it's not linear. But in the range above 600MHz it is pretty close to linear. It's mostly in the lower range that the nonlinear stuff happens.

Also note the difference between the 1GHz unit and the Rebirth unit: at 600MHz (in full use), the 1GHz unit consumes 1 Watt, while the Rebirth unit already consumes 1.3 Watt at that point. The 1GHz unit at its highest stable overclock speed (about 1250MHz for that unit) consumes less power than the Rebirth unit at its highest overclock speed (about 1000MHz for that unit).

If idle cpu can be approximated as zero power consumption (more or less true when you e.g. close the lid for a compile job), and you have infinite patience, then the optimal clock speed is about 480MHz on the Rebirth unit and about 570MHz on the 1GHz unit. On the 1GHz unit the perf/W hits a maximum around 570MHz, but it hits a local minimum around 650MHz, and then actually gets better between 650MHz and 1GHz. So there is no reason to downclock it to something between 650MHz and 1GHz, just clock it to 1GHz or higher.

* * *

Side note: I'm adding a feature to System Info to let you check and change the current CPUfreq governor (cf. https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt). The default on the Pandora is "performance", because "ondemand" causes poor performance in some emulators. Still, if you don't care about that, you may want to try the other frequency governors. Here are some data points from my 1GHz unit with otherwise default configuration (1GHz, OPP4, minimum visible brightness, volume all the way down):

default ("performance", sticks to 1GHz all the time)

doing nothing, lid open: about 630mW

playing music, lid open: about 900mW

playing music, lid closed: about 500mW

"ondemand" (scales down to 300MHz depending on load)

doing nothing, lid open: about 600mW

playing music, lid open: about 800mW

playing music, lid closed: about 400mW

music_playback_cpufreq_performance_vs_ondemand.png

The difference is not huge, but big enough for me to change my CPUfreq governor.
 
Do you put an ampere meter between the battery and the Pandora, or how do you measure that?
 
If you cat /sys/class/power/bq27500-0/current_now it'll tell you the current discharge (or charge) rate in uA (though in practice it only seems to give values as whole mAmps). The battery has some logic internally, though I'm not sure if that info comes from the battery or from the battery manager in practice.
 
The voltage and current is monitored and reported by the battery gauge chip (on the PCB). Those values are pretty reliable. That gauge chip also tries to keep track of the charge of the battery, with varying success.
 
Well that graph is actually really neat. I hadn't considered that the 1Ghz would just be so much more efficient in general. My assertion that a fully utilized 1Ghz would use more than the Rebirth was wrong.

A rebirth running at 600Mhz for 5 seconds to complete a task uses about 1.3*5 = 6.5 wattseconds of power then, while the 1Ghz running at 1Ghz for 3 seconds to complete the same task uses 1.65*3 =~ 5 wattseconds of power: the 1Ghz actually uses less power screaming along at 1000Mhz than the 600Mhz. I actually shouldn't be surprised at this.

edit: wait, we were talking about overclockin the the Rebirth, not a comparison of Rebirth vs 1Ghz. Nevermind, I'm tired.
 
Last edited by a moderator:
It's slightly surprising that even at 600Mhz a 1GHz unit uses less juice than a rebirth at the same speed, and even overclocked to 1.25Ghz still uses less than a Rebirth overclocked to 1GHz.


The only thing a rebirth wins at is overclockability. 1Ghz is 2/3rds extra over the datasheet speed, while the 1Ghz only manages an extra 1/4, and if it was as overclockable as a rebirth/cc would be able to reach 1.66Ghz. The rebirth overclocked by 1/4 (to 750Mhz) uses much less than a Ghz unit overclocked by 1/4.
 
wattseconds, you say? Isn't that just another name for newtonmeters? Or do you mean coulombvolts?

I think we should avoid all confusion by converting all energy units in this topic to calories, and ultimately to candybars. You can't lie to a candybar!
 
Last edited by a moderator:
wattseconds, you say? Isn't that just another name for newtonmeters? Or do you mean coulombvolts?

I think we should avoid all confusion by converting all energy units in this topic to calories, and ultimately to candybars. You can't lie to a candybar!
Can't we measure it in kilowatthours per year? or how about pounds-force inches per minute?
 
Last edited by a moderator:
kilowatthourjiffies per year then?

or pounds-force inch shakes per minute?
 
Last edited by a moderator:
Be better to measure in boogies/second, then we all know where we stand.

D.
 
Back
Top