Governor descriptions for those using custom kernels and cpu manager - XPERIA X10 General

I wanted to know what the different governors do, rather than filling dev's threads up with questions I thought i would have a look around and do this for others who like me wanted to know what they do:
1: Interactive
The CPUfreq governor "interactive" is designed for low latency, interactive workloads. This governor sets the CPU speed depending on usage, similar to "ondemand" and "conservative" governors. However there is no polling, or 'sample_rate' required to scale the CPU up. Sampling CPU load every X ms can lead to under powering the CPU for X ms, leading to dropped framerate, stuttering UI etc..Scaling the CPU up is done when coming out of idle, and like "ondemand" scaling up will always go to MAX, then step down based off of cpu load.
There is only one tuneable value for this governor: min_sample_time: The ammount of time the CPU must spend (in uS) at the current frequency before scaling DOWN. This is done to
more accurately determine the cpu workload and the best speed for that workload. The default is 50ms.
2:Min Max
well this governor makes use of only min & maximum frequency based on workload... no intermediate frequencies are used.
3:Smartass
(Quoted from another author http://www.ziggy471.com/2010/11/07/s...-governor-info ) - "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!"
4:Scary
A new governor wrote based on conservative with some smartass features, it scales accordingly to conservatives laws. So it will start from the bottom, take a load sample, if it's above the upthreshold, ramp up only one speed at a time, and ramp down one at a time. It will automatically cap the off screen speeds to 245Mhz, and if your min freq is higher than 245mhz, it will reset the min to 120mhz while screen is off and restore it upon screen awakening, and still scale accordingly to conservatives laws. So it spends most of its time at lower frequencies. The goal of this is to get the best battery life with decent performance. It will give the same performance as conservative right now, it will get tweaked over time.
I assume performance, conservative, powersave and ondemand are self explanatory,
Userspace - finding conflicting info, so if a dev wants to help me out ??
All this info was found on the web in various places, where possible I have quoted where from. If people would like me to link back to them please let me know I will add.
This is purely to help people understand the governors a little without filling dev threads
Can people also leave user feedback on the governors they have been using to give us a reference point to help us all
if it helped hit thanks
Dooms Kernel : http://forum.xda-developers.com/showthread.php?t=1226826
Schedulers post 3

Nice one Chiefy, good to know we have a thread for quick reference when needing it.

Schedulers
NOOP scheduler
The NOOP scheduler inserts all incoming I/O requests into a simple, unordered
FIFO queue and implements request merging.
The scheduler assumes I/O performance optimization will be handled at some
other layer of the I/O hierarchy; e.g., at the block device; by an intelligent
HBA such as a Serial Attached SCSI (SAS) RAID controller or by an externally
attached controller such as a storage subsystem accessed through a
switched Storage Area Network).
NOOP scheduler is best used with solid state devices such as flash memory
or in general with devices that do not depend on mechanical movement to
access data (meaning typical "hard disk" drive technology consisting of seek
time primarily, plus rotational latency). Such non-mechanical devices do not
require re-ordering of multiple I/O requests, a technique that groups together
I/O requests that are physically close together on the disk, thereby reducing
average seek time and the variability of I/O service time.
Deadline
The goal of the Deadline scheduler is to attempt to guarantee a start service time for a request[1]. It does that by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.
Before serving the next request, the Deadline scheduler decides which queue to use. Read queues are given a higher priority, because processes usually block on read operations. Next, the Deadline scheduler checks if the first request in the deadline queue has expired. Otherwise, the scheduler serves a batch of requests from the sorted queue. In both cases, the scheduler also serves a batch of requests following the chosen request in the sorted queue.
By default, read requests have an expiration time of 500 ms, write requests expire in 5 seconds.
Anticipatory
Anticipatory scheduling is an algorithm for scheduling hard disk input/output. It seeks to increase the efficiency of disk utilization by "anticipating" synchronous read operations.
"Deceptive idleness" is a situation where a process appears to be finished reading from the disk when it is actually processing data in preparation of the next read operation. This will cause a normal work-conserving I/O scheduler to switch to servicing I/O from an unrelated process. This situation is detrimental to the throughput of synchronous reads, as it degenerates into a seeking workload.[1] Anticipatory scheduling overcomes deceptive idleness by pausing for a short time (a few milliseconds) after a read operation in anticipation of another close-by read requests.[2]
Anticipatory scheduling yields significant improvements in disk utilization for some workloads.[3] In some situations the Apache web server may achieve up to 71% more throughput from using anticipatory scheduling.[4]
The Linux anticipatory scheduler may reduce performance on disks using TCQ, high performance disks, and hardware RAID arrays.[5] An anticipatory scheduler (AS) was the default Linux kernel scheduler between 2.6.0 and 2.6.18, by which time it was replaced by the CFQ scheduler.
BFQ
The Brain **** Scheduler (or BFS) is a task scheduler designed for the Linux kernel in August of 2009 as an alternative to the Completely Fair Scheduler and the O(1) scheduler.[2] BFS was created by veteran kernel programmer Con Kolivas[3].
The objective of BFS, compared to other schedulers, was to provide a scheduler with a simpler algorithm, that did not require adjustment of heuristics or tuning parameters to tailor performance to a specific type of computation workload. The BFS author asserted that these tunable parameters were difficult for the average user to understand, especially in terms of interactions of multiple parameters with each other, and claimed that the use of such tuning parameters could often result in improved performance in a specific targeted type of computation, at the cost of worse performance in the general case.[4] BFS has been reported to improve responsiveness on light-NUMA (non-uniform memory access) Linux mobile devices and desktop computers with fewer than 16 cores.
CFQ
CFQ, also known as "Completely Fair Queuing", is an I/O scheduler for the Linux kernel which was written in 2003 by Jens Axboe.
CFQ works by placing synchronous requests submitted by processes into a number of per-process queues and then allocating timeslices for each of the queues to access the disk. The length of the time slice and the number of requests a queue is allowed to submit depends on the IO priority of the given process. Asynchronous requests for all processes are batched together in fewer queues, one per priority. While CFQ does not do explicit anticipatory IO scheduling, it achieves the same effect of having good aggregate throughput for the system as a whole, by allowing a process queue to idle at the end of synchronous IO thereby "anticipating" further close IO from that process. It can be considered a natural extension of granting IO time slices to a process.

I am testing scary at the mo on stock gb so will edit my post tomorrow bro.

over the next week I will use scary, smartass, ondemand, conservative and interactive and report my findings back here
please all get involved and report back your findings
Can people also post their voltage findings with Dooms new kernel
Scary Report
Phone been on 9h 39m, medium usage, clocking set 128-1113, voltages changed as above post,phone very responsive and no lags, battery remaining 39%, AnTuTu benchmark 2755 linpack 39.

Interactive Report
128-1132 up time 6h 25mins, phone responsive no lag, medium usage 36% left, AnTuTu benchmark 2502 linpack 36 this governor doesnt seem to help battery level very much

