[UPDATED 05/08/17] Advanced Interactive Governor Tweaks by SoniCron - Angler thread - Nexus 6P General

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Revamped Advanced Interactive Governor Tweaks​
This thread was originally made by Corndude which for some apparent reason, decided to delete his account. The task to update this thread is then passed on to @The Flash but unfortunately because the purple person is busy atm, I stole it from him. So I will try to keep this up to date with informations and everything about the interactive governor. I will also add helpful descriptions on each parameters just to help people who are into tweaking and give them a little push to start tinkering.​
The original thread made by SoniCron can be found here: Advanced Interactive Governor Tweaks for the 5X​
Helpful Links
Linux Documentation - CpuFreq
Most Up-to-date guide on CPU Governors by @Saber
Table of Contents
Download Section
Applications that Allow Kernel Profiles Setup
Diving Deep into Interactive Governor
Interactive Tweaks Explained
timer_slack: The amount of time in miliseconds; that the cpu will stay in the highest frequency before it applies "interactive" tunings again. Basically, if there is a cpu intensive application and you have a high cpu load; timer_slack delays ramping down to lower frequencies in a given "X" time. Also, since timer_rate will be erratic, this should help to decrease stutters.
(higher value: higher battery drain, better performance)​
timer_rate: The amount of time in miliseconds; that the cpu will check how heavy the cpu load is. E.g. if you have set this to 20000, it'll compute every 20ms to see if any changes on the cpu load is making and will therefore adjust the frequency based on target_loads.
(higher value: less battery drain, performance impact subjective)​
target_loads: The amount of load, in theory on percentage; where the actual frequency should be used. Target_loads can be setup per frequency to provide certain "bias" on cpu clocks. An example "35 475600:88 600000:21 960000:98" means that anything before 475Mhz would have a target load of 35%. At 475Mhz before ramping up there should be at least 88% of cpu load, once this threshold is broken it'll ramp up to 960Mhz immediately since 600Mhz is set less than 475Mhz. Therefore the two "bias" created on the sample above is 475Mhz and 960Mhz. It is not recommended to provide any values higher than 98 as this will reduce performance on your cat greatly.
(higher value: less battery drain, worse performance)​
min_sample_time: The minimum amount of time the governor must wait at a given frequency until it can decide to reduce the frequency.
(higher value: better performance, battery impact HIGHLY subjective)​
hispeed_freq: This would be the frequency that the user "assumes" would be enough to handle a boost in cpu load. Too high value would greatly impact the user's UI performance but would definitely worsen the battery life.
(higher value: higher battery drain, better performance)​
go_hispeed_load: The load assigned to the cpu where it is recommended to go to the hispeed_freq. Set this quite high as this bypass almost everything in the interactive tunables.
(higher value: less battery drain, performance impact subjective)​
above_hispeed_delay: A delay setup in frequency:miliseconds to slow down and "delay" aggressive ramp ups. E.g. 19000 600000:24000; provides 19ms delay to cpu frequencies not specified after reaching hispeed_frequency, before ramping up to a higher frequency. If, for example you have your hispeed_frequency set up to 960Mhz, and your above hispeed_delay to 30000 1248000:22000 1354000:40000; the 30ms will only be used at 960Mhz up until 1248Mhz where the delay is 22000. Please note that 30000(30ms) from the example above will NOT BE APPLIED to all frequencies BELOW the set hispeed_frequency (anything below 960Mhz). Also, specified "frequency:delay" ratios should be written in ascending order according to cpufreq linux documentations.
(higher value: less battery drain, worse performance)​
align_windows: With the value of "1" for On and "0" for Off. If "1" is designated, the cluster for cpu clocks (divided into big and little) will fire at short quick intervals, usually by 1ms to provide a reliable boost to what timer_rate has converted cpu loads/clocks into.
(If ON: better performance)​
max_freq_hysteresis: Checks the cpu for "hysteresis" or previous cpu clock records and base the next ramp up on frequencies previously used. If your cpu tends to have a bias towards lower cpu clocks, with this on a high value; it should frequently stick to lower cpu frequencies.
(higher value: less battery drain, performance impact subjective)​
powersave_bias: Value of "1" to turn ON and "0" for OFF. If your cpu decides to go for 960mhz, with powersave_bias ON it'll go to a frequency one step below 960mhz.
(turn ON: less battery drain, worse performance)​
use_migration_notif: Value of "1" for ON and "0" for OFF. Reevaluate the cpu frequency if "notified" (unclear, we can assume this as either an unschedule app notification or a "timed" boost) to fire in 1ms. This aids timer_rate in quick changes with system loads.
(turn ON: better performance, battery impact subjective)​
ignore_hispeed_on_notif: Value of "1" for ON and "0" for OFF. Ignores the hispeed_load, hispeed_frequency and above_hispeed_delay once a cpu is "notified". Therefore, if a cpu is "notified" if this is set to "1" the cpu can ramp up to frequencies computed by timer_rate without any delays coming from hispeed frequency logic.
(turn ON: heavy battery drain)​
fast_ramp_down: Value of "1" for ON and "0" for OFF. Ignores min_sample_time which provides delay on cpu frequencies in miliseconds. This holds true ONLY if a cpu is "notified" and therefore avoids unreliable "bias" on certain clocks due to quick shift of cpu loads.
(turn ON: less battery drain, performance impact HIGHLY subjective)​
I highly encourage people to tweak their interactive governors on their respective kernels as this highly amounts to bettery performance and battery life. With that said, this concludes a simple revamp of this thread and I hope more and more people within the angler community would be interested to tinker. Imagine the possibilities!
CREDITS TO:
@The Flash - for letting me steal his thread because he slow af.
@soniCron - the main contributor for all of this, I don't know if he still exists.
Corndude - dude
@shadowstep - for being a good friend though he "mistakenly" killed his angler *retarded screeching*
@Saber - for providing the Most-up-to-date CPU frequency guide
@frap129 - for being really awesome and providing the community fraps.
And to EVERYONE that has made all this possible, I give the sun to you!

Download Links
Profile Download Links​
Profiles by Alcolawl from @Alcolawl[/b]
[*]Profiles by Xsilas43 from @Xsilas43[/b]
[*]Profiles by .hEimDaLL from @.hEimDaLL
[*]Wingoku Profile from @fapste
[*]GlassCannon from @phantom146
[*]EXkm Profiles from @xperator
[*]Project Zhana OP3 Port from @deani77

Apps that Allows Kernel Profile Setups
Apps that Allows Profile Setups​
Exkernel Manager App by @flar2
Spectrum Kernel Manager by @frap129
Kernel Profiler by @frap129

