Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,216 Members 53,489 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: Is my mobile device CPU overclocked or undervolted
I don't want to or I cannot 19 5.15%
No because its potentially unstable but I would 65 17.62%
Yes but it's not 100% stable 93 25.20%
Yes and it's rock solid 192 52.03%
Voters: 369. You may not vote on this poll

[FUTURE APP] Overclocking/Undervolting stability test & power efficiency optimizer

Tip us?
 
supercurio
Old
(Last edited by supercurio; 10th April 2011 at 03:12 AM.)
#1  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5,072
Posts: 3,529
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Default [FUTURE APP] Overclocking/Undervolting stability test & power efficiency optimizer

Hi !
Here is the description of a potential app that might be developed under an open source license by united developers.

The app has several intents we may discuss:

1/ Validate the CPU stability

- Rare defective devices are not stable with manufacturer's Frequency, voltage and governor configuration.
- With overclocked devices, stability is far more challenging and as difficult to verify.

CPU stability is influenced by a lot of parameters, like
- Frequency table
- Voltage table
- Governor used
- Quality of the voltage regulation & switching implementation (hardware and software)
- Environmental heat, by other components (GPU, battery, screen) or the external temperature especially with black devices under the sun.


2/ Validate the GPU stability

Same thing here, most of our devices GPU can be overclocked but so far there is no good tool to validate its stability.


3/ Validate the system stability

Torture test: CPU + GPU + screen at 100% stability & charging at the same time
This is quite a common scenario when phone or tablets are used as gaming devices.


4/ Provide help to optimize the power efficiency

Today many OC users tend also to reduce the power efficiency of their device by setting inappropriate minimal and maximal frequencies (reduces efficiency) or by configuring too high voltages.

The best OC in general, or at least the most energy efficient consist of increasing the frequencies without changing the voltages.
Even if a higher frequency increases the power envelope, it only improve the power efficiency.
Also, undervolting for reduced frequency / power energy states improve power efficiency.


Future: automatic OC optimizer with profiles

Profiles:
- Best power efficiency without overclocking (undervolting only)
- Best power efficiency
- Balanced
- Max performance

With this feature, It could become the master of every OC tool.
Of course it will require the ability to speak to each existing sysfs controls formats, which is not such a big deal as most are quite cleanly implemented!
However it would make a few apps obsolete & also few people mad, which is definitely a negative point.

Another idea for this optimizer could be to allow for other OC apps to use the stability test engine and do the optimization themselves.


Implementation details

Good old stability stability test traditionally has been trying to make your CPU hot. As hot as possible, consume the most power, see if it crashes, and that's pretty much all.
While this approach could work with old PC CPU, it's now totally outdated.

Even if an excess of heat is still capable of making a CPU crash, modern CPU have quite complex usage behaviors like
- Switching Frequency and Voltage all the time.
- Entering and leaving sleep over and over, each time you lock/unlock your device, of the baseband wake it up by receiving a message, etc.

Like in every low level hardware stuff, the most delicate operations are switch of states, so, what a stress-test needs to do contains:

For me the reference test is "Intel Linpack" x86 implementation like you see in IntelBurnTest. I heard linpack binary is what they use in factory to determine which is the frequency rating of each CPU.
I don't know if it's true but I've always been impressed by the short time needed to detect an unstable PC system reliably where other tools like "prime95" could run for hours without giving usable result.

The ability to let the CPU (or GPU) switch frequencies
It can be done:
- by varying the CPU load. CPU governor will do its thing all alone.
- by "force" modifying the CPU frequency directly

Let the device enter sleep and wake it up

Many OC devices seems to work well but suffer from "sleep of death" issue. IE never wake up.
Sometimes even non-OC device have the same problem if you use ondemand governor instead of conservative.

I guess this is definitely something that can be implemented in the stability test

Detect non-fatal calculation errors

Like Intel Linpack test, errors detecting before a crash is smart and much safer.
It also allow to reduce dramatically the required test run time.


Existing apps

@SnakeHaveYou told me about the existing app named StabilityTest.
In the description the implementation looks very good, with the ability to detect non-crashing calculation errors.
However after about 20 minutes of test at a known unstable frequency on my phone, I get no error.
However if I keep the same OC'ed frequency, starting an OpenGL game, or let the phone enter sleep and waking it up a bit later leads to an unrecoverable freeze.

So, this app looks good but its implementation seems to lack the full stress ability required to simulate a real usage pattern.
The Following 22 Users Say Thank You to supercurio For This Useful Post: [ Click to Expand ]
 
supercurio
Old
(Last edited by supercurio; 9th April 2011 at 11:14 PM.)
#2  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5,072
Posts: 3,529
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Who

After running the app idea on twitter, several developers showed interest in the idea.
I have no plan to write or promote this application by myself.

However I'm interested into acting as a host, incubator or something like that, and also contributor.