6h 25mins and only 36% left? OMG! that's a battery drain!
Well, Quite frankly I went through the governors, Which do you think is better? Can you describe each governor in one word?
I'm on wolf rom with fps uncapped (3.x if i remember well) i haven't upgraded due to the issues pertaining to the users.
Can you just suggest me a good governor based on your experience? Can I get 24 hours of uptime with custom kernels or i still have to wait? ( I know I love OC that we had on 2.2 but looking at the battery drain I'm cautious whether or not to flash the custom kernels )
Thanks for your guide. It's epic!

Neo said:
6h 25mins and only 36% left? OMG! that's a battery drain!
Well, Quite frankly I went through the governors, Which do you think is better? Can you describe each governor in one word?
I'm on wolf rom with fps uncapped (3.x if i remember well) i haven't upgraded due to the issues pertaining to the users.
Can you just suggest me a good governor based on your experience? Can I get 24 hours of uptime with custom kernels or i still have to wait? ( I know I love OC that we had on 2.2 but looking at the battery drain I'm cautious whether or not to flash the custom kernels )
Thanks for your guide. It's epic!
Click to expand...
Click to collapse
so far the best governors that i have used have been Smartass and Scary but i will continue testing the governors and reporting back. Smartass was working great with no o/c for me, i will add this to this test. tomorrow i will test Scary with no o/c

Ok, my conclusions of using the scary gov on my modded stock gb is probally the best my phone has been, nearly all frequencies are being used, had to use min 192 and max 1190 as had a few screen off reboots but once using those settings my no more reboots. Battery life is the best i have had on custom kernel with flat line overnight, 3% loss, with wifi off and hourly updates of email, deep sleep working perfect as it should.
Overall, this is my personal favorite so far, just to add also this is using...
http://doomlord.sylvester20007.com/x10/x10_gb/dk/v02/dk-v02-X-modfxp_xrec.zip
I have not started using v03 of Dooms new kernel because of the good results with v02x.

Samrtass Report
Running Smartass governor uptime 5hours 1minute 128-1132cpu, medium usage, twitter, facebook two calls, brightness and 50%, AnTuTu Benchmark 1569 linpack 31 ( second linpac got WLOD ) battery 69%
Edit 10hours up time 42% battery left
As you can see smartass is a battery friend but performance suffers, although for my usage i find that this is the best governor for me at the minute
further governor tests continue

MIN/MAX Report
I tried to use this governor but it kept causing random reboots so gave up

keep going!!

I know this is missing topic but how would I overclock my x10. If it is, how safe is it?
Sent from my x10 Platinum

om23 said:
I know this is missing topic but how would I overclock my x10. If it is, how safe is it?
Sent from my x10 Platinum
Click to expand...
Click to collapse
From what I have encountered it depends on the age of your phone, it is safe and won't blow you phone up but some models can handle far greater stress. the newer phones tend to be able to overclock higher, all that will happen if you phone cant handle the overclock is you will get the dreaded WLOD and your phone will reboot, then if you have set the speed from boot you may get stuck at boot image, but if that is the case then you use flash tool and reflash

chiefy009 said:
MIN/MAX Report
I tried to use this governor but it kept causing random reboots so gave up
Click to expand...
Click to collapse
Thanks for this thread chiefy009!
I have tried all governors too (on Doom's kernel) and I have different experience to yours, so I thought I'd share.
For me, interactive/ondemand/smartass make the phone VERY choppy, especially while scrolling lists!
On the other hand, minmax gives me the smoothest and fastest results.
And I thought that jumping from Deep Sleep/MIN frequency to MAX frequency, without intermediate steps, would kill my battery but, to my amazement, battery life is very very good, I might say better than any other governor.
When I was using minmax as a module to the stock kernel, I got reboots too,
but since Doom integrated it into his kernel, it's stable as rock!
This is the info I found about this governor:
MinMax Governor (Battery Saver)
This governor will try to minimize the frequency jumps/changes which cause voltage spikes/changes and supposedly drain more battery life
Click to expand...
Click to collapse
Just my 2 cents!

My_Immortal said:
Thanks for this thread chiefy009!
I have tried all governors too (on Doom's kernel) and I have different experience to yours, so I thought I'd share.
For me, interactive/ondemand/smartass make the phone VERY choppy, especially while scrolling lists!
On the other hand, minmax gives me the smoothest and fastest results.
And I thought that jumping from Deep Sleep/MIN frequency to MAX frequency, without intermediate steps, would kill my battery but, to my amazement, battery life is very very good, I might say better than any other governor.
When I was using minmax as a module to the stock kernel, I got reboots too,
but since Doom integrated it into his kernel, it's stable as rock!
This is the info I found about this governor:
Just my 2 cents!
Click to expand...
Click to collapse
Thank you for getting involved, if you have time could you post all your findings on your usage of the governors ?

chiefy009 said:
Thank you for getting involved, if you have time could you post all your findings on your usage of the governors ?
Click to expand...
Click to collapse
Sure thing!
I am on Doom's kernel, which I believe includes all the available governors so far.
Scary Governor
Description coming from the author:
A new governor I wrote based on conservative with some smartass features, it scales accordingly to conservatives laws. So it will start from the bottom, take a load sample, if it's above the upthreshold, ramp up only one speed at a time, and ramp down one at a time. It will automatically cap the off screen speeds to 245Mhz, and if your min freq is higher than 245mhz, it will reset the min to 120mhz while screen is off and restore it upon screen awakening, and still scale accordingly to conservatives laws. So it spends most of its time at lower frequencies. The goal of this is to get the best battery life with decent performance. It will give the same performance as conservative right now, it will get tweaked over time.
Click to expand...
Click to collapse
Performance suffers, in my opinion.
It scales the CPU conservatively, so it is very annoying when playing games
or even syncing to get your Gmails.
Also, and this applies to all governors, speed is decreased when the sampling rate is high. Which means that if the CPU constantly checks for load in order to increase/decrease frequency, that will take its toll both to performance and battery life.
Smartass - Interactive - Ondemand
I am putting those 3 governors in the same category, because at least for me, they functioned very similarly.
What I noticed is that indeed the phone used almost all available frequencies before going to MAX, but the phone was laggy. Especially when scrolling in big lists, interactive and smartass gave me unacceptable performance. Ondemand was a tad better, but still, the phone seemed to "resist" scrolling for a few seconds and then go ahead and finally do it!
Battery life was pretty much the same as stock
(since ondemand is the default governor for stock kernel).
MinMax
As I stated in my previous post, minmax gave me the smoothest and fastest results.
This governor doesn't take intermittent load samples, when it first detects CPU load, aka you start using your phone, it jumps to the max frequency and stays there until you stop using it.
At this point, I want to express my opinion on the subject of "High Freq When Screen On", because many users complain about it, but I beg to differ.
In theory, CPU running at max frequency all the time, is heat generating and/thus battery consuming. Alas, be careful: in theory...
Because practically, when you use your phone, you usually do CPU demanding tasks.
When the phone is in my pocket/bag/drawer/whenever doing nothing, I want to be in Deep Sleep.
When I turn it on to look at the time of if there's any new notification, that lasts 30 secs - 1 minute. What frequency will be used then, is not that important.
When I turn it on to actually do something, I want it to be FAST.
If I can scroll a list faster, if I can open an app faster, then I will be using the phone for less time.
If the CPU is sampling and scaling up conservatively, the phone will be laggy
and I will need more time to accomplish my tasks.
All in all, I am not intimitaded by high frequencies while using the phone.
I would start worrying if I got no Deep Sleep -which isn't the case fortunately.
And my battery life is amazing, I get about 1 day and a few hours more,
with pretty heavy use.
Just my 2 cents on the matter.
Powersave
If you are ever really mad at your X10 and you want to see it struggle and suffer, then this is the governor for you! Enough said!
Performance
Pretty snappy, good for gaming and benchmarking, as it uses only MAX frequency. Not for prolonged use though, because it will ONLY use the max frequency (and Deep Sleep of course).
I'll make sure to make more tests in the future and post more thorough reviews!
Again, thanks for this thread chiefy009!!

My_Immortal said:
Sure thing!
I am on Doom's kernel, which I believe includes all the available governors so far.
Click to expand...
Click to collapse
Are you playing with the voltages at all ? if so could you record your findings for everyone ?
I am currently working through the governor list and then plan on trying to level out some voltages which work well

chiefy009 said:
Are you playing with the voltages at all ? if so could you record your findings for everyone ?
I am currently working through the governor list and then plan on trying to level out some voltages which work well
Click to expand...
Click to collapse
I have undervolted my phone using these values:
128000 Hz - 875 V
192000 Hz - 900 V
245760 Hz - 925 V
384000 Hz - 950 V
460800 Hz - 975 V
576000 Hz - 1000 V
652800 Hz - 1050 V
768000 Hz - 1100 V
844800 Hz - 1150 V
921600 Hz - 1200 V
998400 Hz - 1250 V
The phone runs pretty stable, didn't have a single reboot or WLOD so far (3 days).
Xperia X10i via Tapatalk

I will try those settings for undervolting
Smartass Update
This governor is working wonders for me at the minute, phone been online for 6hours, medium/light usage 128-1132mhz few calls, connected to bluetooth speaker in car, little web usage and twitter and the battery is still on 88%
That is impressive

Related

[TUT] SetCPU and Advanced Settings

I've been using setcpu for a while now, but have never bothered to mess with the advanced settings. Searching around I have only found out what most of this stuff means, but I'm missing some still. I thought I would share my findings. I have included SetCPU's descriptions (in italics) supplemented with my findings.
Governor choices (I'm using king's bfs kernel #1 on fresh 3.1.0.2) -
Ondemand - Uses the highest frequency when tasks are started, decreases step by step
Conservative - Increases frequency step by step, decreases instantly
Interactive - I couldn't figure this one out... any help?
Powersave - Uses the lowest possible clock speed to complete its tasks
Userspace - Manual controll of the frequency
Performance - Always uses the highest clock speed
Advanced Settings -
Sampling Rate - An interval (in microseconds) at which the governor will poll for updates. When this happens, the governor will decide whether to scale the CPU up or down. It uses such little power that it is better at lower values when using profiles such as screen off.
Up Threshold (1%-100%) - Defines a percentage from 1% to 100%. When the CPU load reaches this point, the governor will scale the CPU up. When using low min values (245), this happens instantly, using higher values (768) it overclocks less often. With Conservative lower values are better because it slowly increases your clock speed to what you need, with Ondemand, higher is better, as it overclocks less often.
Down Threshold (1%-100%) (conservative only) - Defines a percentage from 1% to 100%. When the CPU load reaches this point, the governor will scale the CPU down. Higher values will offer more aggressive battery saving, lowering the clock speed quicker.
Ignore Nice Load (0/1) - If this value is "1," the system will ignore "Nice" processes when deciding to scale up or down. I need a little more info for this one, what exactly is a nice process? DO NOT GOOGLE 'NICE LOAD' ESPECIALLY AT WORK OR AROUND CHILDREN/WIFE
Freq Step (0%-100%) (conservative only) - Defines how much (as a percentage of the maximum CPU speed) the conservative governor will increase the CPU speed by each time the CPU load reaches the Up Threshold. Increased the value slightly to be able to overclock quicker, but not to high to avoid unnecessary overclocking.
Powersave Bias (0-1000) (ondemand only) - Setting this value higher will "bias" the governor toward lower frequencies. This is a percentage, where 1000 is 100%, 100 is 10%, and 0 is 0%. The ondemand governor will scale the CPU to a frequency lower than its "target" speed according to this value. Gives ondemand some more battery saving potential. High values give worse performance than conservative with equal or worse battery saving. If you want the performance of ondemand with some more battery use values under 200.
I hope this info was helpful to someone, and here are my setcpu settings. I have attempted to target 150-175ms for short and 350-400ms for long benchmarks to match my performance governor and save battery at the same time.
With ondemand I get about 170ms short and 380ms long. I use 90 for up and 50 for powersave. The performance is slightly better than the default settings, and the battery is about equal. I might play with this more, as it should hit the same values as performance with better battery life.
In conservative long benchmarks in setcpu are actually faster than short ones because it takes setcpu time to adjust the speed. Run a short one immediately after a long one to see its actual value. Up changed 75 and down to 25, not much of a change, but drastic performance increase with no battery change. I also increased freq step to 10% to obtain higher speeds faster. Getting the same 170ms short and 370ms long.
My Settings
Conservative 245-1190
Temp > 50C - 768 conservative
Screen Off - 499 ondemand (allows for the screen to be unlocked faster, especially useful with incoming calls)
Charging/Full - 1190 performance
Battery < 15% - 652 conservative
Sampling - 200000
Up Thresh - 75
Down Thresh -25
Ignore Nice - 0
Freq - 10
More DFS Info
SetCPU Info
davebu said:
DO NOT GOOGLE 'NICE LOAD' ESPECIALLY AT WORK OR AROUND CHILDREN/WIFE
Click to expand...
Click to collapse
LMAO 10chars
HondaCop said:
LMAO 10chars
Click to expand...
Click to collapse
Yeah. I almost spit out my Vanilla Coke on that one. LOL
Anytime have any info about nice load or anything to add?
Sent from my HTC EVO 4G.
HondaCop said:
LMAO 10chars
Click to expand...
Click to collapse
I missed this yesterday... Post of the day in my opinion
Thanks dave...good write up
This is what I found about the interactive governor in github:
cpufreq: interactive: New 'interactive' governor
New interactive governor.
This governor is designed for latency sensitive workloads, UI interaction for
example.
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.
Existing governors sample cpu load at a particular rate, typically
every X ms. Which can lead to under powering UI threads when the user has
interacted with an idle system until the next sample period happns.
The 'interactive' governor has a different approach. Instead of sampling the cpu
at a specified rate, the governor will scale the cpu frequency up when 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 100% busy from exiting idle to when the timer
fires then we assume the cpu is underpowered and ramp to MAX speed.
If the cpu was not 100% busy, then the governor evaluates the cpu load over the
last 'min_sample_rate' (default 50000 uS) to determine the cpu speed to ramp down
to.
There is only one tuneable for this governor:
/sys/devices/system/cpu/cpufreq/interactive/min_sample_rate:
The minimum ammount of time to spend at the current frequency before
ramping down. This is to ensure that the governor has seen enough
historic cpu load data to determine the appropriate workload.
Default is 5000 uS.
Also, in the original application thread as explained by the dev, "nice" processes are:
2. Nice processes are used by the IO scheduler to designate a low-priority process. Ignore nice load basically tells ondemand to disregard processes with higher nice values.
Good topic. You covered the bases pretty well. Glad someone finally put this together as it is useful to know. Now prepare for 1000 threads in the next month asking for the information you just posted.
hey question. i went and purchased SetCPU and attempted to follow your instruction. problem is, whenever SetCPU tries to gain super user permission, it says "no root access granted. Are applications allowed root access?" i dunno what to do. can someone advise me?
Umm, is your phone rooted?
Sent from the void...
Yessir. Since day 2 ^_^ (plus its in my sig)
Sent from my Evo using Tapatalk
SilverStone641 said:
Yessir. Since day 2 ^_^ (plus its in my sig)
Sent from my Evo using Tapatalk
Click to expand...
Click to collapse
Try uninstalling and reinstalling it.
Then double check all of your superuser settings.
SilverStone641 said:
Yessir. Since day 2 ^_^ (plus its in my sig)
Sent from my Evo using Tapatalk
Click to expand...
Click to collapse
Sorry, using the xda app which doesn't display the sig.
Sent from the void...
So, as far as speed/responsiveness of governors goes:
Fastest ------------------------------------------------------> Slowest
Performance ------> ondemand ------> Interactive? ------> Conservative
Poor battery consumption --------------------> Best battery consumption
This thread is exactly what i was looking for, thanks for the detailed explanation of the what and why.
Will try it out this week with Fresh 3.1 and KK#8.
this thread helped a lot, i was just in setCPU messing around with things, now i can use this thread to help get what i want. i bookmark'd the hell out of this thread
Thanks...OP...hopefully people will read it first...try things..then ask questions...
I am still working to see how to get the best battery life from cm6 and snap..
Thanks for the helpful post!
I experienced a "nice load" when I unboxed my EVO. Anyway the only setting I use is:
Screen off: 245/128 on demand.
Works for me. And thanks for this helpful post to help us understand all that technical mumbo jumbo.
So I got a rooted Vanilla install of the latest Sprint OTA Froyo build on my EVO. (the 3.29.651.5 build).
I purchased the latest version of SetCPU (2.03) last night and used the autodetect method for the CPU governor.
I notice on my EVO that I only have these 3 options:
Scaling:
ondemand, userspace and performance....
Is this normal to not have the conservative setting since I have the defacto kernel with a vanilla rom?
Thanks
Sheldon
Okay, so I figured it out, my default kernel does not have these other options, oh well......
Nice app though, so far its working really well.

[REF] CPU Governors and I/O Schedulers

Spreadsheets for CPU Governors and I/O Schedulers
GOVERNOR RESULTS
I/O SCHEDULERS
Summary of the Results
This is a summary of the six most commonly used governors, listed in order of performance.
Best Performing
#1 - Performance
--- : Use Noop or Deadline
--- : Uses a lot more battery
#2 - SmartassV2
--- : Use Noop or SIO
--- : Good choice if you use a lot of CPU intensive apps
#3 - LulzactiveV2
--- : Use Deadline or Noop
--- : Good choice if you use a lot of CPU intensive apps
--- : Uses a little more battery than SmartassV2
#4 - Lazy
--- : Use Deadline or CFQ
--- : Do not enable SOMF (Screen Off Max Frequency uses more battery)
--- : Good choice if you do not use CPU intensive apps
#5 - Ondemand
--- : Use Noop or Deadline
--- : Good choice if you do not use CPU intensive apps
--- : Saves slightly more battery than Lazy
#6 - Conservative
--- : Use CFQ or Noop
--- : Generally one of the worst governors for saving battery, see next post for why.
Check my summary in the Battery Drain thread for more info about how to save battery.
Where did the other benchmarks go?
All ICS ROM Benchmarks: this thread
Kernel Features and Benchmarks: this thread
Battery drain: this thread
Power Saving Governors: this thread
Thanks to all the developers.
Conservative Not Saving Power?
chickelnoodensoup said:
Is the summary in the first post correct with regard to conservative? Is it really "Generally one of the worst governors for saving battery"? Interesting.
Click to expand...
Click to collapse
I know it seems a little odd. It's because a lot of developers seem to have tweaked conservative to make it feel snappier, but it has resulted in more CPU time at the top frequency.
If you take a look at my new spreadsheet: http://goo.gl/ThVzX
...you can see conservative always uses more power when the screen is on (at least for the four kernels I tested).
There is just one exception where conservative saves more power than other governors, and that is when the screen is off, music is on, deep idle is on, and this only applies specifically to Air Kernel. PLEASE NOTE: Steve Garon does not include deep idle, but is working on it, neither does Eugene, but I've asked him to consider it. For these two kernels, if you are listening to music with the screen off, currently, the best power saving governor is Ondemand.
For people who don't use their phone while off, and don't use many intensive apps, Ondemand is the best power saving choice.
For people who use a lot of CPU intensive apps, SmartassV2 will be the better choice. It will scale more agressively, help prevent lags, and save energy being wasted through these delays.
If you listen to music with the screen off, and your kernel supplies deep idle, the best power saving governor is SmartassV2 (except for the case of Air Kernel, see above). This is because it keeps the CPU close to the most efficient frequency: 400MHz.
I hope that covers anything. If I've made any glaring errors in my reasoning, please let me know.
Choosing a Governor
Variety is the spice of life, so try them all! While Mathkid95 swears by Ondemand, developers Eugene373, morfic, and steve.garon all vetted this work and agreed that the highest performing CPU governor is likely to offer battery savings through the race-to-idle principal. Eugene added that finding the right I/O scheduler to combine with your governor will make a big difference too. Extra thanks to Steve for providing the kernel on which I based this test, and all his valuable input! The I/O scheduler for the test was cfq, and note: governors have settable parameters which may vary between developers.
Choosing a Scheduler
I/O schedulers perform differently depending on the governor you are using. I've investigated this using the six most popular CPU governors (vote here) vs the six available I/O schedulers in Eugene's kernel, and the four available in r_data's kernel. All governors are based on either ondemand, interactive, or conservative. Recommended reading is available here: schedulers also for governors
Schedulers tested against these popular governors:
SmartassV2 - interactive variant, and winner of the governor test.
LulzactiveV2 - interactive variant
Lazy - Ezekeel's governor, ondemand variant
Performance - included as a reference for high scores
Ondemand
Conservative
Testing Methodology
To test the kernels I want a fair environment, so any differences in the results are down to the kernel, and nothing else. To achieve this I first make sure I have a clean system:
1) Format /system and /cache and wipe dalvic
2) Install the ROM, install the kernel
3) Boot up, use nstools to select deadline for I/O scheduler
4) Then select a CPU governor and I/O scheduler depending on the test at hand
5) Titanium Backup to restore all my benchmark programs (app only). Set everything to off, no gps, no sync, no BT, airplane mode. Force GPU rendering is selected. Wifi is on for connecting to the benchmark servers. A power adaptor is in use so the battery is always full.
Then I begin testing.
For the CPU Governor Comparison study:
6) Power off and power back up. When lock screen arrives, wait one minute to settle the system, i.e. until screen auto-off. Count to three. Unlock, and begin testing, recording all scores. Start over with all the tests. Record those scores. (I now have two sets of scores for all the benchmarks to create a mean for improved accuracy). Then select next governor, power off and on, and start the cycle again.
For the I/O Scheduler Comparison study:
6) Power off and power back up. For each new scheduler I completed one test which I did not record, just to ensure that the program was properly cached in the system. I then recorded the subsequent ten results. After ten results, I would select the next scheduler, until I had finished all six, then I would also select the next governor and go back to the first scheduler. I repeated this cycle until I had collected data for performance, and the three other main governor types.
Statistics in the scheduler study are a little different to the other tests. They combine overall performance scores with overall variance scores (where lower is better). The formula is
a= Database IO score - 3 standard deviations
b= Write speed - 3 standard deviations
c= Read speed - 3 standard deviations
score=(a*b*c) to the power of 1/3
If you multiply three values together, and take the cube root (same as raising to 1/3) then you arrive at the geometric mean. This type of mean allows the comparison of two different schedulers based not just on their performance, but also how consistent in that performance they are. That score is then compensated by adjusting by half of the percentage discrepancy between the mean and median. For most scores that is an adjustment of less than 1%.
Summary of the Results
SmartassV2 won the governor benchmarks, and also performed well in the battery drain benchmarks.
The best I/O scheduler to combine with this is noop.
This is the combination I personally prefer. However, this is merely my opinion, based on my tests. Mathkid95 prefers ondemand. At the time of writing, Steve Garon and Franco prefer their own tweaked versions of conservative. (My tests indicate CFQ is the best match for conservative.)
Nice work on this!
bedalus said:
Summary of the Results
SmartassV2 won the governor benchmarks, and also performed well in the battery drain benchmarks.
The best I/O scheduler to combine with this is noop.
This is the combination I personally prefer. However, this is merely my opinion, based on my tests. Mathkid95 prefers ondemand. At the time of writing, Steve Garon and Franco prefer their own tweaked versions of conservative. (My tests indicate CFQ is the best match for conservative.)
Click to expand...
Click to collapse
Im also prefer smartassv2+noop. Really good combination
Very usefull, Thanks
Surnom said:
Very usefull, Thanks
Click to expand...
Click to collapse
No problem. If anyone is wondering why so few posts, it's because I recently separated this work away from my kernel benchmarking thread. Feel free to feedback.
bedalus said:
Summary of the Results
SmartassV2 won the governor benchmarks, and also performed well in the battery drain benchmarks.
The best I/O scheduler to combine with this is noop.
This is the combination I personally prefer. However, this is merely my opinion, based on my tests. Mathkid95 prefers ondemand. At the time of writing, Steve Garon and Franco prefer their own tweaked versions of conservative. (My tests indicate CFQ is the best match for conservative.)
Click to expand...
Click to collapse
Never kneww that SmartassV2 works best with noop! I used to have it with deadline. Now experiencing the best experience ever!
using Franco BFS Nov 1st
Thanks man! Thanks Franco!
SmartassV2/Noop +1
UPDATE: Steve had a rethink of his Conservative governor parameters, and I've updated the table to include this. Check column L.
Lower scores are natural with conservative. This time, with the new parameters, the scores are even lower. This indicates that the new conservative is throttling the frequencies more aggressively, but it should also be noted that this governor feels much more responsive than the previous incarnation.
Note - the IO score shows a great improvement, but this is due only to a boost in database IO through the recent FSYNC patch. Make sure you use stable voltages to avoid reboots and potential data loss. (No benefit to UV anyway - check the results of my battery study, see link above.)
thx mate! You do a great job!
Sent from my Nexus S using Tapatalk
Some serious work been put into this.. Anyway of listing governors in respect of there performance then a list of governors for best battery life and the recommended I/O schedulers to accompany them. I know the graph is there but it'll be easier for people like me (not so good with cpu settings) to just simply apply from a high to low list which indicates best performance or more battery life. I'm getting great battery life and decent performance using ondemand with noop but it eats battery a lot more when phone is in use compared to other combinations I've tried.
Sent from my HTC Desire S using XDA App
bedalus said:
Summary of the Results
SmartassV2 won the governor benchmarks, and also performed well in the battery drain benchmarks.
The best I/O scheduler to combine with this is noop.
Click to expand...
Click to collapse
Is it just me or does the spreadsheet say deadline is best with SmartassV2 with noop second?
dabado said:
Some serious work been put into this.. Anyway of listing governors in respect of there performance then a list of governors for best battery life and the recommended I/O schedulers to accompany them. I know the graph is there but it'll be easier for people like me (not so good with cpu settings) to just simply apply from a high to low list which indicates best performance or more battery life. I'm getting great battery life and decent performance using ondemand with noop but it eats battery a lot more when phone is in use compared to other combinations I've tried.
Sent from my HTC Desire S using XDA App
Click to expand...
Click to collapse
Good idea. I will try to do it today.
kernels ; battery ; ROM ; gov/sched
Thaks to your recommend, I use noop + SmartassV2.
I used cfq+tweaked conservative before that set, but I can't feel differece and battery life (I don't know this phrase mean but I'm saying it is very good!)
UPDATE: First post edited. Now summarises all findings. Also, makes it easier to read if you are using the XDA app
Thank you !
Bedalus, I did a little amateur test today.
I played some music with not-too-loud volume.
I keep my data ON, everything else is off.
The screen is always ON with lowest brightness because I'm looking at the CPU frequency used.
CPU min 200, max 1000.
I went to Processor settings and look at the CPU frequency used at the moment.
When I selected Conservative and let it stay for 10 seconds, the CPU freq is showing 1000 constant.
Then I selected Lazy and let it stay for another 10 seconds, the CPU freq is 400 constant.
With SmartassV2, let it stay for 10 seconds, the CPU freq is randomly jumping from 200, 400 and sometimes 1000.
Well my question is, shouldn't Conservative be constantly using the lowest frequency among the other governors?
From what I saw it is Lazy which constantly used the lowest.
What do you think?
I know this test is not reliable at all, so sorry if it's just a waste of time.
glennkaonang said:
Bedalus, I did a little amateur test today.
I played some music with not-too-loud volume.
I keep my data ON, everything else is off.
The screen is always ON with lowest brightness because I'm looking at the CPU frequency used.
CPU min 200, max 1000.
I went to Processor settings and look at the CPU frequency used at the moment.
When I selected Conservative and let it stay for 10 seconds, the CPU freq is showing 1000 constant.
Then I selected Lazy and let it stay for another 10 seconds, the CPU freq is 400 constant.
With SmartassV2, let it stay for 10 seconds, the CPU freq is randomly jumping from 200, 400 and sometimes 1000.
Well my question is, shouldn't Conservative be constantly using the lowest frequency among the other governors?
From what I saw it is Lazy which constantly used the lowest.
What do you think?
I know this test is not reliable at all, so sorry if it's just a waste of time.
Click to expand...
Click to collapse
It sounds like quite an interesting test. I'm surprised at the conservative result. Which kernel are you on?