Diving Deep into Interactive Governor
Diving Deep into the Interactive World​Understanding how parameters co-exist and the OP's viewpoint regarding cpufreq.​
The interactive governor has been around for years and is without a doubt the most popular cpugov present in the linux archives. The development of this linux-based core has been ongoing, patches and evolutions to interactivex has been widely appreciated by android enthusiasts and non-enthusiasts alike. Interactive governor is also without a doubt, the majority baseline for new governors being developed which goes to prove that it is one of the most efficient and optimal cpugov within the world of android fanboys.
Before we start, take a look at this graphic thingy:​
There is no such thing as a "perfect" balance. I myself, live by a code to never ever let my phone slow down just for the sake of bragging that I got this SoT *autistic screeching*. If you have to choose between the two of those, I would wholeheartedly suggest to finish tasks first (yielding better performance) than just idle in despair looking at your battery percentage the whole day. Lastly, please do bring a powerbank with you.​
Enough with this, let's talk facts:​
I will be breaking down the parameters here, how they should co-exist with other parameters and what you should change in order to provide a smoother experience. We will also be digging deeper as to how each parameters should help you with your daily usage. Let's begin.
Hispeed_Frequency Logic:
The hispeed logic is what makes your angler boost, not gradually; but burst through the set optimal load you deemed necessary for task completion. We consider this very important as this provide the overall smoothness, task completion time and if used properly along with other parameters; may yield to better battery.
hispeed_frequency: This is the bread and butter of the interactive governor. What makes interactive unique to others is the user can set a specific frequency "bias", where he/she finds it optimal(according to usage). When paired with input_boost, this significantly increases responsiveness and smoothness to overall android feel. Personally, I would never recommend to set hispeed_frequency to the lowest cpu clock e.g. 384mhz because it will defeat its purpose of "burst" boosts. In the past, many users attempted to set hispeed_frequency to the lowest clock to prevent sudden scaling from cpu frequencies however, in turn, they have to sacrifice the responsiveness of the device A LOT. If you want to still try it, I'll bet my scrotums again that switching between apps and opening your angler coming from deep sleep/doze without a fingerprint_boost (featured in Flash kernel and Electron) would stutter and cause you to at least lag for a second.
From tests, my best recommendations for a hispeed_frequency are:
600/634mhz - If you are a typical light user, opens your device to read a lot of stuffs about growing back your pubes and ruining the timeline, like barry. Whenever you are switching from a light app (reddit, 9gag, fb) to a heavy app such as Youtube, you should experience a slight stutter but you could still live.
960mhz - Good enough to balance almost everything. From light users to heavy users, this should be optimal. Personally never experienced jitters coming from hispeed_frequenciy set to this (except with really low timer_rate).
1248mhz - Fast and extremely reliable but unfortunately should give you a little more drain. On the flipside tho, it is the default input_boost/hispeed_freq from interactive itself as well as other variations of the governor. If you use heavy apps a lot such as games and likes switching stuffs a lot, stick to this.
Anything above 1248mhz I would really not recommend. Coming from personal tests, It does run phenomenal but it is too much of a waste. That performance isn't worth the battery expended so with all due respect just stick to a lower frequency.
go_hispeed_load: Provides the desired load from 0-X depending on the user's preference. This bypasses your set target loads from below your hispeed frequency e.g. if your hispeed_freq is set to 960 mhz, anything under 960 mhz is bypassed whenever the "assigned" load threshold you input in this parameter is reached. Meaning, even if you set 302mhz as 999 on your target loads, whenever your timer_rate computes a load that has at least reached to your assigned go_hispeed_load it should automatically ramp up to your hispeed_frequency. However, this does not mean you can abuse the power of your target_load. Setting your target_load too high below your hispeed_freq would still give you lags especially if your timer_rate is above 50000. Just a tip: you can make this to 0 if your input_boost is set to your hispeed_freq.
input_boost: Technically not part of the interactive parameters but still worth the mention as this copies the hispeed_frequency logic and helps maintaining boosts. The input_boosts increases your frequency to the assigned value whenever a task is loaded in your device. This does not work like touchboost as touchboost is a nuclear waiting to explode. Input_boosts scales even if your screen is off (but rarely) and wouldn't increase your phone's clocks whenever you touch it (boop boop). Rather, it only boosts your device whenever necessary (e.g. IO overheads, task completion, downloads, alarms syncing).
If you really like the most optimal performance your cat can achieve, aim to put input_boost the same as your hispeed_frequency values'. It should not waste too much battery and should still be controlled by above_hispeed_delay.
Controlling your Hispeed_Frequency:
There are only two parameters that can actually control your hispeed_frequency scaling namely go_hispeed_load (mentioned above) and above_hispeed_delay. However, a third one which is quite special; ignore_hispeed_on_notif can also impact at how the governor performs, let's dig in to it:
above_hispeed_delay: Is a "delay" timer in miliseconds set by the user with the format "Initial delay, frequency:delay miliseconds". The intiial delay is applied to all frequencies EQUAL TO OR ABOVE the hispeed_frequency, whilst the frequency:delay ratio is applied per specific frequencies again EQUAL TO OR ABOVE the set hispeed_freq. E.g. if you set your hispeed_frequency to 960mhz, and you have set your above_hispeed_delay to (X 384000:Y 600000:Z 960000:M), Your X value would be aligned to all frequencies above 960mhz (since you specified a delay in 960mhz) whilst your Y and Z is IGNORED, because you're retarded short-sighted enough to not read what I and the linux archives just said.
I personally, do not recommend hispeed_delay to be above 35000 unless you're eager to "suspend" or provide "bias" on a specific frequency. This is because I find 35000 and anything above that to be too long for a delay and should provide you nothing but lags and would just piss you off instead of providing a better battery. If you do want to suspend a cpu clock make sure that it is efficient enough (e.g. 1248mhz or above) to handle heavy loads.
ignore_hispeed_on_notif: Turn on by input of "1" and must have use_migration_notif to "1" also otherwise it won't work. The ignore_hispeed_on_notif (damn that's long) as the name puts it; ignores the hispeed logic, meaning your above_hispeed_delay and go_hispeed_load is ignored whenever the hrtimer (a special timer) coming from use_migration_notif triggers. This usually yields better performance but at the cost of a huge battery drain, since hrtimers also trigger on deep sleep, therefore; most likely, your cpu would scale up even though you think there's no task happening in the background. I do not recommend turning this on, please do not, you kennot.
The Caviar of Target Loads:
The most sought to parameter in the interactive kernel is the target_loads. Along with hispeed_frequency, target_loads is another parameter that makes the interactive governor the most flexible, controllable and probably battery-friendly cpugov. You can adjust this to function as a performance-like governor, a powersave or even imitate how conservative governor gradualy boosts. Below, you will see tons of explanations and what criticisms I personally got about target_loads:
target_loads: Computes the load per frequency ratio, in the format of "X 600000:Y 960000:Z" and so on, depending on the users' perceptive usage. Where X, is the initial load given to all frequencies below the first specified frequency:ratio stated (therefore in the example, anything below 600mhz), and Y/Z are loads given to specific cpu clocks. The target_loads unlike above_hispeed_delay, isn't linear. You can start off with a high frequency ratio of 384000:88 then go down to 487600:22 and get back up to 90 at 600mhz. Because of the latter, you can provide "bias" on certain frequencies you deem to be fast enough to handle specific loads.
Just a heads-up. I do not believe in optimal and nominal frequencies. I think those were just bullshified terms that was made so people would have something to bias the loads to. The optimal frequency should be your "preferred" frequency. There is no 960mhz when watching youtube nor the specific frequency for just reading webpages at 600mhz. There are certain apps that are relies on heavy foreground (e.g. whatsapp and snapchat) or sometimes even fb, and if you're gonna stick to 600mhz because somebody told you its the optimal frequency for users that just reads, you can kiss my grandma. Everything differs, a good android enthusiast should and will explore what frequency they think their usage fits. It's just that simple.
Before trying to input random numbers on your target load, try to see what your perceptive usage is. If you would like your device to stay on lower frequencies as much as possible, put a value between 75-92 on clocks below your hispeed_frequency. Anything above that might lead to stutters depending on your min_sample_time and timer_rate.
Provide higher load thresholds on your hispeed_frequency and above. Since you have set your hispeed_freq to be the most optimal cpu clock all-around your dynamic loads, provide a higher threshold to it (e.g. 90 and above) so your kernel will bias to it more unless heavy loads are on play.
Put a value of 98-99 to frequencies you deem to be the most efficient on heavy loads. I personally like 1248mhz a lot and therefore use it as my cpufreq for heavy loads. Setting your load to 99, rarely makes your frequency go higher than the specified cpu clock, whilst setting it to 98 is decent enough to gradually let frequencies ramp up from it.
An important note. You can create certain "bias" towards cpu clocks as I have stated above, target_loads aren't linear and therefore, frequencies you deemed to be slow enough to handle cpu stressmay be given less priority. This is done by providing any loads below 50. E.g. 384000:75 487600:22 600000:88 672000:35 960000:95 by using the example given, your cpu clocks should bias towards 384mhz, 600mhz and 960mhz respectedly, eliminating the need for 487mhz and 672mhz. We do this to provide better responsiveness for our cats and I personally recommend trying this until you find your sweet spot.
Providing the Delays of Responsiveness:
Delays aren't only used to slow down the ramp up of your cpu clocks. They are also used to delay things such as the given time of each cpu frequencies before ramping down. Because of this control, the interactive governor provides a better all-around smoothness than any other governors out there, combined with your target_loads and hispeed_frequency; fluidity should never be an issue!
min_sample_time: If above_hispeed_delay provides a delay before the cpu scales up, min_sample_time is the other way around. Min_sample_time is a timer in miliseconds with X0000 format, used as a delay for all cpu clocks per cluster, before it ramps down, assisted by computations coming from timer_rate. As one of the core parameters in android to provide fluidity universally, this parameter could be swapped for input_boost delay and providing a higher timer for this with lower timer_rate, in my own experience; provides you the capability to totally negate input_boost.
Experiment on this one as this is very subjective. I do suggest that if you have a high timer_rate , provide a higher min_sample_time value or else your kernel won't be as responsive as you would like it to be.
timer_slack: to assist timer_rate to provide a stable and constant performance track, timer_slack in miliseconds, provides a delay on the highest frequency of the governor. Because timer_rate especially if below 40000, computes the frequency of the current load given to the cores, min_sample_time aids to slow down timer_rate's aggressive approach to either ramp up/ramp down the frequency. An example of this is moving to another app from one foreground to another, if timer_rate has been set low enough that it computes the switching to provide a higher frequency then within 20ms to ramp down because the load has settled down, timer_slack prevents this from happening, and thus should create responsiveness to our devices. This again is highly subjective. Play on its values depending on your needs, most developers or interactive enthusiasts use -1 to prevent timer_slack from delaying the high frequency which provides a better battery life.
Underrated Parameter; the Timer Rate:
timer_rate: is probably the most undervalued and underrated parameter there is in the interactive governor. Most governors have this parameter and is rarely, I mean rarely! appreciated. You have to change that notion starting now. Timer_rate provides things two ways. Lower value equates to faster response and performance while higher value provides longer battery life. Of course the latter means you'll be sacrificing your device's fluidity.
The default timer_rate is 20000. This means that every 20ms, your governor will compute the loads burdened to your kernel and timer_rate will provide the signals to target_loads to adjust depending on the values given.
An "efficient" timer_rate clocks in between 20000 and 40000. By my own tests, anything above 40000 slows down the "frequent" change of cpu clocks. As a proof, you can check your kernel manager's dashboard and set your timer_rate higher than 40000; you will notice that it won't be jumping from one frequency to another too much.
A high timer_rate could still be efficient given that you have a high min_sample_time and a reasonable timer_slack. This three holy trinity, when tweaked properly, should give you better performance without the significant drop of battery life for our angler.
The Special Parameters:
There's a (3)three parameters that I would like to call special. This is because they can be turned off and wouldn't cause any significant changes to the interactive governor and from the fact that they need use_migration_notif turned ON to function. Also, just a quick mention, during my long tests; I find some of these parameters intrusive so I wouldn't really recommend them turned ON unless you are willing to experiment on things.
use_migration_notif: can be turned on with the value of "1". This is the core switch for fast_ramp_down and ignore_hispeed_on_notif (please see hispeed logic for description) to work. With this on, migration timers also known as hrtimers (see Hrtimers - Linux Archive for spot-on description) are allowed to be computed as a "load". This can be comparable to ignore_nice_load from other governors however, unlike the latter, use_migration_notif needs to be turned on to work. To summarize, with hrtimers computed as loads, this should provide more gradual boosting than before, especially that hrtimers for linux kernels are made to "optimize timer-wheel" but the battery impact is highly subjective. Also, hrtimers may fire while on deepsleep, though it won't break doze, this would increase your cpu frequency as it is computed as a positive load from your kernel and should therefore drain a little more battery, especially when you have ignore_hispeed_on_notif set to 1.
fast_ramp_down: can be turned on by setting value to "1". This simply ignores min_sample_time for hrtimers and therefore should provide you better battery life. Whenever your cpu clocks ramps up due to hrtimer, min_sample_time would delay the cpu frequency before going down but with fast_ramp_down if the load computed by your kernel is indeed an hrtimer, it'll ignore min_sample_time value and proceed to ramp down the frequency in 1ms.
Turning the three: use_migration_notif, ignore_hispeed_on_notif and fast_ramp_down ON is something that I would never recommend, unless you're experimenting, doing your own tweaks or holding on to your dear life. There is no way we can accurately measure this three unlike the other parameters provided, also; hrtimers are being patched from one kernel to another and is being updated constantly, I am pretty sure in the future we would be taking advantage on that parameter soon.

This is great, I've been following this work in the Nexus 5X forum and I've got to say this is a great way to fine tune and optimize our 6P.
Edit. I'm currently on the maddog profile and experiencing excellent performance and superb batter life, 630 sot avr.

Second this. Been following on the 5x page as well and was using Ghostpepper until earlier today. For me ghostpepper got me the best SoT(5hrs)with average usage (mainly whatsapp, Facebook mobile site, instagram, Spotify and some GPS usage with it on high accuracy). Now using Butterfly and so far performance is outstanding, excited to see what the battery life will be. Huge thanks to @soniCron for the work!
moraytadroidz said:
This is great, I've been following this work in the Nexus 5X forum and I've got to say this is a great way to fine tune and optimize our 6P.
Edit. I'm currently on the maddog profile and experiencing excellent performance and superb batter life, 630 sot avr.
Click to expand...
Click to collapse

Any info on what is the best for battery life? Don't really care about performance, it's fine on stock imo. So far I have not noticed any difference in battery life between this and stock.

Glad there is a separate thread for these tweaks on the Nexus 6P. I'll continue to update that post with the newest scripts for this device, but always remember that I CANNOT test the scripts for the Nexus 6P because ai simply don't own the phone. Progress and updating scripts will heavily rely on testing and feedback from participants in this thread. This is paramount, as its difficult to maintain scripts for a device I don'tactually have access to. Please make sure to either mention me or PM me when giving feedback on the scripts I've uploaded.
Thanks again, @Corndude!

Alcolawl said:
Glad there is a separate thread for these tweaks on the Nexus 6P. I'll continue to update that post with the newest scripts for this device, but always remember that I CANNOT test the scripts for the Nexus 6P because ai simply don't own the phone. Progress and updating scripts will heavily rely on testing and feedback from participants in this thread. This is paramount, as its difficult to maintain scripts for a device I don'tactually have access to. Please make sure to either mention me or PM me when giving feedback on the scripts I've uploaded.
Thanks again, @Corndude!
Click to expand...
Click to collapse
Thank you. Glad to have you checking on this thread as well!

I'm not sure it's necessary to copy the text to each of the posts verbatim... I'd suggest linking to the original posts and then add on 6P-specific info (such as frequency ranges, voltage levels, etc) so as to not overwhelm your users. (I also recommend this because the OP guide on the 5X forum is going to get a full rewrite incorporating everything we've learned thus far, sooner than later.)
I have no problem with you duplicating the text, mind you. I just think it might be better for your users if you linked rather than duplicated. (Especially if it's not updated with the 6P in mind.)
I'll try to keep track of this thread for a while, but if anyone urgently wants my attention, PM me.
Great work, guys!

For Butterfly and Ghostpepper, is there settings for franco kernel? Or must I use the respective kernels necessary.
Sent from my Nexus 6P using Tapatalk

shawnaye said:
For Butterfly and Ghostpepper, is there settings for franco kernel? Or must I use the respective kernels necessary.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
So far people are mainly using it on Elemental X and Kylo. Butterfly has been working great for me on Elemental

Franco works just as well. It's only important that you can disable touchboost.

shawnaye said:
For Butterfly and Ghostpepper, is there settings for franco kernel? Or must I use the respective kernels necessary.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
I use franco on Pure Nexus, and under the franco app I turn the performance to power saving. No hiccups or lag on anytjing I do and I score 7+ hours SOT every charge

+1 on thread! Test it yourself.. I've had great success on GhostPepper.

Evolution101 said:
So far people are mainly using it on Elemental X and Kylo. Butterfly has been working great for me on Elemental
Click to expand...
Click to collapse
I must have my wires crossed. Thought I read that Butterfly required Kylo kernel as ElementalX has no Intellactive governor?

nadiros said:
I must have my wires crossed. Thought I read that Butterfly required Kylo kernel as ElementalX has no Intellactive governor?
Click to expand...
Click to collapse
I think you might be thinking of the Redhawk alpha. Butterfly is for the interactive governor

Gytole said:
I use franco on Pure Nexus, and under the franco app I turn the performance to power saving. No hiccups or lag on anytjing I do and I score 7+ hours SOT every charge
Click to expand...
Click to collapse
Really ? Gonna give that a go!

Thanks for starting this thread
I'm finding ghoststepper to be very smooth - butterfly was certainly a sipper but slightly less smooth for me I think.

@Corndude Glad to see this here, too - I've been following the OP on the N5X forum since soniCron posted it.
One suggestion: maybe put "[WIP]" or "Work In Progress" at the start of the thread title as I know the 6P is having less than desirable results in comparison to the huge benefits they're seeing on the 5X & it would be a shame if people were put off by bad reviews/comments of the tweaks before we (as a community) can stabilise the settings to give great battery life without affecting the performance at all.
I know GhostPepper is very close to getting there (6.5-7.25 hrs SOT for me), but I still think we can squeeze much more out of this theory - I mean, we have a much larger battery with the same software specs, so we should technically be able so squeeze at least another 1/2 hours SOT out of the 6P if 5X users can get 8/9hrs SOT.
ps. just a heads up - your "head on down to the 2nd post" in the OP links to the 5X OP & the OP also includes 5X frequencies - these should probably be swapped out of the 6P frequencies, otherwise people might try inputting them to their 6P's (which will result in target_loads not saving)
edit: 6P Maximal/Minimal loads for OP.
CPU #1 Maximal Efficient Loads
384000:75
460000:69
600000:80
672000:79
768000:80
864000:81
960000:69
1248000:84
1344000:82
1478000:86
1555000:0
CPU #1 Minimal Efficient Loads
460000:20
600000:30
672000:12
768000:14
864000:13
960000:11
1248000:30
1344000:8
1478000:10
1555000:5
CPU #2 Maximal Efficient Loads
384000:72
480000:68
633000:74
768000:80
864000:81
960000:69
1248000:84
1344000:84
1440000:84
1536000:85
1632000:85
1728000:85
1824000:84
CPU #2 Minimal Efficient Loads
480000:25
633000:32
768000:21
864000:13
960000:11
1248000:30
1344000:8
1440000:7
1536000:7
1632000:6
1728000:6
1824000:6
1958000:7

Related

CPU Overclocking while screen off

Is there a negative effect of setting the clock speed lower while screen off? Aside from running really labor intensive tasks?
It just seems like a great way to save battery to me. Right?
The only negative is getting the phone to wake up fast enough when you get an inbound call.
The CFS kernel (which is widely used now) seems to be less able to come out of a deep sleep rapidly than the older "zanfur" OC kernel did.
IIRC, on the older "zanfur" OC kernel, you could set the minimum scaling frequency to 19 Mhz - but with with the CFS kernel, you may need to use a minimum value of 122 Mhz or 245 Mhz.
Set the max scaling speed to 480 or 528 when sleeping. (The max frequency is only rarely used when the phone is sleeping - but you want the phone to pop out of it's low speed state quickly when you power up the screen, or experience an inbound call).
Thanks, Yeah I usually set the max to 480 while sleeping and 480 as min while awake. Battery seems good there.
Originally I was using SetCPU but I have switched to CPUBoost. Most all the kernels in the past few roms I have used are made by conap and he is also the creator of CPUBoost, so I figured they would integrate really well.
Also if I enter anything above the 800 range the phone will have random reboots throughout a few different roms I've tried.
As a note, if I remember correctly, if you have a kernel/ROM that supports the smartass governor, you should be able to use it and not need to have a profile set to underclock while the screen is off, or really need to underclock at all, as I believe it determines for you how much CPU is needed and sets the clock speed accordingly, simply abiding by your max and min speeds you set. Since less CPU is needed when the screen is off, it will automatically adjust accordingly. However, this is just something I've read around the forums, so don't take my word for it
Pokelover980 said:
As a note, if I remember correctly, if you have a kernel/ROM that supports the smartass governor, you should be able to use it and not need to have a profile set to underclock while the screen is off, or really need to underclock at all, as I believe it determines for you how much CPU is needed and sets the clock speed accordingly, simply abiding by your max and min speeds you set. Since less CPU is needed when the screen is off, it will automatically adjust accordingly. However, this is just something I've read around the forums, so don't take my word for it
Click to expand...
Click to collapse
Thanks for the info, I didn't know that. I will assume that's more or less accurate unless Conap or bftb0 chime in.
Pokelover980 said:
As a note, if I remember correctly, if you have a kernel/ROM that supports the smartass governor, you should be able to use it and not need to have a profile set to underclock while the screen is off, or really need to underclock at all, as I believe it determines for you how much CPU is needed and sets the clock speed accordingly, simply abiding by your max and min speeds you set. Since less CPU is needed when the screen is off, it will automatically adjust accordingly. However, this is just something I've read around the forums, so don't take my word for it
Click to expand...
Click to collapse
roirraW "edor" ehT said:
Thanks for the info, I didn't know that. I will assume that's more or less accurate unless Conap or bftb0 chime in.
Click to expand...
Click to collapse
Well, I suppose it could be said that the whole point of any rate governor is to reduce overall power consumption without markedly affecting the user's perception of "responsiveness" or "speed" - however they go about defining those metrics.
OTOH, because there are - what - five different scaling governors available, it is apparent that people have found their own reasons to create new scaling governors; presumably that arose from a dissatisfaction with the behavior of the available scaling governor - or, that different users have differing application workloads, and so they prefer one governor over another.
As Pokelover980 suggests, you could just hand a given rate governor a fixed set of limits (min/max), and be done with it.** For folks that have the time and desire to experiment, I would suggest that: pick a governor and a min/max clock rate and run that way for 2-3 days - no profiles at all. Then pick a different governor with the same min/max clock rate and run that way for another 2-3 days, and see how it goes - maybe not in battery life, because that's hard to measure in a repeatable way, but at least to see if any problems occur coming out of sleep.
Is the "smartass" governor better than all the rest of them? I don't really know. I used it for a little while, but found something I didn't like about it. (But don't take that as conclusive about anything; I doubt that I was doing disciplined testing when that happened). I tend to use either "interactive" or "ondemand", and don't have a strong preference for one over the other.
There probably is some value in keeping things simple. I think that I mentioned before that at one point (back when the CFS kernels were still in a state of flux) I was convinced that using setCPU was exacerbating problems with lock-ups I observed (once every couple of days). Again, though - that was really only my suspicion; I can't really prove it.
bftb0
** I suppose that folks that insist on extreme levels of overclocking ought to use either an overtemp profile or some other means to monitor temperature so that they don't cook their phone.
I Installed SetCPU on the wifes Eris. The smartass governor on CM7 will max out the cpu (to your preset max) if needed. I dont think the smartest thing to do is max out the cpu at 15% batt life. I have 5 different profiles set. One for screen off, charging, < 50%, < 30%, <10%. I use interactive governor vs smartass. Her phone is pretty responsive and I dont hear about issues with it not waking up. Battery life has also increased quite a bit.

[Q] Optimal OC values

Hi guys,
Please clarify on the following points:
1. Are there any major differences among the CPU governers??? I use Smartass because I see a major group of people using it.
2. What are the optimal values for Min and Max CPU speed? And are there any factors based on which we have to decide the values or we can keep anything we wish?
Thanks in advance
Frequencies and their effect on battery here
^Pretty much what you're looking for. Just analyze the chart and test it for yourself too. Also read, read
For governors:
smartass governor - is based on the concept of the interactive governor.
I have always agreed that in theory the way interactive works - by taking over the idle loop - is very attractive. I have never managed to tweak it so it would behave decently in real life. Smartass is a complete rewrite of the code plus more. I think its a success. Performance is on par with the "old" minmax and I think smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies.
Smartass will also cap the max frequency when sleeping to 352Mhz (or if your min frequency is higher than 352 - why?! - it will cap it to your min frequency). Lets take for example the 528/176 kernel, it will sleep at 352/176. No need for sleep profiles any more.
ondemand
Available in most kernels, and the default governor in most kernels. When the CPU load reaches a certain point (see "up threshold" in Advanced Settings), ondemand will rapidly scale the CPU up to meet demand, then gradually scale the CPU down when it isn't needed. - SetCPU website
conservative
Available in some kernels. It is similar to the ondemand governor, but will scale the CPU up more gradually to better fit demand. Conservative provides a less responsive experience than ondemand, but can save battery. - SetCPU website
performance
Available in most kernels. It will keep the CPU running at the "max" set value at all times. This is a bit more efficient than simply setting "max" and "min" to the same value and using ondemand because the system will not waste resources scanning for the CPU load. This governor is recommended for stable benchmarking. - SetCPU website
powersave
Available in some kernels. It will keep the CPU running at the "min" set value at all times. - SetCPU website
userspace
A method for controlling the CPU speed that isn't currently used by SetCPU. For best results, do not use the userspace governor. - SetCPU website
interactive
Advantages:
+ significantly more responsive to ramp cpu up when required (UI interaction)
+ more consistent ramping, existing governors do their cpu load sampling in a workqueue context, the 'interactive' governor does this in a timer context, which gives more consistent cpu load sampling.
+ higher priority for cpu frequency increase, rt_workqueue is used for scaling up, giving the remaining tasks the cpu performance benefit, unlike existing governors which schedule rampup work to occur after your performance starved tasks have completed.
Click to expand...
Click to collapse
I hope that makes it clearer
Kira.Lawliet said:
Frequencies and their effect on battery here
^Pretty much what you're looking for. Just analyze the chart and test it for yourself too. Also read, read
I hope that makes it clearer
Click to expand...
Click to collapse
Wonderful post! Thank you.. even though the post was too technical for a n00b like me, I could grasp info out of it. Sure it helped me.

[GUIDE] Advanced Interactive Governor Tweaks; Buttery smooth and insane battery life!

(Scroll down to The Money Shot if you just wanna know the settings to use and skip all my preamble, but be aware that you may sacrifice results if you don't understand everything fully! You've been warned!!)
The Introduction
I'm about to tell you how to get buttery smooth, lag free performance with insanely good battery life, using an old school governor featured in practically every kernel... This tweak is applicable to every phone with any ROM or kernel--stock or custom--that provides the Interactive Governor. :good:
Yeah, yeah... everyone promises good battery with great performance, but who actually delivers? Maybe it isn't as smooth as you want, or maybe it requires something your kernel or ROM don't support. Or maybe the battery life promises just aren't what you expected. There's always some awful compromise. Not here!
This isn't a guide to get 36 hour battery life... provided you never use your phone. That's deep sleep optimization, which is lovely and all, but what good is the phone if you can never use it?! I'm talking about 7-14 hour screen on, actual hands-on usage times! Without compromising anything, you can get 7-8 hour screen on usage with regular, no-compromise usage habits: daytime visible screen brightness, both radios on, sync on, network location on, all the regular usage features, the whole kit and kaboodle... all smooth as a baby's butt and snappy as a Slim Jim! (Up to 14+ hours if you can stand minimum brightness and WiFi-only! And this is with stock voltages and full frequency range--you'll likely get even more if you choose to optimize those as well!)
However, it should be noted that this does not apply to gaming, heavy camera use, etc. Anything that is an automatic battery killer in and of itself. There's nothing that can be done about anything that forces the phone to utilize its maximum resources all the time. But you should know that by now. Further, this guide is about optimizing the CPU as much as possible. It does not cover things like eliminating wakelocks so your phone sleeps well, removing unnecessary and battery draining stock apps, keeping your screen brightness down*, and all that stuff that's been covered in other posts ad infinitum. Those optimizations are up to you.
*At least on the EvoLTE, you shouldn't be turning your screen brightness above about 60%. It should be more than viewable in sunlight at that brightness, and keep in mind that the brightness power requirements increase exponentially, so a 100% bright LCD screen will use about 3.5-4.5x more power than a 60% bright screen. I don't see that fact brought up often, so I thought I'd mention it here.
The Background
I got my first Android phone (Galaxy S4) about 8 months ago, and after dropping it in the toilet a couple months ago, I had to get something cheap. Enter the EvoLTE.
Performance on the EvoLTE was not what I was used to, and that disappointed me. (I should rephrase. Performance while getting similar battery life was disappointing. What good is a fast phone if you can't use it cuz it's dead?) While I had immediately caved and ROOTed and installed a new ROM (CM 10.2), I soon pined for a new kernel with promises of overclocking, under-volting, new fangled governors, etc.
So, I S-OFFed and installed Haunted Kernel. Played with overclocking, used the suggested governor (smartmax), under-volted, all that jazz. One problem: constant reboots. My focus shifted from performance and battery to just getting it to run reliably.
To my dismay, I learned that my phone has no tolerance for overclocking, so I lost that speed boost. Further, it has no tolerance for under-volting, so I lost that power savings. And then I discovered the recommended governor (which gave pretty good battery life and so-so performance) was too buggy to be reliable, so I lost that balance.
I was never fully satisfied with the performance of that governor. It promised a lot. People raved about it. It was certainly very power-friendly and lag free, but it stuttered. Notice how everyone promises lag free, but rarely do they talk about smoothness as things slow down. You know what I mean... quick scroll through a webpage or list, and as it slows down it hops and jerks. I hate, hate, HATE that! But hey, you can't have all three--smoothness, snappiness, and stutter-free... right?
Wrong! (But I'm getting to that!)
Shifting back to stock CPU settings (clock speed and voltages) I turned my focus to the governors. Surely, I thought, one of these other fancy governors will satisfy my needs. But after weeks of tweaking and testing, I had to make a compromise in one way or another. None of them delivered the results I wanted, no matter how I tweaked them. They were better than the standard governors in many ways, but still didn't meet my expectations. I sat there, so disappointed. All these cool features to boost performance, save battery, all that... out of my reach. I was back to square one. Stock speeds, stock voltages, basic governors...
Basic governors...
...basic governors...
...basic governors..?!
Well that's something I hadn't looked into much, I thought.
I mean, why bother? Either they keep your CPU at a low clock speed, or a high one, or slowly scale between the two, or jump quickly between the two. Pretty basic stuff. The new fangled governors were designed to more efficiently finesse these brute choices to improve performance and battery life, so what would basic governors have to offer?
Nothing, I thought. Until I looked at the kernel source and realized that the Interactive Governor had some advanced features I'd never seen anyone use in their recommended settings. On any forum. Ever.
That's not to say it's some well-kept secret or that I'm the first person in the world to post about such things. But it's certainly not widely known or promoted well. Most people just jump onto some new fangled governor with default settings to provide some features that, in all honesty, we can find in a governor featured in practically all kernels, and actually may out-perform the new fangled governor in both performance and battery life!
After a bit of tweaking and experimenting, I developed some settings that provide absolutely incredible battery life, buttery smooth performance, and a lag free experience. And you don't need a fancy governor, or a custom kernel, custom clock rates, or even an EvoLTE. This will work on any ROOTed phone with the Interactive governor!
Enough long winded preamble! Let's get down to...
The Nitty Gritty
Before I lay out all the settings so you can blindly enter them into your governor control, I should to explain some of the principals I employed to get the results I did. The primary thing to understand before I do is: little might you know, the settings in the Interactive governor can be tweaked on a clock range basis. That is to say, you can finely control how the governor responds at a variety of clock rates, thus better dictating how it should operate under various loads. This is integral to the configuration, because it means the difference between jumping from the slowest speed to the highest speed under load and sustaining lower clock speeds for tasks that don't really require higher clock speeds.
By default, the Interactive governor will jump from lowest speed to a "nominal" speed under load, and then scale up from that speed as load is sustained. That is lovely, but still too twitchy to provide serious efficiency and power savings. It spends most of its time at 2 or 3 clock speeds and barely hits other clock speeds that are ideal for other tasks or usage patterns.
Instead, what we want to do is configure it to handle different types of loads in different ways. A load suited for scrolling through a webpage is not the same as a load suited for decompressing streaming video is not the same as a load suited for snappy loading of an app is not the same as a load suited for high performance gaming. Every kind of load has different tolerances at which their minimal speed is indistinguishable from their maximal speed.
To understand what's best under a variety of tasks, we have to identify two types of load profiles: nominal clock rates and efficient clock rates.
Nominal Clock Rates
Nominal clock rates are the minimum CPU clock rates that perform a given task smoothly and without stuttering or lag. To find the nominal clock rate for a given task, turn on both cores using the Performance governor and turn them both down incrementally until you find the minimum clock rate that works best for what you're trying to do, without introducing hiccups, and multiply that clock speed by your number of cores.
For example, on my EvoLTE, scrolling (not loading, simply scrolling) through a large webpage smoothly will occur when the both CPUs clock rates are no less than 432Mhz. (This is on mine without background tasks taking any CPU. Yours may be different depending on services running, the browser you use, your ROM, kernel, etc.) Because the EvoLTE has 2 cores, we multiply 432Mhz * 2 = 864Mhz. Thus, the nominal clock rate for scrolling a webpage on my EvoLTE is 864Mhz.
Now, here's the rub. If you turn off one of the cores and turn the other core to 864Mhz, you will not find that it is smooth anymore. I will not write a dissertation regarding why this is the case. Suffice it to say, despite what is often incorrectly conveyed, multi-core usage is more efficient in multi-dimensional processing loads--such as rendering graphics, playing sound, or decoding video--than a single core's performance because the time spent at a given clock rate is non-linearly less than if it were processed on a single core at a higher frequency. We want a balance of battery life and performance, and that requires using both cores. The other core will kick on when necessary to "fill in the gaps" under such a load, so our measurement stands. For our purposes, the nominal frequency for a given task is the sum of the frequencies of all cores always on at a given clock rate.
Efficient Clock Rates
Efficient clock rates are CPU clock rates that are unique in that they are the most optimal frequency given the range of voltage requirements. If you map out the frequency jump and the voltage requirement jump between each of the available clock rates, you will find that occasionally the voltage requirement will jump significantly without the frequency jumping proportionally to the previous differentials. For example, using stock voltages, the EvoLTE's msm8960 chipset clock/voltage ratios jump significantly higher from 702Mhz to 810Mhz than the ratios from 594Mhz to 702Mhz.
Using stock voltages, the EvoLTE's efficient clock rates are:
384Mhz
702Mhz
1026Mhz
1512Mhz
These are the clock rates that are at the top tier of each of their voltage ranges, before each anomalous ratio jump. These are the most voltage efficient clock rates using stock EvoLTE voltages. If you are using a custom kernel or have changed your voltages (or a totally different phone altogether), your efficient clock rates may be different. Calculate them as applicable to your setup! List the clock rate differences between each frequency step and the differences for each frequency's voltages. You will see an anomalous voltage jump every several frequency steps. The frequency before this jump is the next efficient clock rate. Write it down and keep going through the frequency steps until you have exhausted them.
Clock Rate Biases
Using the information provided above, figure out both your nominal clock rates for the tasks you perform most often and your efficient clock rates depending on your kernel/custom voltage settings. For me, since I am using stock voltages, I use the efficient clock rates listed above. For the tasks I generally perform on my phone, my nominal clock rates are as follows:
Idle - 189Mhz
Page Scrolling - 864Mhz
Video - 1134Mhz
App Loading - 1350Mhz
High Load Processing - 1512Mhz
(Note that my nominal idle speed is less than stock. This is why you must calculate the values that are optimal for your phone for best battery and performance! Each phone is different because of the ROM, kernel, background tasks, etc!)
Once you've listed all of your nominal clock rates, try to consolidate them if you have more than 3. (This is not entirely necessary as you'll see later, but it simplifies things significantly until you're more comfortable dictating more than a few clock rates for your needed task loads.) If you have any tasks that rest in the far upper portion of the frequency spectrum, discard them! We are by no means underclocking anything, but we are trying to keep the CPU clock rate as low as possible for as long as possible. However, the fastest frequencies will be available for sustained load processing, as you will see later. In my case, in addition to discarding the "high load processing", I'll sacrifice a (very) little app loading speed and consolidate video and app loading:
Idle - 189Mhz
Page Scrolling - 864Mhz
Video/App Loading - 1134Mhz
With this done, you will want to start the fine tuning phase! Correlate the efficient clock rates with their closest nominal clock rates, similar to below:
Idle - 189Mhz efficient / 189Mhz nominal
Page Scrolling - 710Mhz efficient / 864Mhz nominal
Video/App Loading - 1026Mhz efficient / 1134Mhz nominal
Keep these handy, as they're going to be necessary for...
The Set Up
Now that we know what are the most efficient clock rates we want to focus on and what the most optimal are for what we want to do, we will start low and scale up as necessary. It's always better to begin with underperforming and tweak the settings upward until we're satisfied with the performance of our target tasks.
In its default state, the Interactive governor has a hair trigger that will raise and lower the clock rates, which means it spends too much time at unnecessary clock speeds, wasting power, and scales down too quickly, leading to stuttering performance. We will take advantage of a seldom used feature of the Interactive governor. Specifically, that with which it determines when it is okay to scale up to each higher clock rate, on a frequency by frequency basis.
We have two primary goals: respond as quickly as possible to each load request for a lag free experience and exceed the desired clock rate for a given task as little as possible. To do this, we will instruct the Interactive governor to trigger certain clock rates in different ways depending on our expected load.
I won't explain all of the settings of the Interactive governor--there are plenty of summaries all around. (Go search now if you don't know what any of the settings for Interactive governor do. I'll wait here.) However, I will explain an incredibly powerful feature of the Interactive governor that is rarely included in those summaries: multiple frequency adjustments.
The above_highspeed_delay setting, for example, defines how long the governor should wait before escalating the clock rate beyond what's set in highspeed_freq. However, you can define multiple different delays that the governor should use for any specified frequency.
For example, we want the above_highspeed_delay as low as possible to get the CPU out of the idle state as quickly as possible when a significant load is applied. However, we don't want it to jump immediately to the fastest clock rate once it's gotten out of idle, as that may be overkill for the current task. Our target trigger (which you will later adjust to suit your system and usage profile), will begin at 20000μs. That means 20,000μs (or 20ms) after our idle max load has been reached, we want to assume idle has been broken and we want to perform an actual task. (We want this value as low as possible without false positives, because it is one of a few factors that determine how snappy and lag free the CPU's response is.)
But at this point we're not ready to take on a full processing load. We may just be briefly scrolling a webpage and don't need the full power of the CPU now that we've allowed it to break out of idle. So we need it to reach a particular frequency and then hold it there again until we're sure the load is justified before we allow it to push the frequency even higher. To do that, rather than just setting
above_highspeed_delay - 20000​
we will instead use the format "frequency:delay" to set
above_highspeed_delay - 20000 702000:60000​
"Waaaait... What does that do?!"
This tells the Interactive governor to hold out 20ms after our target load when it's at our highspeed_freq (which we're actually using as our idle frequency--not a burst frequency as originally intended), but then it tells the governor to hold for 60ms after it's reached 702Mhz. (If you don't know what I'm talking about when I say "highspeed_freq" then you didn't go search for the basic Interactive governor settings and read about it! Go do that before you read any further, because I will not explain the basics of this governor!)
So now that we know how to specify different settings for different frequency ranges, let's finish it all up with...
The Money Shot
If you've made it this far, you're ready to put these strategies into play! If you have not read the previous sections, DO NOT COMPLAIN IF THE DEFAULT SETTINGS DON'T PROVIDE WHAT YOU'RE LOOKING FOR!! These settings are templates only and these need to be adjusted for each case based on your system and usage patterns! IF YOU ARE NOT GETTING THE PERFORMANCE OR BATTERY LIFE PROMISED, ***READ THE SECTIONS ABOVE!!!***
With that out of the way... let's rock!
If you are using an EvoLTE, use the following Interactive governor settings and then tweak with the instructions below:
(If you are using a phone other than an EvoLTE, you must read the above sections and replace the frequencies with your own efficient clock rates!)
above_highspeed_delay - 20000 702000:60000 1026000:150000
boost - 0
boostpulse_duration - 80000
go_highspeed_load - 99
hispeed_freq - 384000
io_is_busy - 0
min_sample_time - 40000
target_loads - 98 384000:40 702000:80 1026000:95
timer_rate - 30000
timer_slack - 80000
These defaults work fine for me, but I have otherwise optimized my system fully, so they are at the minimal adequate values. If you have background tasks that consume any somewhat significant amount of CPU on a constant basis, you will most likely see awful, stuttery performance and poor battery life! So you must adjust them to suit your system before you see results!!! Anything more than about 15-20% idle CPU use at any given time will negatively affect the results you see without further tweaking!
Optimize Idle Frequency
Now that you've got the base configuration, we need to tweak it so that the CPU stays at your efficient idle frequency (384Mhz in this case) without spontaneously jumping when your phone is actually idle. To do this, open a CPU monitor that displays the current core frequencies (I like CoolTool, but you can use what you like as long as it doesn't significantly impact the CPU use--you're best off using a passive monitor and checking the results after 30-60 seconds of no activity), watch the frequencies and see how often they go above your efficient idle frequency when you're not doing anything at all, and adjust the following:
timer_rate - If your idle frequency is not being exceeded much, adjust this downward in increments of 5000 until it is, then increase it by 5000. If your idle frequency is being exceeded often, adjust this upward in increments of 5000 until your CPU primarily stays at or below your desired idle frequency.
above_highspeed_delay - Only if your timer_rate has matched or exceeded 50000 and still won't stay at or below your desired idle frequency most of the time, set timer_rate to 50000 and adjust the "20000" portion of the value upwards in increments of 5000 until the idle frequency has stabilized.
The lower these two values are, the more snappy/lag free your system will be. So try to get them as low as possible without the idle frequency being exceeded too much, as this inversely affects the snappiness and efficiency of your phone when you're not doing anything. Lower = snappier but uses more CPU when you're not doing anything (such as reading a webpage); higher = less snappy but stays in a power saving state more often reducing CPU use when you're not interacting with the device. These are the most critical in determining your idle power savings, so keep that in mind if you want the most battery life!
Enhance Task Responsiveness
Now use the efficiency and nominal clock rate correlations you made for your master clock rate list in the section above and adjust your frequencies to suit your usage patterns. For example, I had web page scrolling as my 710Mhz/864Mhz rates, so I will open a web page and scroll and see how everything feels. If it feels sluggish, I will increase all the references to "710000" in both above_highspeed_delay and target_loads upwards to the next available clock rate until that task is smooth. What you are looking for is constant poor/sluggish performance when the task you're testing for is using its highest CPU use. If the task becomes sluggish/stuttery as it winds down (such as a scrolling webpage slowing to a stop), we will address that next, so do not take that behavior into consideration as you adjust these values! If the task is smooth until (or after) it slows down, then you have reached your optimal clock rate and can move on.
If you need to exceed your nominal clock rate for a particular task, first measure it again just to be sure you had it correct. If you did indeed have it correct, leave it at your nominal clock rate and adjust the value after the colon next to the task frequency you're tuning downward in increments of 5. For example, if my setting of "864000:80" is still not sufficient, I will adjust it first to "864000:75", then "864000:70", and so on until the task is smooth. However, it almost certainly won't come to this, but if you reach ":50" and the task still isn't performing how you want, set it back to ":80" and increase the clock step once more, then decrease the ":80" until it is smooth.
Do the same for each other frequency in your master clock rate list until you are satisfied. If you have chosen to use more than 2 primary clock rates, add them and use ":##" values between the two surrounding frequency values.
Fix Stuttering
Now that you have adjusted your frequencies for optimal high CPU use in each given task, you may notice some stuttering as the task winds down. (Such as a scrolling webpage slowing to a stop.) If this bothers you, you can tweak this at the expense of some (minor) battery life by adjusting min_sample_time up in increments of 5000 until you are satisfied.
If you have exceeded a value of 100000 for the min_sample_time setting and still are not satisfied, change it back to 40000 and increase (and re-optimize) your idle frequency by one step. This will impact battery life more, but less than if you were to keep increasing the value of min_sample_time.
Adjust High Load Clock Rates
You're almost done! Now you can leave everything as is and be satisfied with your amazing, buttery smooth, snappy experience, or you can optionally tweak things further to either increase the responsiveness of high load tasks (such as loading image previews in Gallery) or increase battery life somewhat.
Adjust the final delay value in above_highspeed_delay to suit your needs. The default ("150000") means that the CPU load at the highest set frequency (default "1026000") will have to be sustained for 150ms before it allows the load to go above that frequency. Increasing this value will prevent the CPU from reaching higher frequencies (which may be unnecessary) as often, saving battery life. This will come at the expense of burst-type high CPU load tasks. Reducing it will allow the CPU to reach higher frequencies more often, at the expense of battery life. However, adjusting this is probably unnecessary, as it will most likely not yield any perceptible difference in performance. It is recommended to leave this value at its default.
The Conclusion
I have achieved unprecedented performance, smoothness, snappiness, and battery life with the default settings I outlined above. However, your mileage may vary, as every phone, ROM, kernel, installed applications, etc are different. This is a very sensitive governor profile and must be tweaked to just meet the requirements of your system and your usage patterns!
If it is not optimally tuned, performance and battery life will suffer! If you're not seeing buttery smooth, snappy performance, you have not correctly tuned it for your system!! However, if you do have superb performance (and you tweaked the values conservatively and not in large steps), then you will also get the aforementioned battery life.
I will be happy to answer any questions, or provide any guidance I can. However:
You must otherwise optimize your phone first! This will not "fix" a poorly optimized system and will, in fact, reduce performance and battery life without further optimization and proper tweaking.
I will not answer questions about "what is a governor?" There are plenty of resources available already, so search for them.
I will not answer questions about "how can I tweak [some other] governor?" This is about the Interactive governor only.
I will not respond to "nuh uh! show proof!" posts. The fact that I spent 12 hours writing this up should be proof enough that I am satisfied with the results. You can take it or leave it; makes no difference to me. The default settings should work with any fully optimized EvoLTE, so just try them on your own. If you're not absolutely satisfied (and trust me, either it'll work out-of-the-box with flying colors and you'll know it works for your system, or it'll be an awful experience which means you must tweak it), then you haven't adequately adjusted the settings to suit your system.
Lemme know what you think, and good luck!
Really nice write up! Easy to read and understand. One question, how exactly are you changing the above high-speed delay. I input exactly but when I save and go back it's bank only to 20000
Sent from my EVO LTE using XDA Premium 4 mobile app
Great article!
jmkarnai01 said:
Really nice write up! Easy to read and understand. One question, how exactly are you changing the above high-speed delay. I input exactly but when I save and go back it's bank only to 20000
Sent from my EVO LTE using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I was wondering the same thing.
jmkarnai01 said:
Really nice write up! Easy to read and understand. One question, how exactly are you changing the above high-speed delay. I input exactly but when I save and go back it's bank only to 20000
Sent from my EVO LTE using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I use the the fku updater app the paid version and all my settings stick on my g3 and my m8
Nice write up. Just the sort of info I've been looking for
Well done sir
Great information here!
Finally someone makes complete guide on this governor
hello..i am not an advanced user like you guys..great work !..i try my best to understand,i read threw every word,even though i dont have your device.i am useing a htc m8 on sprint..i flashed the kernal after reading all about it..i do want amazeing battery life,i work all the time,constantly networking and listening to music,useing data all the time really,i understand these things will kill battery no matter what..i also know you said if we have abother device other than the evo the device you laid out exact settings for,we would have to tweak on our own..and without you haveing the device i have im sure be hard to give some advice..couple questions?- 1.)if i just use default settings,and change nothing will it benifit me at all,or did i just flash the kernal for nothing,since im not advanced enough to really tweak kernal on my own..2)is there anyway possible to get exact instrutions for my device like you gave for the evo...just wanted to add how lucky users of that device are for you to of givein these details,you seem to of really mastered that device..thanks for hard work either way..if i cant get nothing out of this,its ok i can allways just wipe device and restore back up without the kernal installed...
Very nice, well-written guide. Thanks a lot!
@soniCron: How do I turn on and of cores one by one? I have quad core.
Hi soniCron, I just wanted to let you know that I followed your guide and tweaked my OnePlus One. Great results so far, and stellar battery life. I'm very happy with it, thanks
Phazonclash said:
Hi soniCron, I just wanted to let you know that I followed your guide and tweaked my OnePlus One. Great results so far, and stellar battery life. I'm very happy with it, thanks
Click to expand...
Click to collapse
Can you share your changes/parameter settings?
Maybe via pm if not using the thread?
solar666 said:
Can you share your changes/parameter settings?
Maybe via pm if not using the thread?
Click to expand...
Click to collapse
above_hispeed_delay 20000 652800:20000 1190400:40000 1497600:60000 2265600:80000
boost 0
bootpulse duration 80000
go_hispeed_load 99
hispeed_freq 652800
io_is_busy 0
mac_freq_hysteresis 10000
min_sample_time 60000
target_loads 98 652800:40 1190400:70 1497600:80 2265600:90
timer_rate 30000
timer_slack 40000
How the lemon does this guide only have 2 pages?
Great guide, thanks a lot, going to try it with my oneplus one now
thewind730 said:
I use the the fku updater app the paid version and all my settings stick on my g3 and my m8
Click to expand...
Click to collapse
Can you share please your M8 settings and tell if it really had an impact on performance and battery life. Thanks.
Also I cannot save the edited parameters files under /sys/devices/system/cpu/cpufreq/interactive although I have full root. Any suggestions? I have an HTC One M8 with ViperOneM8 4.3, rooted and S-Off.
Sent from my HTC One_M8 using Tapatalk
tghandour said:
Can you share please your M8 settings and tell if it really had an impact on performance and battery life. Thanks.
Also I cannot save the edited parameters files under /sys/devices/system/cpu/cpufreq/interactive although I have full root. Any suggestions? I have an HTC One M8 with ViperOneM8 4.3, rooted and S-Off.
Sent from my HTC One_M8 using Tapatalk
Click to expand...
Click to collapse
Sent from my HTC One_M8 using Tapatalk
I'm testing this guide on my LG G2 and it seems to work pretty well.
Good job :good:
Awesome! I just tweaked mine now to the lowest frequencies that is lag free and will check tomorrow if battery life of my htc one m9 has improved somehow.
Also you might want to add this link to kernel cpu governor documentation. Which pretty much explains the other variables.
tghandour said:
Sent from my HTC One_M8 using Tapatalk
Click to expand...
Click to collapse
Can u share ur m8 settings to try out please...... Thanks
HTC m8 on arhd 43 using dark blue Tapatalk from jokerpoker1

[BATTERY GUIDE] Ultimate battery guide and talk topic

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Ultimate battery guide
Battery, one of the most important thing on todays phones. Even if we have awesome battery life we always want more and it is never enough.
This is the small guide to tips, trick and tweaks to improve battery life.
This topic is to share tips and tricks and basically just small talk about battery and sharing screenshots.
Use Gsam or Android battery history to show your battery life.​
Our goal is to make most of the screen on time with average use of 24 hours. So lets start.
Post 1: Tips
Post 2: ROMS, kernels, undervolting, underclocking
Tips to improve battery life
Location services
One of the first thing that your device will ask when you are setting up your phone. Most of the users let them ON and just forgot about them. Location services are battery hungry and the will drain your battery like you drinking juice.
Thing is that you do not need them always, just sometimes. Turn it OFF then. I have them turned off always and when I need it I just simple turn it ON.​
Wi-Fi
Wi-Fi scanning is thing that will drain your battery always. When you are out and you are not expecting to use wi-fi any time soon turn it off. You do not need to run scanning all the time.
You could also edit build.prop to reduce.
Edit wifi.supplicant_scan_interval. Default value is 180. You can set it higher to reduce the scanning intervals.​
Signal strength / Network mode
Signal strength is always trouble for battery. Weak signal will drain more battery. Also, constant changing between 4G/3G and 2G will drain battery faster.
Tweak to this is to set your phone to only use 2G, 3G or 4G.
Example: when I am not using my phone, or it is connected to wifi my network is on 2G. I dont need 3G or 4G then and changing network state is disabled then because it will stay always on 2G. I found it has positive effect on battery.
When I need, I just simple toggle 3G or 4G.​
Screen brightness
Screen is the thing that drains most of our battery. There is not much philosophy here. Higher brightness will drain more battery.
My personal setup is that I do not use auto brightness. I always change brightness manually. Right now during winter my brightness does not go more then 25% outside, and inside it is lower. At night it is under 10%.
I found that not using auto brightness has also slight positive effect on battery.​
Syncing / Airplane mode / Vibration / Animations / Task Killers
Lets start in order.
Syncing: more syncing your device does it drains more battery. On your phone probably you do not to sync all accounts and apps you have every few minutes or hours. Set those apps you do not need on manual sync.
Airplane mode: I am using airplane mode during night because I do not want to be disturbed during sleep. With airplane mode battery consumption during night is 0%. Yes, zero percent.
Vibration: more your device vibrates, more battery it drains. You can reduce vibrations on keyboard settings and similar. I found that is not much effect on battery but it has slight.
Animations: animations drains your battery also and who really needs them. Personally, I am annoyed with them and I always switch them to 0 or .5. You can do that in Settings-Developers options
Task Killers: task killers, clean maters and similar software is a big NO. You dont need it. It does more damage then good.​
Bloatware
Yes, bloatware. There is huge amount of bloatware on our phones and we really do not need it. So, what to do? Freeze that bloatware.
You can find list of apps HERE.​
ROMS and kernels
Custom ROMs and kernels will give you in most cases better battery life then stock firmware. Plus there is huge amount of options to play with. You can read more in posts bellow.​
Summary:
If you change some of those thing you will see the effect.
You can always use apps like Greenify or Tasker and play with their options.​
How to follow your battery life
GSam Battery Monitor
This one of the most useful apps to track your battery. On Lollipop (even on Kitkat) it will not give you much useful info without root.
If you are using it without root everytime you reboot the phone statistic would be reset also. If you have root it will give you access to wakelocks and some other stuff, plus stats would not get reseted.
Play store link​
Wakelock detector
Wakelocks, one of the painful things on phone. If you see your battery is draining faster in idle then you got problem with wakelocks. This is useful app because it shows wakelocks on very simple setup and you can discover which app is causing which wakelock.
Play Store link​
Disable service
If you are using Wakelock detector you need this app also. With this app you can freeze every single process that app can launch. It will provide detail look on all processes from apps. With this app I have reduced wakelocks to 1%.
Play Store link​
ROMS
Discussion about ROMs never looked nice. It always gets to what you personally like. Some ROMs will be easier on battery, some will be rough. You will never know before you try them.​
Kernels
Kernels are similar to ROMS but you can play with them. Currently there is not much kernels available but you can play even with stock one.
I recommend to use Trickster MOD Kernel Settings app to play with kernel settings.​
Undervoting
Undervolting is the thing when you control how much power each CPU frequency can have. Trickster MOD app gives really nice view on them. You can undervolt every frequency by itself or all in one.
My personal recommendation is to undervolt them at once. I always use -50 value. Found it stable.
Of course, you can always play with different values but remember: when you play with this do not click on option "Set on Boot" or you will end in bootloop if you click it. Click that option when you find out that values are safe for using and stable.​
Underclocking
Underclocking is changing your CPU frequency. Rough truth is that we dont need our CPU to run on 2,7 GHz in normal use. Only gamers will need that probably but since this is not thread were we are aiming gamers we dont need that high frequency.
Me personally, I use always 1,7 GHz or 1,9 GHz. To my daily usage (most common like everyone else but without games) this is more then enough. Everything is still smooth and runs fast.​
Governors
A CPU governor in Android controls how the CPU raises and lowers its frequency in response to the demands the user is placing on their device. Governors are especially important in smartphones and tablets because they have a large impact on the apparent fluidity of the interface and the battery life of the device over a charge.
You can find explanation hidden here.
Many users have wrote about governors and they are practically the same on most of the phones so I will copy list from droidphile.
On his topic you have more details about governors.
Link to original topic: http://forum.xda-developers.com/galaxy-s2/general/ref-kernel-governors-modules-o-t1369817
I) MANUAL:
These are the 19 governors we're talking about.
1) Ondemand
2) Ondemandx
3) Conservative
4) Interactive
5) Interactivex
6) Lulzactive
7) Lulzactiveq
8) Smartass
9) SmartassV2
10) Intellidemand
11) Lazy
12) Lagfree
13) Lionheart
14) LionheartX
15) Brazilianwax
16) SavagedZen
17) Userspacce
18) Powersave
19) Performance
1) Ondemand:
Default governor in almost all stock kernels. One main goal of the ondemand governor is to switch to max frequency as soon as there is a CPU activity detected to ensure the responsiveness of the system. (You can change this behavior using smooth scaling parameters, refer Siyah tweaks at the end of 3rd post.) Effectively, it uses the CPU busy time as the answer to "how critical is performance right now" question. So Ondemand jumps to maximum frequency when CPU is busy and decreases the frequency gradually when CPU is less loaded/apporaching idle. Even though many of us consider this a reliable governor, it falls short on battery saving and performance on default settings. One potential reason for ondemand governor being not very power efficient is that the governor decide the next target frequency by instant requirement during sampling interval. The instant requirement can response quickly to workload change, but it does not usually reflect workload real CPU usage requirement in a small longer time and it possibly causes frequently change between highest and lowest frequency.
2) Ondemandx:
Basically an ondemand with suspend/wake profiles. This governor is supposed to be a battery friendly ondemand. When screen is off, max frequency is capped at 500 mhz. Even though ondemand is the default governor in many kernel and is considered safe/stable, the support for ondemand/ondemandX depends on CPU capability to do fast frequency switching which are very low latency frequency transitions. I have read somewhere that the performance of ondemand/ondemandx were significantly varying for different i/o schedulers. This is not true for most of the other governors. I personally feel ondemand/ondemandx goes best with SIO I/O scheduler.
3) Conservative:
A slower Ondemand which scales up slowly to save battery. The conservative governor is based on the ondemand governor. It functions like the Ondemand governor by dynamically adjusting frequencies based on processor utilization. However, the conservative governor increases and decreases CPU speed more gradually. Simply put, this governor increases the frequency step by step on CPU load and jumps to lowest frequency on CPU idle. Conservative governor aims to dynamically adjust the CPU frequency to current utilization, without jumping to max frequency. The sampling_down_factor value acts as a negative multiplier of sampling_rate to reduce the frequency that the scheduler samples the CPU utilization. For example, if sampling_rate equal to 20,000 and sampling_down_factor is 2, the governor samples the CPU utilization every 40,000 microseconds.
4) Interactive:
Can be considered a faster ondemand. So more snappier, less battery. Interactive is designed for latency-sensitive, interactive workloads. Instead of sampling at every interval like ondemand, it determines how to scale up when CPU comes out of idle. The governor has the following advantages: 1) More consistent ramping, because existing governors do their CPU load sampling in a workqueue context, but interactive governor does this in a timer context, which gives more consistent CPU load sampling. 2) Higher priority for CPU frequency increase, thus giving the remaining tasks the CPU performance benefit, unlike existing governors which schedule ramp-up work to occur after your performance starved tasks have completed. Interactive It's an intelligent Ondemand because of stability optimizations. Why??
Sampling the CPU load every X ms (like Ondemand) can lead to under-powering the CPU for X ms, leading to dropped frames, stuttering UI, etc. Instead of sampling the CPU at a specified rate, the interactive governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy between exiting idle and when the timer fires, then we assume the CPU is underpowered and ramp to max frequency.
5) Interactivex:
This is an Interactive governor with a wake profile. More battery friendly than interactive.
6) Lulzactive:
This new find from Tegrak is based on Interactive & Smartass governors and is one of the favorites.
Old Version: When workload is greater than or equal to 60%, the governor scales up CPU to next higher step. When workload is less than 60%, governor scales down CPU to next lower step. When screen is off, frequency is locked to global scaling minimum frequency.
New Version: Three more user configurable parameters: inc_cpu_load, pump_up_step, pump_down_step. Unlike older version, this one gives more control for the user. We can set the threshold at which governor decides to scale up/down. We can also set number of frequency steps to be skipped while polling up and down.
When workload greater than or equal to inc_cpu_load, governor scales CPU pump_up_step steps up. When workload is less than inc_cpu_load, governor scales CPU down pump_down_step steps down.
Example:
Consider
inc_cpu_load=70
pump_up_step=2
pump_down_step=1
If current frequency=200, Every up_sampling_time Us if cpu load >= 70%, cpu is scaled up 2 steps - to 800.
If current frequency =1200, Every down_sampling_time Us if cpu load < 70%, cpu is scaled down 1 step - to 1000.
7) Lulzactiveq:
Lulzactiveq is a modified lulzactive governor authored by XDA member robertobsc and is adapted in Siyah kernel for GS2 and GS3. Lulzactiveq aims to optimize the second version of luzactive from Tegrak by a) providing an extra parameter (dec_cpu_load) to make scaling down more sensible, and b) incorporating hotplug logic to the governor. Luzactiveq is the first ever interactive based governor with hotplugging logic inbuilt (atleast the first of its kind for the exynos platform). When CPU comes out of idle loop and it's time to make a scaling decision, if load >= inc_cpu_load CPU is scaled up (like original luzactiveq) and if load <dec_cpu_load, CPU is scaled down. This possibly eliminates the strict single cut-off frequency for luzactiveq to make CPU scaling decisions. Also, stand hotplug logic runs as a separate thread with the governor so that external hotplugging logic is not required to control hotplug in and out (turn On and Off) CPU cores in multi core devices like GS2 or GS3. Only a multi core aware governor makes real sense on muti-core devices. Lulzactiveq and pegasusq aims to do that.
8) Smartass:
Result of Erasmux rewriting the complete code of interactive governor. Main goal is to optimize battery life without comprising performance. Still, not as battery friendly as smartassV2 since screen-on minimum frequency is greater than frequencies used during screen-off. Smartass would jump up to highest frequency too often as well.
9) SmartassV2:
Version 2 of the original smartass governor from Erasmux. Another favorite for many a people. The governor aim for an "ideal frequency", and ramp up more aggressively towards this freq and less aggressive after. It uses different ideal frequencies for screen on and screen off, namely awake_ideal_freq and sleep_ideal_freq. This governor scales down CPU very fast (to hit sleep_ideal_freq soon) while screen is off and scales up rapidly to awake_ideal_freq (500 mhz for GS2 by default) when screen is on. There's no upper limit for frequency while screen is off (unlike Smartass). So the entire frequency range is available for the governor to use during screen-on and screen-off state. The motto of this governor is a balance between performance and battery.
10) Intellidemand:
Intellidemand aka Intelligent Ondemand from Faux is yet another governor that's based on ondemand. Unlike what some users believe, this governor is not the replacement for OC Daemon (Having different governors for sleep and awake). The original intellidemand behaves differently according to GPU usage. When GPU is really busy (gaming, maps, benchmarking, etc) intellidemand behaves like ondemand. When GPU is 'idling' (or moderately busy), intellidemand limits max frequency to a step depending on frequencies available in your device/kernel for saving battery. This is called browsing mode. We can see some 'traces' of interactive governor here. Frequency scale-up decision is made based on idling time of CPU. Lower idling time (<20%) causes CPU to scale-up from current frequency. Frequency scale-down happens at steps=5% of max frequency. (This parameter is tunable only in conservative, among the popular governors )
To sum up, this is an intelligent ondemand that enters browsing mode to limit max frequency when GPU is idling, and (exits browsing mode) behaves like ondemand when GPU is busy; to deliver performance for gaming and such. Intellidemand does not jump to highest frequency when screen is off.
11) Lazy:
This governor from Ezekeel is basically an ondemand with an additional parameter min_time_state to specify the minimum time CPU stays on a frequency before scaling up/down. The Idea here is to eliminate any instabilities caused by fast frequency switching by ondemand. Lazy governor polls more often than ondemand, but changes frequency only after completing min_time_state on a step overriding sampling interval. Lazy also has a screenoff_maxfreq parameter which when enabled will cause the governor to always select the maximum frequency while the screen is off.
12) Lagfree:
Lagfree is similar to ondemand. Main difference is it's optimization to become more battery friendly. Frequency is gracefully decreased and increased, unlike ondemand which jumps to 100% too often. Lagfree does not skip any frequency step while scaling up or down. Remember that if there's a requirement for sudden burst of power, lagfree can not satisfy that since it has to raise cpu through each higher frequency step from current. Some users report that video playback using lagfree stutters a little.
13) Lionheart:
Lionheart is a conservative-based governor which is based on samsung's update3 source. Tweaks comes from 1) Knzo 2) Morfic. The original idea comes from Netarchy. See here. The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.
To 'experience' Lionheart using conservative, try these tweaks:
sampling_rate:10000 or 20000 or 50000, whichever you feel is safer. (transition latency of the CPU is something below 10ms/10,000uS hence using 10,000 might not be safe).
up_threshold:60
down_threshold:30
freq_step:5
Lionheart goes well with deadline i/o scheduler. When it comes to smoothness (not considering battery drain), a tuned conservative delivers more as compared to a tuned ondemand.
14) LionheartX
LionheartX is based on Lionheart but has a few changes on the tunables and features a suspend profile based on Smartass governor.
15) Brazilianwax:
Similar to smartassV2. More aggressive ramping, so more performance, less battery.
16) SavagedZen:
Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
17) Userspace:
Instead of automatically determining frequencies, lets user set frequencies.
18) Powersave:
Locks max frequency to min frequency. Can not be used as a screen-on or even screen-off (if scaling min frequency is too low).
19) Performance:
Sets min frequency as max frequency. Use this while benchmarking!​
Schedulers
Everything has been said about them so I will use droidphile explanations.
Link to original topic: http://forum.xda-developers.com/galaxy-s2/general/ref-kernel-governors-modules-o-t1369817
Q. "What purposes does an i/o scheduler serve?"
A.
Minimize hard disk seek latency.
Prioritize I/O requests from processes.
Allocate disk bandwidth for running processes.
Guarantee that certain requests will be served before a deadline.
So in the simplest of simplest form: Kernel controls the disk access using I/O Scheduler.
Q. "What goals every I/O scheduler tries to balance?"
A.
Fairness (let every process have its share of the access to disk)
Performance (try to serve requests close to current disk head position first, because seeking there is fastest)
Real-time (guarantee that a request is serviced in a given time)
Q. "Description, advantages, disadvantages of each I/O Scheduler?"
A.
1) Noop
Inserts all the incoming I/O requests to a First In First Out queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Advantages:
Serves I/O requests with least number of cpu cycles. (Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.
Disadvantages:
Reduction in number of cpu cycles used is proportional to drop in performance.
2) Deadline
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.
Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.
Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
3) CFQ
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process. V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.
Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.
Disadvantages:
Some users report media scanning takes longest to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
4) BFQ
Instead of time slices allocation by CFQ, BFQ assigns budgets. Disk is granted to an active process until it's budget (number of sectors) expires. BFQ assigns high budgets to non-read tasks. Budget assigned to a process varies over time as a function of it's behavior.
Advantages:
Believed to be very good for usb data transfer rate.
Believed to be the best scheduler for HD video recording and video streaming. (because of less jitter as compared to CFQ and others)
Considered an accurate i/o scheduler.
Achieves about 30% more throughput than CFQ on most workloads.
Disadvantages:
Not the best scheduler for benchmarking.
Higher budget assigned to a process can affect interactivity and increased latency.
5) SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
Advantages:
Simple, so reliable.
Minimized starvation of requests.
Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
6) V(R)
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.
Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.
I/O Schedulers
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
7) Anticipatory
Based on two facts
i) Disk seeks are really slow.
ii) Write operations can happen whenever, but there is always some process waiting for read operation.
So anticipatory prioritize read operations over write. It anticipates synchronous read operations.
Advantages:
Read requests from processes are never starved.
As good as noop for read-performance on flash drives.
Disadvantages:
'Guess works' might not be always reliable.
Reduced write-performance on high performance disks.​
reserved
Great to see this Guide I was planning to create one as there is no guide for Sprint Version.
You may also add Amplify Battery Save module in order to configure the wakelocks timer its a wonderful app.
aukhan said:
Great to see this Guide I was planning to create one as there is no guide for Sprint Version.
You may also add Amplify Battery Save module in order to configure the wakelocks timer its a wonderful app.
Click to expand...
Click to collapse
Thanks.
Amplify, is this that?
DelBoy said:
Thanks.
Amplify, is this that?
Click to expand...
Click to collapse
Yes this lets you delay the wakelocks specially for Google Services which very often wakes up your device, Also Converting the playservice.apk to user app and this can also be greenified which is the most battery hungry apk on the device.
aukhan said:
Yes this lets you delay the wakelocks specially for Google Services which very often wakes up your device, Also Converting the playservice.apk to user app and this can also be greenified which is the most battery hungry apk on the device.
Click to expand...
Click to collapse
Are there no issues with converting playservice.apk to a user app?
TravisH997 said:
Are there no issues with converting playservice.apk to a user app?
Click to expand...
Click to collapse
No Issues I was using it on my G3.
It's sad that we have to resort to this just to get good battery life.
Why don't they just give you good battery life out of the box? Or at minimum at 4500mah battery

