[Droid Incredible General] byrong:
I've recently been curious as to how much influence my chosen CPU frequencies and screen settings have on power usage. Of course, it is common knowledge that an overclocked processor requires more current and that our displays are power hungry, but how apparent is the difference? Is the relationship between these variables and battery consumption linear, or is the increase in power demand perhaps exponential?

In an effort to explore these questions, I set up a controlled test that logged CPU frequency and screen brightness against current usage. This data should not be assumed to directly apply to all Incredibles; I was looking for correlations rather than exact calculations on how much energy a specific setting uses.

Methods (go ahead and skip down to the findings section if this is too dry for you)

AMOLED Inc

Kernel: Chad's 2.6.37.1-incredikernel-gb-2272011

ROM: CyanogenMod 7 - Nightly #11

And not that it should matter, but someone will ask so...

Radio: 2.15.00.11.19

HBOOT: 0.92

Recovery: ClockworkMod 3.0.0.8

CPU frequencies were controlled using SL4A scripts and Tasker. Max frequency can be manipulated through /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq, so a single echo command is all that is needed to adjust it. I set up a rudimentary if/then script to bump up the max frequency one notch at a time, then used Tasker to execute this script every two minutes.

When Tasker would execute the script, it would also write an entry to a log file shared with CurrentWidget. This ensured that the CPU frequency was being noted between milliamp readings. Multiple readings were taken at each level, and entries that immediately preceded or followed clock changes were discarded in an effort to use the more stable readings at each frequency.

To control for other influences, all other phone services were disabled, including GPS, Wi-Fi, and Bluetooth. The phone was also placed in Airplane Mode so that reception was not a factor.

The CPU governor was set at "performance," ensuring that it remained at its max frequency. To task the CPU, I put together another simple script which just ran md5sum commands in a never-ending loop. Before recording data, I verified that this script was enough to load the CPU and cause it to scale up to max frequency when using other governors.

The full range of frequencies was tested at the screen's dimmest factory setting (20/255) as well as the screen's brightest setting (255/255). Additionally, a separate test was run with the CPU fixed at 576 MHz and Tasker periodically bumping up the screen brightness.

Findings

My data showed an almost perfect linear correlation between clock speed and power use, as well as brightness and power use.

I was a little surprised at how big of a difference I was able to find. With the screen at its dimmest setting, 128 MHz consumed ~80 mA while 1,113 MHz consumed more than 300 mA. For a stock Inc battery (1,300 mAh) that marks the difference between (over) 16 hours of runtime and less than 4.5 hours of runtime. Of course, anyone who has tested the limits of underclocking knows that the phone is utterly useless at 128 MHz.

The influence of brightness was less of a surprise. At a given CPU frequency, the average difference that I noted between min screen brightness and max screen brightness was ~118 mA.

I would love to be able to test every single combination of CPU frequency and screen brightness, but it would take hours, and I cannot keep my phone out of use for that long. I did generate some additional projections, however, based on the trends observed in the combined tests. I've added these projected points to the graph below, based on screen settings of 80/255, 140/255, and 200/255.

Shortcomings / questions for further exploration

Given the sterile nature of the data collection, I can't just make a blanket statement like "underclocking your max CPU to 883 MHz will yield an average of 15% more battery life over leaving it set to 998 MHz." As convenient as it would be to make such a claim, it ignores a number of realities. None of us are using 100% of our processor at all times, so a more accurate prediction of runtime would need to take the phone's resting behavior into account.

We should also consider that the CPU's frequency will affect the speed at which it can perform tasks. If you clock your processor too low, you may actually end up consuming more power since your phone will have to work longer (resulting in more wake time and more screen-on time).

A more technically inclined member may want to chart CPU frequencies against power usage, while also including some sort of performance benchmark. Such a matrix would offer users an even better model on which to judge the cost/benefit of over or underclocking. But even the simple testing which I've completed above takes a fair amount of time and keeps the phone from being otherwise used, so it's not a very convenient thing to test.

What I find most interesting about the data is the implication that a user who overclocks his CPU max to 1,113.6 MHz and sets his screen brightness to 80 could use less power than a user who underclocks his CPU max to 883 MHz but uses a brightness of 200.

The easiest takeaway, of course, is an illustration of why users experience such wildly different run times on the same rom/kernel setup. Again, this should come as no surprise, but skepticism should be exercised any time someone promises you that switching to a specific rom/kernel combo will guarantee you X hours of battery life.

[This work may be freely distributed for non-commercial purposes, as long as it is passed along unchanged and in whole, with credit to author and a link back to this XDA thread.]