[Poll] AbyssNote Kernel * Favorite Governors *

Well I am sticking to one Rom and that's Crisekelo's like in my good 'n old sgs froyo times, but I like to test various kernels, when I have time...
Anyway I never saw a Mod Kernel with so many governors as the AbyssNote kernel, which I am testing right now..
Since there are many users out there that unlike me, already own the GNote for a long time and are way more experienced than me with this particular Kernel, I decided to start this Poll-thread so users can vote on their favorite governor and prehaps elaborate a little about it..
Thanks in advance..
Since Abyss Kernel is not working for my Note (overheat), I' at FM kernel with SavagedZen governor and vr I/0 Scheduler, butter smooth and stable, goes to deep sleep as it supposed to, sharp performance and moderate battery life. I know you prefer Abyss but just wanna let you know how the other kernel is working.
When I was on Abyss I was using abyssplug governor with and without undervolting. Hope you can get Abyss work for you, if you manage to do it without overheat I would appreciate any info.
have fun!
Oops ... you reacted fast ! The poll was not even ready
At the moment I don't prefer any kernel ( Only the rom) and on a device such as the GNote, I have a hunch that we dont need a super-optimized kernel with tons of iterations and that's why I always keep CF-Root and Speedmod handy, but I like the dedication and availability of AbyssNote developer, so I am giving it another try...
Since I have not enough time to play with the GNote as I did with the sgs, I am hoping that the AbyssNote users will give this specific input ....
iceangel1980 said:
"... Abyss Kernel is not working for my Note (overheat), I' at FM kernel with SavagedZen governor and vr I/0 Scheduler, butter smooth and stable, goes ..."
Click to expand...
Click to collapse
Hi betoNL,
just give the Abyss Kernel v3.7 another try. I am really satisfied with ABYSSPLUG governor and the SIO scheduler - great balance between performance and battery life. And it is also butter smooth and stable without any overclocking indeed ;-)
To be honest: I can't understand your problem with overheating. It could have its seeds in an app with unnormal behaviour or a constant hang-up in the background. Maybe you will execute this little turnaround at the next opportunity:
1. Charge your battery to 100%
2. Use a Taskkiller and kill every open task
3. Reboot in Recovery Mode and wipe voltage & battery stats (DON'T WIPE ANYTHING ELSE, PLEASE!)
4. Reboot yours system...
Best regards
[bs]
---------- Post added at 05:53 PM ---------- Previous post was at 05:50 PM ----------
Hi,
great poll... my vote goes to the abyssplug ;-)
Would be interesting to add users choice of the I/O scheduler.
What do you think about that little improvement?
Best regards
[bs]
As I said, I recommend AbyssPlug
I don't understand how abyssplug works. So I don't use it.
I do use lulzactive because it uses mostly my lowest frequency which drains battery the least when not stressed and highest frequency when stressed and basically ignores everything in between. It's been great.
can someone explain how abyssplug works? I've been searching, it only says modified hotplug. That doesn't tell me much.
Originally Posted by mancman
here the exact explanation on RootzWiki:
Wheatley governor
in short words this govenor is build on "ondemand" but increases the C4 state time of the CPU and doing so trying to save juice....
The known ones are really good described here one the setcpu page:
the rest is nice described here:the rest is nice described here:
lazy (http://forum.xda-developers.com/show....php?t=1276092) - is ondemand but with an added option to stay longer on a certain frequency. This is due to the fact that some CPU's dont like too quick freq changes when sampling rate for decision making is set too low. See link for more.
lulzactive (http://tegrak2x.blogspot.com/2011/11...vernor-v2.html) - is basically interactive governor with added smartass bits and variable (as opposed to fixed amout) frequency scaling, based on currently occuring cpu loads. Has, like smartass, a sleep profile built-in. See link for details on exact scaling.
lagfree (http://forum.xda-developers.com/show....php?t=1272933) - seems to be ondemand but with a lessend tendency to ramp up to 100% but rather also use steps available in between 0-100%.
intellidemand (freely translated from http://www.android-hilfe.de/root-hac...-governor.html) - behaves like ondemand when the system is under heavy use, it behaves differently when the system is mostly ideling. That mode is colled "browsing mode" or "browser mode" or whatever. It seems to be some sort of "intelligent" demand sensing/analysing ondemand governor.
smartassV2 - this one should be known. It's the same as smartass(V1) but tweaked. Same code author. I heard one should use smartassV2 instead of smartass when available.
ondemandx - is ondemand with an added sleep profile built-in. I believe all ...X kernels are the default kernels but with an added sleep profile.
AbyssPlug Governor:
Abyssplug governor is a modified hotplug governor
>>Hotplug Governor:
The "hotplug" governor scales CPU frequency based on load, similar to
"ondemand". It scales up to the highest frequency when "up_threshold"
is crossed and scales down one frequency at a time when "down_threshold"
is crossed. Unlike those governors, target frequencies are determined
by directly accessing the CPUfreq frequency table, instead of taking
some percentage of maximum available frequency.
The key difference in the "hotplug" governor is that it will disable
auxillary CPUs when the system is very idle, and enable them again once
the system becomes busy. This is achieved by averaging load over
multiple sampling periods; if CPUs were online or offlined based on a
single sampling period then thrashing will occur.
Sysfs entries exist for "hotplug_in_sampling_periods" and for
"hotplug_out_sampling_periods" which determine how many consecutive
periods get averaged to determine if auxillery CPUs should be onlined or
offlined. Defaults are 5 periods and 20 periods respectively.
Otherwise the standard sysfs entries you might find for "ondemand" and
"conservative" governors are there.
__________________
After goin thru this thread I tried the AbyssPlug governor.
And indeed its good so far.
Me likes!!!!!!!!!
Sent from my GT-N7000 using xda premium
My choice is lulzactive.
Most important things for me are smoothness, fast wake&unlock and gaming performance. I don't care about the battery life that much so it seems a perfect choice for me.
pjm77 said:
My choice is lulzactive.
Most important things for me are smoothness, fast wake&unlock and gaming performance. I don't care about the battery life that much so it seems a perfect choice for me.
Click to expand...
Click to collapse
I like lulzactive, too!
What, no smartassv2 love here ? I found it at least as good as lulzactive for my usage.
My priorities - Fast response after sleep, smoothness, battery.
My governor choices on top were : SmartAssV2 (Currently using), AbyssPlus (Used it, liked it, later will compare to SmartAssV2) and Lulzactive (which is pretty good as well).
betoNL said:
Originally Posted by mancman
here the exact explanation on RootzWiki:
Wheatley governor
in short words this govenor is build on "ondemand" but increases the C4 state time of the CPU and doing so trying to save juice....
The known ones are really good described here one the setcpu page:
the rest is nice described here:the rest is nice described here:
lazy (http://forum.xda-developers.com/show....php?t=1276092) - is ondemand but with an added option to stay longer on a certain frequency. This is due to the fact that some CPU's dont like too quick freq changes when sampling rate for decision making is set too low. See link for more.
lulzactive (http://tegrak2x.blogspot.com/2011/11...vernor-v2.html) - is basically interactive governor with added smartass bits and variable (as opposed to fixed amout) frequency scaling, based on currently occuring cpu loads. Has, like smartass, a sleep profile built-in. See link for details on exact scaling.
lagfree (http://forum.xda-developers.com/show....php?t=1272933) - seems to be ondemand but with a lessend tendency to ramp up to 100% but rather also use steps available in between 0-100%.
intellidemand (freely translated from http://www.android-hilfe.de/root-hac...-governor.html) - behaves like ondemand when the system is under heavy use, it behaves differently when the system is mostly ideling. That mode is colled "browsing mode" or "browser mode" or whatever. It seems to be some sort of "intelligent" demand sensing/analysing ondemand governor.
smartassV2 - this one should be known. It's the same as smartass(V1) but tweaked. Same code author. I heard one should use smartassV2 instead of smartass when available.
ondemandx - is ondemand with an added sleep profile built-in. I believe all ...X kernels are the default kernels but with an added sleep profile.
AbyssPlug Governor:
Abyssplug governor is a modified hotplug governor
>>Hotplug Governor:
The "hotplug" governor scales CPU frequency based on load, similar to
"ondemand". It scales up to the highest frequency when "up_threshold"
is crossed and scales down one frequency at a time when "down_threshold"
is crossed. Unlike those governors, target frequencies are determined
by directly accessing the CPUfreq frequency table, instead of taking
some percentage of maximum available frequency.
The key difference in the "hotplug" governor is that it will disable
auxillary CPUs when the system is very idle, and enable them again once
the system becomes busy. This is achieved by averaging load over
multiple sampling periods; if CPUs were online or offlined based on a
single sampling period then thrashing will occur.
Sysfs entries exist for "hotplug_in_sampling_periods" and for
"hotplug_out_sampling_periods" which determine how many consecutive
periods get averaged to determine if auxillery CPUs should be onlined or
offlined. Defaults are 5 periods and 20 periods respectively.
Otherwise the standard sysfs entries you might find for "ondemand" and
"conservative" governors are there.
__________________
Click to expand...
Click to collapse
Again, it's just a modified hotplug. What's modified about it?
betoNL said:
Oops ... you reacted fast ! The poll was not even ready
Click to expand...
Click to collapse
guess I was in chatty mood
BrainSex said:
\
To be honest: I can't understand your problem with overheating. It could have its seeds in an app with unnormal behaviour or a constant hang-up in the background. Maybe you will execute this little turnaround at the next opportunity:
1. Charge your battery to 100%
2. Use a Taskkiller and kill every open task
3. Reboot in Recovery Mode and wipe voltage & battery stats (DON'T WIPE ANYTHING ELSE, PLEASE!)
4. Reboot yours system...
Click to expand...
Click to collapse
Believe me I don't get it either and I'm pretty upset I can't use that kernel which is so valued by other android users. I was trying your advice and any other I could find in Abyss Kernel thread, nothing works for me. What is really funny I don't have any problems on other kernels. Well maybe I'm just unlucky this way. I'm thinking about getting my Note to Samsung for screen display exchange, so maybe they can do something about overheating too, maybe it's hardware related.
Thank you for your interest and advice
anyone using the app 2nd core and turning on dynamic hotplug?
It rly helps the battery
Might be useless to use along side abyssplug tho since it does the same thing
I use lulzactive, don't care about a little more battery drain
I use too 500mhz minimum speed @ 800mv, with it is pretty strange because 100 and 200 are not stable at that voltage and need 825, so having more speed I use less battery.
You don't use less battery because it's not only determined by voltage. Frequency us also a factor in power consumption, so 100MHz at 825 uses less battery for sure.
Sent from my superior GT-N7000 using Tapatalk
Zamboney said:
You don't use less battery because it's not only determined by voltage. Frequency us also a factor in power consumption, so 100MHz at 825 uses less battery for sure.
Sent from my superior GT-N7000 using Tapatalk
Click to expand...
Click to collapse
There's a post here somewhere here in the gnote forum that shows a study where they explain how 50 and 100MHz do consume more battery cause the CPU gets more stressed and takes longer to perform the task that would take less time and effort to accomplish at a higher frequency (or something like that)
Actually a higher frequency @ same voltage as a lower frequency would consume LESS battery because it will complete the task faster.
Sent from my GT-N7000 using Tapatalk
With my setup only ondemand really worked well, my second core scaling is always set to 2 cores enabled and I have a landscape setting for ADWex and any other governor will give me like 10-15fps when opening the app drawer.
Abyssplug fits my needs: I don't need so much power (no playstation-like games) but I use phone h24, from music to calls, from surfing to calendar/alarm...quite all stuff by BT headset and voice command. Battery drains slower than expected, my Note stays alive 'till night

[TWEAK][N.E.A.K][14.3.2012]Rock Solid Config v1.1 for Lulz/VC app + Guide

Right i am not going to bore you with long ass intros or long essays on how to do this and how to do that. All i did was share my results on a thread and people started messaging me about my settings and what configurations i use. So i will make it all simple for you. I am opening a thread so you can see what settings i am using and use it as a guide and adjust them or use my own settings if you want to get the best out of your battery and enjoy more your baby. Plus this thread is for you guys to stop private messaging me as i am getting loads of messages and hardly have time to reply to you all.​
First off and call it a disclaimer if you want, what WORKS on my phone might not work for yours. So as i said above, use my settings if you want, but if you have problems then tweak them to an effect your phone runs smoothly. Infact with my settings you get the balance of both worlds, Performance and battery life. But let me say this i am just providing you guys with my settings and what works for me. Now if you get any problems or errors which you should not do not come here crying as i have not forced these settings on anyone. The below settings are for people like myself who do not know how to use a script to tweak a governor, and by having this app makes life a lot easier and by me helping with my settings i hope it can provide the balance of good battery life and performance to people.
I know Geko95gek has his MagicConfig thread and my thread is different to his, as my thread is just to help people with the Lulzactive app settings and give them a guide on how to start and use it and how to get the best out off it. His is more to do with voltages of cpu and GPU. You can use his MagicConfig and use my Lulzactive apps settings if you want. Big shout out to him for his magic.
Please also follow the bottom link for a bit more in depth info on a How to guide for undervolting.(many thanks to Eric-filth)
http://forum.xda-developers.com/showthread.php?t=1532999
Anyway here are the settings that i use and please use as a guide:
Lulzactive app Settings:
inc_cpu_load: 75%
pump_up_step: 3
pump_down_step:2
screen_off_min_step: 4,@200MHz
up_sample_time: 50000
down_sample_time: 30000
debug_mode: 0
Setting up your Lulzactive app with your configurations:
To be able to use the above settings as already stated you need the Lulzactive application were it can be found here:https://play.google.com/store/apps/details?id=com.tegrak.lulzactive&hl=en.
Once you have installed it then you need to have Voltage Control which i recommend or any other cpu tuner program installed on your phone like(SetCpu, NoFrills, Tegrak OC) to be able to set lulzactive governor as default.
Once you have done that then go ahead and input my settings or your own. The exact way i have it laid out, is the same on the app.
Once you have done inputting the settings always make sure you have SET ON BOOT ticked.
Come out of the app and reboot. Wait for the phone to load up properly then go back into the application to make sure the settings have been set up properly and stayed. And that is it. :
​
Voltage Control Configuration:
*Governor: Lulzactive (of course)
*Scheduler: VR - Noop
Voltages​
1200Mhz - 1150mV
1000Mhz - 1050mV
800Mhz - 1000mV
500Mhz - 950mV
200Mhz - 900mV
100Mhz - 850mV​​
GPU Control​Low power state - High power estate​114Mhz - 950mV / 267Mhz - 1050mV​
Now i will present to you settings that you can use with a different governor and scheduler. Call this Rock Solid Config v1.1 if you like.​
Voltages
1200Mhz - 1175mV
1000Mhz - 1100mV
800Mhz - 975mV
500Mhz - 950mV
200Mhz - 850mV
100Mhz - 850mV​
GPU Control:​Low Power state: 133Mhz - 900mV
High Power State: 267Mhz - 1000mv
Scheduler: Noop
Governor: Conservative
Misc Tweaks: Ext4 Boost- Sched_Mc​
So there you have it. Those are my settings that i use currently with NEAK kernel and work like a charm for me. Feel free to use my configuration if you like but please consider that everyones phone is different. So feel free to use mine as a guide and either feel free to undervolt more if you like or if you find that you are getting freezes then up the steps by either 25mV or 50mv
Feel free to post your results here as i would like to know if my settings work or not and also your battery results to show if my settings actually do something towards your battery.
Just a few thanks in order as well i think:
Simone201: for his awesome kernel and configurator.
Tegrak: For his awesome lulzactive app(makes my life alot easier to tweak it this way instead of scripts)
Gokhanmoral: just for his siyah kernel and i have all the time in the world for that guy as he is a legend in my eyes
Geko95gek: for being just a crazy ass Yoda and providing everyone with his MagicConfig
GC and LeoMar75: For the awesome rom
So_ony: cause i have to say it was her idea behind this brainchild of a thread.
Droidphile: For his awesome thread regarding all the information you need regarding kernels
And to you all who keep pestering me for my settings this thread is for you guys.
Information on misc tweaks, plus my favorite governors and schedulers i recommend
Abit more info regarding what are the misc options in the NEAK configurator application. (Many thanks to Droidphile for all the information)
Q. "What are these modes: IDLE, LPA and AFTR?"
A. Between screen off and deep sleep states, there are some idle modes supported by cpuidle driver. They are IDLE aka Normal Idle, LPA aka Deep Idle and AFTR aka ARM Off Top Running. Race to idle by CPU is implemented for power management.
In IDLE state, CPU is not clocked anymore, but no hardware is powered down.
In deep idle (LPA),a state after IDLE, again, the cpu is not clocked anymore like we guessed but some parts of hardware are powered down. Deep idle brings in real power savings and there is no need of putting a hard limit to frequency during screen-off; using a screen-off profile. (Good practice is to use a governor with built in screen off profile, than using an user-configured screen-off profile by putting a hard limit on frequency). Deep idle is not used when device is entering deep sleep and also when device is woken from suspend/deep sleep. While entering/exiting DEEP IDLE, CPU is set statically to SLEEP_FREQ and is not clocked below or above until it exits this state.
AFTR is a patch to support Top=Off mode for deep idle. Level 2 cache keeps it data during this mode.
We can have IDLE or AFTR modes with LPA enabled or disabled. (Obviously it is not possible to have IDLE and AFTR together)
Values:
0: IDLE
1: AFTR
2: IDLE+LPA
3: AFTR+LPA
Q. "What idle modes are recommended for power saving? How do i change it"?
A. Recommended for power saving is to enable AFTR and LPA, ie value 3
Example:
echo "3" > /sys/module/cpuidle/parameters/enable_mask
Q. "What is sched_mc?"
A. Linaro team invented sched_mc or Schedule Multi Core to make process scheduling multi-core aware. ie, utilize both cores wisely to save power and balance performance. Even though sched_mc is sort of an alternative to cpu hot plugging, we can use sched_mc with the default hot plug mode.
Possible Values:
0 : No power saving load balance, default in our exynos4210 Soc.
1 : Fill one thread/core/package first for long running threads. In our single-CPU dual-core device, multithreading does not come into picture, so load balancing is almost redundant to hotplugging.
2 : Also bias task wake-ups to semi-idle CPU package for power savings. (Bias new tasks to cpu1 if cpu0 is mostly filled with running tasks). This is 'overloading' CPU0 first.
Q. "What value is recommended for sched_mc?"
A. 1) If you find advantages to sched_mc, use sched_mc=1 for a possible battery saving. Anyhow since load-balancing is reduntant on hotplugging, it may not have any advantage on exynos chip.
2) For performance use 2. But do remember that loading CPU0 and leaving CPU1 can not do justice to hitting deep idle states sooner since second core can not enter deep idle. So extra performance or no performance, value 2 will drain some more battery, in the context of delayed didle.
3) To do justice to hotplugging, use value 0.
Example:
echo "0" /sys/devices/system/cpu/sched_mc_power_savings.
Schedulers that i recommend to use. Again massive thanks to Droidphile for the information.
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.
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.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
Governors that i recommend to use. Information again by Droidphile.
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.
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.
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.
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.
Do not forget to enable the Lionheart tweaks you must have Conservative governor enabled through the configurator application and then select Lionheart tweaks
Links
*N.E.A.K kernel:
http://forum.xda-developers.com/showthread.php?t=1411788
*Droidphile thread regarding more info about governors and schedulers and more tweaks
http://forum.xda-developers.com/showthread.php?t=1369817
*Ext4 Optimization information
http://kernelnewbies.org/Ext4
*N.E.A.K Configurator App.
https://play.google.com/store/apps/details?id=com.neak.NEAK_Configurator
*If you want to try alternative settings from mine and try settings near stock default go to the following thread by Geko95gek and check his great thread out.
http://forum.xda-developers.com/showthread.php?t=1466017
And your voltage conttol settings??
Tapatalk on SGSII (Powered by CheckROM RevoHD V6, SiyahKernel 2.6.12 + MagicConfig 0.3.1, Modem KI4)
edwardeutsch said:
And your voltage conttol settings??
Tapatalk on SGSII (Powered by CheckROM RevoHD V6, SiyahKernel 2.6.12 + MagicConfig 0.3.1, Modem KI4)
Click to expand...
Click to collapse
start with the MagicConfig mate. That should be good enough.
Great thread to start tweaking with Lulzactive governor. Should make life easier for a lot of people, gives them the opportunity to gain extra battery juice without too many headaches.
geko95gek said:
Great thread to start tweaking with Lulzactive governor. Should make life easier for a lot of people, gives them the opportunity to gain extra battery juice without too many headaches.
Click to expand...
Click to collapse
Thanks mate. And with your magic config people can have the best of both worlds. Shame we can't merge the two...Anyway thanks mate much appreciated for your kind words
Why pump up 4 steps? For performance or? The rest of the settings i can see the meaning in, but why pump up four steps?
Else, awesome thread! God starting point for many!
Pennywice said:
Why pump up 4 steps? For performance or? The rest of the settings i can see the meaning in, but why pump up four steps?
Else, awesome thread! God starting point for many!
Click to expand...
Click to collapse
Thanks mate...For performance yes but also if you see the other settings you will see they are leaning more towards the battery side. Hence why i wanted to go for a balance between the two if that makes sense. I will be trying different settings and i will provide screenshots of my results and will provide the settings for each result i do.
Stifler69 said:
Thanks mate. And with your magic config people can have the best of both worlds. Shame we can't merge the two...Anyway thanks mate much appreciated for your kind words
Click to expand...
Click to collapse
i see you have listen to me and you have opened a new thread nice mate
so_ony said:
i see you have listen to me and you have opened a new thread nice mate
Click to expand...
Click to collapse
check OP
Stifler69 said:
check OP
Click to expand...
Click to collapse
oh how cute thanks hehe =) geko didn't answer my email :/
your description is short but everything is described very well !
so_ony said:
oh how cute thanks hehe =) geko didn't answer my email :/
your description is short but everything is described very well !
Click to expand...
Click to collapse
any ideas on how to get this thread going please let me know..and glad you liked my OP
so_ony said:
oh how cute thanks hehe =) geko didn't answer my email :/
Click to expand...
Click to collapse
So sorry for the delay. Please feel free to punish me.
I want understand one thing sorry my noobless.
What magic have in magicConfig from geko?
Enviado do meu nokia 3320 modificado por laboratório usando Tapatalk
great...now something to use when im on check and neak...nice work stiffy!!!
Good work Stifler, im trying your magic configuration and it Owns..!! Just right now im experiencing a little more battery drain against just the +conservative+lionheart+ext4+AFTR config.
Ill give it some days with full charge and check.
Stifler69 said:
Anyway here are the settings that i use and use as a guide:
Lulzactive app Settings:
inc_cpu_load: 95%
pump_up_step: 4
pump_down_step:1
screen_off_min_step: 4,@200MHz
up_sample_time: 20000
down_sample_time: 40000
debug_mode: 0
Click to expand...
Click to collapse
Out of curiosity what are the default Lulzactive settings on NEAK 1.4 compared to those above???
Those lulzactive setting seem to be replicated from ThunderBolt! ain't it. Down to the last setting :/
pikachu01 said:
Those lulzactive setting seem to be replicated from ThunderBolt! ain't it. Down to the last setting :/
Click to expand...
Click to collapse
Hey mate. Actually I have never seen you around on any posts sharing these settings or even opened thunderbolt scripts to see how you tweak lulz governor. I have nothing but for respect for you Pika as I see how great you thread is and how popular your scripts are. These settings that I am using are a start up from me from playing around with the app and sharing my findings with friends. If it brings offence to you I will bring it down. But I swear to you I have never used your scripts as one I do not how to use them and two I prefer apps to do the work for me as I hate to many scripts in my phone. I would love your help here if possible on what to help people though
eric-filth said:
I want understand one thing sorry my noobless.
What magic have in magicConfig from geko?
Enviado do meu nokia 3320 modificado por laboratório usando Tapatalk
Click to expand...
Click to collapse
well just take a look at his thread my friend. his voltage control settings are shared nearly by 700 users on xda and have reported nothing but good stuff from it. i do not want to share my settings as i Undervolt quite heavy so my settings would not work with most on here. so i used his thread for people who would ask for settings apart from my lulz app ones.
jermitano said:
great...now something to use when im on check and neak...nice work stiffy!!!
Click to expand...
Click to collapse
Thanks mate. first post settings are just a start up. i will be trying different settings with different kernels and still use Lulzactive as i want to show people my results and they can choose what settings to go for. i will always post a little review as well so users can decide which one to go for.
Honchay said:
Good work Stifler, im trying your magic configuration and it Owns..!! Just right now im experiencing a little more battery drain against just the +conservative+lionheart+ext4+AFTR config.
Ill give it some days with full charge and check.
Click to expand...
Click to collapse
You would get a bit of drain my friend but again it is all about how you have your phone setup and what settings in VC you are using. but hope the settings have some benefit for you though
kersey said:
Out of curiosity what are the default Lulzactive settings on NEAK 1.4 compared to those above???
Click to expand...
Click to collapse
not sure mate.

[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. There is also available tool for auto disable, ImproveG3​
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
20) Wheatley
21) Smartmax
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!
20) Wheatley
Building on the classic 'ondemand' governor is implemented Wheatley governor. The governor has two additional parameters:
target_residency - The minimum average residency in µs which is considered acceptable for a proper efficient usage of the C4 state. Default is 10000 = 10ms.
allowed_misses - The number sampling intervals in a row the average residency is allowed to be lower than target_residency before the governor reduces the frequency. This ensures that the governor is not too aggressive in scaling down the frequency and reduces it just because some background process was temporarily causing a larger number of wakeups. The default is 5.
Wheatley works as planned and does not hinder the proper C4 usage for task where the C4 can be used properly .
For internet browsing the time spend in C4 has increased by 10% points and the average residency has increased by about 1ms. I guess these differences are mostly due to the different browsing behaviour (I spend the last time more multi-tabbing). But at least we can say that Wheatley does not interfere with the proper use of the C4 state during 'light' tasks. For music playback with screen off the time spend in C4 is practically unchanged, however the average residency is reduced from around 30ms to around 18ms, but this is still more than acceptable.
So the results show that Wheatley works as intended and ensures that the C4 state is used whenever the task allows a proper efficient usage of the C4 state. For more demanding tasks which cause a large number of wakeups and prevent the efficient usage of the C4 state, the governor resorts to the next best power saving mechanism and scales down the frequency. So with the new highly-flexible Wheatley governor one can have the best of both worlds.
21) Smartmax
Its no benchmark or ultimate perfromance governor, its a proper balanced ondemand.
The basic idea - which comes from smartass - is the concept of an "ideal" frequency.
The following strategy is used:
1) If load is above upper-threshold and current frequency is below ideal freq
-> jump to ideal in one step
2) If load is above upper-threshold and current frequency is at or above ideal freq
->do "ramp up" steps which will include all frequencies for a specific
amount of time - so compared to ondemand no "jumping" to max frequency
3) if load is below lower-threshold and current frequency is below ideal freq
->do "ramp down" steps
4) if load is below lower-threshold and current frequency is above ideal freq
-> jump down to ideal in one step
All those thresholds ramp steps and frequency stepping times are
fully configurable using sysfs. By default I tried to create a good balance.
The ideal frequency for "us" is 475000 which is the maximal frequency
of the LP mode of the tegra chip. This will allow using LP mode as much as possible
Additional to make it "snappy" smartmax has "touch poke"
So input events from the touchscreen will boost the cpu for a specific
time to a specific frequency.​
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
Lets talk and share tips
Do you have a preference for governor and I/O? I'm coming from a rather old phone that didn't have most of these options. I think I've been using interactive and zen, which apparently wasn't even listed.
Ok so the best setting for governors and I/O control battery life and perfomance
veekay said:
Do you have a preference for governor and I/O? I'm coming from a rather old phone that didn't have most of these options. I think I've been using interactive and zen, which apparently wasn't even listed.
Click to expand...
Click to collapse
I am using SmartassV2 and noop.
TIP
For those who most of the day stay indoors and don't need a very bright screen like me, may install this xposed module, Minimum Brightness.
With this you can lower the minimum brightness of the screen beyond the usual value. It aids in saving quite some juice. :good:
Nice thread my frind!
I'm using this settings on Cloudy Rom and Rin Kernel:
GOV: Intellidemand 300/1,9 GHz
I/O: 4096/vr
MP off
Intelliplug on
GPU: simple_ondemand 578 MHz
UV MPU:
300 MHz = 675 mV
422 = 700
652 = 725
729 = 730
883 = 750
960 = 760
1036 = 770
1190 = 790
1267 = 800
1497 = 830
1574 = 840
1728 = 870
1804 = 885
1958 = 915
2112 = 945
2188 = 960
2342 = 990
2457 = 1010
2534 = 1025
2611 = 1040
2688 = 1055
2764 MHz = 1070 mV
Still testng as this is my second week with the device.
Saratoga79 said:
Nice thread my frind!
I'm using this settings on Cloudy Rom and Rin Kernel:
GOV: Intellidemand 300/1,9 GHz
I/O: 4096/vr
MP off
Intelliplug on
GPU: simple_ondemand 578 MHz
UV MPU:
300 MHz = 675 mV
422 = 700
652 = 725
729 = 730
883 = 750
960 = 760
1036 = 770
1190 = 790
1267 = 800
1497 = 830
1574 = 840
1728 = 870
1804 = 885
1958 = 915
2112 = 945
2188 = 960
2342 = 990
2457 = 1010
2534 = 1025
2611 = 1040
2688 = 1055
2764 MHz = 1070 mV
Still testng as this is my second week with the device.
Click to expand...
Click to collapse
Nice setup.
On first look it looks like stable setup.
DelBoy said:
Nice setup.
On first look it looks like stable setup.
Click to expand...
Click to collapse
Thanks buddy!
Yes it is pretty stable with no reboots or feezes. Also perfomance seems to be good enought and I haven't notice any lag.
This is my todays battery.
22% left. Used 75% with 19 hours on battery and SOT 5 hours for now.
During this 19 hours airplane mode was ON for like 6 hours during the night.
Results can get better. This is on V20A. I believe V20D will get me better results.
Wow! Really nice stats!!!
Do you have better battery on 5.0 or 4.4.2? I'm still on 4.4.2 but looking forward to jump to 5.0.
Saratoga79 said:
Wow! Really nice stats!!!
Do you have better battery on 5.0 or 4.4.2? I'm still on 4.4.2 but looking forward to jump to 5.0.
Click to expand...
Click to collapse
Early to judge, but it is the same I believe. Not much difference.
Updated post with few more governors
Very nice one
Would you mind adding a link to ImproveG3 to the "Bloatware" section?
Oh and I didn't change much cpu wise, just Amplify'ed Wakelocks RILK, NlpWakeLock and NlpCollectorWakeLock, device remains at 100% during night (~7-8 hours) without using airplane or turning off data/wifi/syncing
Don't have extremely many apps installed though, and set syncing intervals that make sense, depending on app/account.
Thank you very much.
Regards,
sub
@subworx - added
How can I use those governors I have Stweaks but can't find it there
Saratoga79 said:
Wow! Really nice stats!!!
Do you have better battery on 5.0 or 4.4.2? I'm still on 4.4.2 but looking forward to jump to 5.0.
Click to expand...
Click to collapse
For me 4.4.2 has a lot better battery life
AAA118 said:
How can I use those governors I have Stweaks but can't find it there
Click to expand...
Click to collapse
You need to have custom kernel that has that governors (Rin kernel, or ChupaChups).
After that use TricksterMod or CPUcontrol to change governors.

Categories

Resources