Best Swappiness for the moto e?

Currently it looks like the swappiness in kernel settings is set to 100%...typically this is around 60...on hi ram devices it might be set to something low like 10 to be resistant to swapping...still 100% seems really high....I've also noticed when several apps have been installed to the device after a while of sitting it becomes unusable due to non-responsiveness. Reboot it and it will be allright for a while...so I think the apps are eating up the memory and the swap is dragging everything to a crawl. Anyone have some suggested "Kernel Adiuter" settings?
famewolf said:
Currently it looks like the swappiness in kernel settings is set to 100%...typically this is around 60...on hi ram devices it might be set to something low like 10 to be resistant to swapping...still 100% seems really high....I've also noticed when several apps have been installed to the device after a while of sitting it becomes unusable due to non-responsiveness. Reboot it and it will be allright for a while...so I think the apps are eating up the memory and the swap is dragging everything to a crawl. Anyone have some suggested "Kernel Adiuter" settings?
Click to expand...
Click to collapse
I had tons of performance isssues, which were easily solved by flashing Squid Kernel on my device. I followed the isntructions given by squid my device performance much better and also has great battery life.
squid2 said:
My new Lionfish governor combines traits of the conservative, ondemand, and interactive governors. It is designed to maximize battery life without noticeably impacting performance. It responds quickly to heavy loads (similar to ondemand and interactive) while staying within the region of optimal CPU performance per watt. With moderate loads, it periodically votes to raise, maintain, or decrease the frequency. When there are enough votes to change the frequency, it is ramped up and down gradually. The voting mechanism reduces frequency jitter compared to ondemand and conservative. My testing had found that this governor uses moderate frequencies (where efficiency is optimal) more effectively than interactive, ondemand, and conservative. This improved frequency distribution results in a moderate reduction in CPU power consumption while maintaining responsiveness comparable to the interactive governor.
IntelliPlug is enabled by default in this kernel. The default governor is still interactive. For optimal performance and battery life, I recommend using the fiops IO scheduler, Lionfish governor, and lowering the CPU idle frequency to 400 MHz (from the default of 800 MHz). The combination of IntelliPlug, Lionfish, undervolting, and reducing idle to 400 MHz should result in a CPU power consumption reduction of around 20% compared to the stock kernel. This will typically correspond to 8-15% increase in battery life compared to the stock configuration.
Click to expand...
Click to collapse
famewolf said:
Currently it looks like the swappiness in kernel settings is set to 100%...typically this is around 60...on hi ram devices it might be set to something low like 10 to be resistant to swapping...still 100% seems really high....I've also noticed when several apps have been installed to the device after a while of sitting it becomes unusable due to non-responsiveness. Reboot it and it will be allright for a while...so I think the apps are eating up the memory and the swap is dragging everything to a crawl. Anyone have some suggested "Kernel Adiuter" settings?
Click to expand...
Click to collapse
Wikipedia says: "Swappiness can be set to values between 0 and 100 inclusive. A low value causes the kernel to avoid swapping, a higher value causes the kernel to try to use swap space. The default value is 60, and for most desktop systems, setting it to 100 may affect the overall performance, whereas setting it lower (even 0) may decrease response latency." This value set to 100 is definitely the source of non-responsiveness. I would recommend 40 if you are using apps that are heavy on RAM (advanced games) and 60 if not but you may find better values yourself.

Categories

Resources