Who showed interest right away (developers)

@bvalosek
@BFGarzilla9k
@ytt3r
@ogdobber
@KhasMek
@TheEscapist_xda

And also a few people before the the the idea was described publicly.

I guess this app can have a very large user base quite fast, especially since it will be promoted by about every kernel developer here on XDA.

How

I propose a shared git repository on https://github.com/project-voodoo with plenty of contributors with write access to the App SDK & NDK code.
Maybe forks all over the place could do also, but if it enhance freedom I'm not sure it would favor collaboration so much

Hey, your turn guys!
The Following 6 Users Say Thank You to supercurio For This Useful Post: [ Click to Expand ]
 
zerkai
Old
#3  
zerkai's Avatar
Senior Member
Thanks Meter 71
Posts: 630
Join Date: May 2010
Location: Seattle
This would be extremely useful. Hope it goes well!

Sent from my SAMSUNG-SGH-I897 using Tapatalk
SGH I747: ROM RootBox v3.6 MODEM LK3 KERNEL task650's underwear
SUPERCHARGED RAM + MULTI-TASKING MODS
TWEAKED W/THUNDERBOLT!
 
ytt3r
Old
#4  
ytt3r's Avatar
Retired Recognized Developer
Thanks Meter 322
Posts: 556
Join Date: Dec 2010
Location: GA

 
DONATE TO ME
This is a really cool idea. I know enough XML to work on the UI, so I guess if I want to be involved, thats the way in

I won't be much help this week though.
Like my contributions to whatever? Buy me a root beer.
 
storm717
Old
#5  
Retired Recognized Developer
Thanks Meter 101
Posts: 65
Join Date: Sep 2007
Location: Austin, TX

 
DONATE TO ME
nice posts bud-- good to see you starting the ball rolling from your idea on Twitter earlier. Just some quick info before I head out... more tonight probably

Some thoughts on the app:
  • the changing of states is definitely a huge thing to work into the tests, as this is where some of the more subtle problems between the voltage/freq steps seems to manifest themselves.
  • I have yet to find a synthetic test that can fail/detect problems as quickly as say launching a game like Cordy.., so there are ways to bash the system harder than the current tests it seems

what i can bring to the table
  • No experience with the NDK but pretty solid C experience for embedded systems
  • Can probably help the most on UI/metrics/feedback parts of the app. Creating views to reflect test status, sysfs state info, etc. Example of an app that shows time_in_state info i wrote a few weekends ago -> CPU Spy

my dev environment
  • Arch Linux
  • vim + android SDK command line tools
  • git for VCS (github for the few opensource projects I've done)

I'll be watching this thread to see what sort of dev activity we have going on over the next few days... looking forward to working with some of yall fellow XDA guys
The Following User Says Thank You to storm717 For This Useful Post: [ Click to Expand ]
 
ytt3r
Old
#6  
ytt3r's Avatar
Retired Recognized Developer
Thanks Meter 322
Posts: 556
Join Date: Dec 2010
Location: GA

 
DONATE TO ME
Do you have a twitter? It would be good if you made one for collaboration

Sent from my SGH-I897 using XDA App
Like my contributions to whatever? Buy me a root beer.
 
storm717
Old
#7  
Retired Recognized Developer
Thanks Meter 101
Posts: 65
Join Date: Sep 2007
Location: Austin, TX

 
DONATE TO ME
Quote:
Originally Posted by ytt3r View Post
Do you have a twitter? It would be good if you made one for collaboration

Sent from my SGH-I897 using XDA App
@bvalosek
 
TheEscapist
Old
(Last edited by TheEscapist; 10th April 2011 at 05:03 PM.)
#8  
TheEscapist's Avatar
Senior Member
Thanks Meter 357
Posts: 1,859
Join Date: Nov 2010
Location: Toronto
I agree with supercurio on the Linpack, detecting errors part. My idea was something like Prime95. Have an array of known primes, first 1000, lets say, then start generating the first 1000 primes. After each division(inner loop), change the frequency max and min level to a random step. If the generated prime number ever fails the comparison to the known primes, you are unstable. Since a lot of the instability in mobile oc comes from the voltage switching, the frequency switching would stress that as well.

EDIT: Heh, we made front page.
 
SammyM00782
Old
#9  
Senior Member
Thanks Meter 6
Posts: 204
Join Date: May 2010
Toastcfh and Decad3nce have given us HTC guys some incredible Kernels in the past. You might wanna run this past them if they haven't seen it already. I know zero about kernels or I would jump in this asap. There's nothing like flashing a kernel update script to find your device doesn't boot anymore :)
 
supercurio
Old
(Last edited by supercurio; 10th April 2011 at 07:23 PM.)
#10  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5,072
Posts: 3,529
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Alright let's create a repository to boot with then

Incoming here: https://github.com/project-voodoo/an...stability_test

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes