Overclocking Question...

Discussion in 'Android Hacks and Help' started by studepaber, Aug 9, 2010.

  1. studepaber

    studepaber New Member

    Joined:
    Jul 27, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Hey Droid community. Sort of a newb here with hacking/rooting my Droid, but was hoping someone could help me out..

    Got a Droid 2.1 rooted with Easy Root. Basically the only reason I want to root is to overclock (and I guess underclock). Downloaded SetCPU and thought I remembered someone saying you could overclock to 800mhz without using a custom kernal. So I launch SetCPU, select "ondemand", autodetect and the max I can overclock is 550 mhz. Was the person who told me 800 wrong or am I just missing something. So let's say I do need a custom kernal for overclocking, which one is best? Bugless Beast? I read the post of how to install bugless beast for newbs http://www.droidforums.net/forum/hacking-help/19818-how-install-bugless-beast-noobs.html is this still relevant? The link to Recovery 0.99.2b isn't working, anyone have an updated one and also link to best version of bugless beast (for 2.1 or 2.2)?

    Thanks to anyone who can help!
     
  2. warrior21

    warrior21 Active Member

    Joined:
    Mar 15, 2010
    Messages:
    1,287
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    NY
    Ratings:
    +0
    #2 warrior21, Aug 9, 2010
    Last edited: Aug 9, 2010
  3. gavron

    gavron Guest

    Ratings:
    +0
    The following is my original post... but Skull One's post (2 further)... opened my eyes a bit.
    It is wrong. It is left here because I said it, but I no longer believe it to be true based on what he wrote.
    Ehud Gavron
    2010-08-09 19:41z

    Underclocking as a method of saving power is a myth. I will try and explain without boring you :)

    There are set tasks your Droid wants to do, which if it makes you feel better we'll call "housekeeping". These include kernel level stuff (removing unused memory allocations from the heap), driver stuff (saying hello to your PC on the USB port), application stuff (Making sure your email is up to date), and interrupt-stuff (Oh Look, It's Time For Alarm Clock to Go Off!). There's more but you get the point.

    To do those requires X amount of CPU power. It's going to use X amount of CPU power. If you have the CPU set to "Up to 800MHz, ondemand" it will be done quickly. If you have the CPU set to "Up to 250MHz, ondemand" it will be done in roughly 4x the time.

    All things being equal these would consume the same amount of power. However, all things are not equal. The CPU is designed to be most efficient close to its maximum operating frequency. The rest of the Droid doesn't have to be sitting around (transmitting bluetooth, CDMA, and WiFi radios) for that longer duration.

    So while underclocking CAN make sense if you turn off all your radios and display, for "normal" use it is not useful.

    I hope I explained it well. If I didn't, shame on me, please tell me :)

    E
     
    #3 gavron, Aug 9, 2010
    Last edited by a moderator: Aug 9, 2010
  4. studepaber

    studepaber New Member

    Joined:
    Jul 27, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Thanks for the help and explanations, I think moreso I would like to overclock (just to 800 mhz or 1000) for the sake of speeding up my phone's performance on certain apps. I'm not really interested in downloading a custom ROM I guess, if only something like P3 kernal is needed. Are there any explanations out there of the easiest way to install this or would anyone care to explain what needs to be done? (or summarize?)

    Thanks again.
     
  5. warrior21

    warrior21 Active Member

    Joined:
    Mar 15, 2010
    Messages:
    1,287
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    NY
    Ratings:
    +0
    You download the .zip file and place it on the root of your sd card. I would go with the LV 800mhz or 1ghz kernel. If you are using sprecovery you will change the file to update.zip, if you are using clockwork you can leave it as is. Boot into recovery by holding down the x key while you are powering up and install the file from your sd card WITHOUT wiping data/cache. Once you are done, reboot your phone and install setcpu. Click on autodetect and move the green bars to your desired speeds and you can also set your profiles.
     
    #5 warrior21, Aug 9, 2010
    Last edited: Aug 9, 2010
  6. Skull One

    Skull One Member

    Joined:
    Mar 11, 2010
    Messages:
    759
    Likes Received:
    6
    Trophy Points:
    18
    Ratings:
    +6
    I hate to be the bearer of bad news but you are 100% incorrect. I have spent the last six months studying overclocking and underclocking of the Motorola Droid 1 and have now over 70 hours of testing invested in my thread on Overclocking.

    Your premise of:

    "To do those requires X amount of CPU power. It's going to use X amount of CPU power. If you have the CPU set to "Up to 800MHz, ondemand" it will be done quickly. If you have the CPU set to "Up to 250MHz, ondemand" it will be done in roughly 4x the time."

    Fails to take into account several factors.

    1) Voltage used in each slot of the kernel.
    2) Governor used.
    3) If using the On Demand Governor: Sampling Rate, Up Threshold and Power Bias.
    4) Length of time each piece of code runs.

    Your example also expects tasks to be linear, which if this was a benchmark you would be 100% correct. But an OS is not a benchmark. It is an adaptive situation based on the current applications loaded and events hooked to.

    So using your example of a "linear" piece of code, that is scalable based on speed, lets show why my first 3 "factors" are important.

    Lets use a simple loop:

    for (double lnLoop= 0; lnLoop < 1000000; )
    { lnLoop++; }

    Your example would be 100% correct that at 1000Mhz this code would be four times faster than at 250Mhz. And if it took the Droid 40 milliseconds at 250 Mhz, it would take 10 milliseconds at 1000 Mhz. There is no way I can deny this fact. BUT here is why cell phones under clock and also why the Android OS is one of the best phone OSes on the market.

    The current kernels being made for overclocking use nearly a linear voltage increase from their lowest frequency to the highest frequency. So lets say that 1000Mhz has a 15% higher voltage usage than 250Mhz for the point of this argument.

    You have SetCPU setup with 250Mhz/1000Mhz, OnDemand, 65000, 50, 0, 0. That means every 65 milliseconds the Android OS is going to test to see if the OS usage is over 50% and if so step up the clock rate from the low of 250Mhz thru to 1000Mhz. And now comes the issue at hand, the code only takes 40 milliseconds to execute. So unless you are 26 Millisecond into the 65 millisecond dead zone till the next test for step up, the code will be finished. And you just saved 15% on your power usage. And if you are 26 milliseconds in, you will cross the next check cycle, the OS will see your are in this very fast loop that is eating all of the CPU and the OS will then raise the speed to 1000Mhz for the next 65 milliseconds. And then you are stuck there till it can check the up threshold again and decide to clock back down. Now you just used 15% extra voltage for 65 millisecond even the code finished 1 millisecond into this time period.

    And this is why the Droid, based on Motorola own fact sheet, has such a long "In Standby" duration with their default 125/550Mhz kernel. Because the OS is executing code that takes very little time, 99% of it under the Sampling Rate, and never leaves the 125Mhz underclock situation.

    If you need for me to explain anything in more detail, please feel free to ask.



    I just chatted with cvpcs about kernel voltages. And he was kind enough to review both my write up here and show me his source code for voltage selection for each slot of his kernels. I was beyond floored when he showed me that from 125Mhz to 1000Mhz the difference in voltage multiplier is 1.93 times HIGHER. My example did not come even close to showing the true power savings of a properly setup kernel for the Droid. My example as originally written is way off.

    Even I just learned how much power is truly saved by Underclocking.

    I just spent a few more minutes looking up a formula for calculating voltage based on the multiplier setup in the kernel slots.

    voltage = multiplier * 12.5 + 600 mV.

    That means on cvpcs' low voltage 125Mhz / 1000Mhz kernel, 125Mhz (32 multiplier) uses only 1000 mV (1 Volt) and 1000Mhz (62 multiplier) uses 1375mv (1.375V). That difference of 375 mV, is huge in terms of CPUs and trying to save every bit of battery we can.
     
    #6 Skull One, Aug 9, 2010
    Last edited: Aug 9, 2010
  7. gavron

    gavron Guest

    Ratings:
    +0
    It will take me some time to read... but I am open minded and prepared to be educated :) You have spent some time writing this...

    Edit: i have read your post. I also went to your thread on overclocking (which I've previously read :) I stand corrected. Original post and this one edited to reflect that fact.

    Thank you for enhancing the knowledge of others and myself :)

    E
     
    #7 gavron, Aug 9, 2010
    Last edited by a moderator: Aug 9, 2010
  8. Skull One

    Skull One Member

    Joined:
    Mar 11, 2010
    Messages:
    759
    Likes Received:
    6
    Trophy Points:
    18
    Ratings:
    +6
    You may find this hard to believe, but I am very grateful to you. You took me from the theoretical to the practical application. It never occurred to me that I should concentrate on underclocking just as much as I have on overclocking. And in my research this afternoon, I may have possibly found a way to predict battery life if I know how the kernel is setup. It never occurred to me to approach part of the "Battery Drain Game" using the raw numbers built into the kernel. If I can develop some key tests with known voltage data, I might be able to extrapolate battery usage under all frequencies and voltage multipliers.

    And that is why we are all here. To learn. So you have taught me just as much as I have taught you. I consider that a big win for today :)