News for hackers. Stuff that matters.
Re:Extreme Pi Boot Optimization by throw10920 on Sunday September 01, 2024 @11:41PM (#41422400)
I like the article as a whole, but I'm unsure about this point:

> For example: Disabling CPU turbo just to save some current consumption is a bad choice, because the resulting extra time will use more energy than just getting the job done quickly and shutting off.

In one of my computer engineering classes, I learned that power consumption rises as the square of clock frequency - so doubling the clock will quadruple the power.

That seems like it'd imply that you'd actually have to measure the power difference to determine if the quadratic increase from the clock boost will outweigh the product of the constant power consumption with the additional time spent on the task.

Related - it'd be nice if the Pi's CPUs included granular power consumption information, either derivable from the datasheet, or as real-time values exposed in registers.

[dead]
Re:Extreme Pi Boot Optimization by throw10920 on Monday September 02, 2024 @12:57AM (#41422710)
Yes, this is all correct, as long as you're implicitly assuming that the CPU itself has some static power dissipation as well (which it does) in addition to the rest of the system.

Unfortunately I missed the actual benchmarks in the article that empirically measured the power difference.

Re:Extreme Pi Boot Optimization by bjackman on Monday September 02, 2024 @06:17AM (#41424154)
I think you have it right but also my experience from optimising Android power usage was: your your intuitions are helpful for knowing what to try, but you have to test and measure everything as there are always complications. Luckily you are well equipped to benchmark it already :)
Re:Extreme Pi Boot Optimization by Salgat on Monday September 02, 2024 @12:53AM (#41422688)
There's a base amount of power overhead the device will use no matter what, even if it does nothing. They even provide benchmarks that show that current consumption for turbo increases 10% but reduces boot time by 11%, for a small but measurable difference in total energy used.
Re:Extreme Pi Boot Optimization by mortenlarsen on Monday September 02, 2024 @02:45AM (#41423167)
What about the internal resistance of the battery? Doesn't that increase with higher current?

As in 1A for 2 seconds uses less actual battery power than 2A for 1 second due to internal loss in the battery?

I may be remembering this wrong, It has been a long time since I studied this stuff.

Re:Extreme Pi Boot Optimization by hinkley on Monday September 02, 2024 @11:10AM (#41426053)
That’s true when you’ve saturated all of those subsystems but not when you’re just CPU bound. If you’re doing high throughput from disk to memory to CPU and back to disk, there are levels of use where throttling IO helps with battery draw. There are old papers on the subject, and I have a suspicion that OS X started doing something of the sort when they went to nonremovable batteries in the MacBook. There’s a 30% reduction in power draw in that generation that they brag about but don’t really explain, and it was a handful of years after that first paper showed up.
Re:Extreme Pi Boot Optimization by daalex on Monday September 02, 2024 @01:47AM (#41422918)
> In one of my computer engineering classes, I learned that power consumption rises as the square of clock frequency - so doubling the clock will quadruple the power.

This is not quite correct. Switching power of a chip (ignoring static leakage) is proportional to voltage squared times frequency. Most chips require a higher voltage to reach higher clock speeds, so there is a quadratic relationship there. However, I believe that the raspberry pi does not have dynamic voltage control, so reducing clock speed without also reducing voltage will not effect total switching energy consumption.

Re:Extreme Pi Boot Optimization by nsteel on Monday September 02, 2024 @03:51PM (#41428275)
Re:Extreme Pi Boot Optimization by heavypixels on Monday September 02, 2024 @05:47AM (#41424020)
For a continuous workload that's a reasonable rule of thumb, but it doesn't tell the whole story. You always have a certain static power draw, just from having a component enabled. So modern embedded systems will often use a "race-to-sleep" or "race-to-halt" strategy where they will execute tasks really quickly, before shutting down most of their components waiting for the next event to trigger.
Re:Extreme Pi Boot Optimization by MobiusHorizons on Monday September 02, 2024 @10:27AM (#41425635)
This is a well understood power optimization strategy called race to idle. It works because there are a lot of periferals taking power in addition to the cpu that you can’t switch off until the cpu is done.

There is also definitely a sweet spot. If you overclock the cpu too much your performance per watt drops too far and race to idle won’t work anymore.