What's the diference between kernel governors? - Xperia Arc Q&A, Help & Troubleshooting

Hey guys, I would love to know what's the difference between the governos like: interactiveX, smartass, ondemand,userspace, powersave, conservative, performance, smartass2, lulzactive, lagfree, intellidemand and the others... Thanks!
Sorry for my bad english!

Governors all have different settings in them for e.g. performance would probably OC to a certain amount of Ghz and be used for gaming or powersave would be used for conserving battery so its Ghz would probably be dropped and screen time outs would be lowered
im not really a big fan of governors

Related

CPU Governers?

What's the difference between / features of:
Interactive
Conservative
Ondemand
Smartass
Smartassv2
Performance (is it run at the maximum?)
Powersave (is it run at the minimum?)
And does performance for each vary per kernel? What I mean is will, say, Interactive be better than Conservative on Incredikernel AOSP but worse on Tiny GB Sense?
pianoplayer said:
What's the difference between / features of:
Interactive
Conservative
Ondemand
Smartass
Smartassv2
Performance (is it run at the maximum?)
Powersave (is it run at the minimum?)
And does performance for each vary per kernel? What I mean is will, say, Interactive be better than Conservative on Incredikernel AOSP but worse on Tiny GB Sense?
Click to expand...
Click to collapse
ondemand
Available in most kernels, and the default governor in most kernels. When the CPU load reaches a certain point (see "up threshold" in Advanced Settings), ondemand will rapidly scale the CPU up to meet demand, then gradually scale the CPU down when it isn't needed. - SetCPU website
conservative
Available in some kernels. It is similar to the ondemand governor, but will scale the CPU up more gradually to better fit demand. Conservative provides a less responsive experience than ondemand, but can save battery. - SetCPU website
performance
Available in most kernels. It will keep the CPU running at the "max" set value at all times. This is a bit more efficient than simply setting "max" and "min" to the same value and using ondemand because the system will not waste resources scanning for the CPU load. This governor is recommended for stable benchmarking. - SetCPU website
powersave
Available in some kernels. It will keep the CPU running at the "min" set value at all times. - SetCPU website
userspace
A method for controlling the CPU speed that isn't currently used by SetCPU. For best results, do not use the userspace governor. - SetCPU website
Interactive
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.
SMARTASS GOVERNOR
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 245Mhz (or if your min frequency is higher than 245 - why?! - it will cap it to your min frequency). Lets take for example the 998/245 kernel, it will sleep at 245. No need for sleep profiles any more!
The performance for each can varry by kernel due to the fact that some devs slightly tweak the governors to their liking. Without any tweaking they should be the same accross all kernels.
Also note that tinys kernel has an interactive X governor and also a smartass 2 governor. These are basicky just tweaked versions of the original governor.
pianoplayer said:
What's the difference between / features of:
Interactive
Conservative
Ondemand
Smartass
Smartassv2
Performance (is it run at the maximum?)
Powersave (is it run at the minimum?)
And does performance for each vary per kernel? What I mean is will, say, Interactive be better than Conservative on Incredikernel AOSP but worse on Tiny GB Sense?
Click to expand...
Click to collapse
This is a good resource for governors. It is quite technical though. It doesn't include smartass though smartass is similar to smartassv2.
CPU Governors
Let me know if you still have questions after reading it.
The answer to your second question is no. The build of the governors are about 95% the same between kernels and with the exception of the smartass governors all those listed are stock android kernels.
Interactive should be smoother than conservative or ondemand but similar in performance to the smartass governors.
SmartassV2 is found to give the best performance/battery life combo across the board.
Edit: Good writeup cmlusco. In practice yes, smartassv2 is better all around I think. Interactive from Nexus S/Galaxy Nexus kernel source should be good but I've yet to be able to backport it to work on this phone property. It turns into a performance governor really.
And a side note. If the phone is actually in deep sleep state (reported by CPU Spy) the governor will not really matter then. Only time screen off matters is when it's awake but screen is off. Governor is most critical when screen is on really, so if you go for performance, screen on performance is what matters.
Edit 2: And I read some interesting viewpoints recently on maximizing battery that are different than the minimize CPU speed.

[Q] Lionheart govenor?

I did a google search and found no good simple explanation of the Lionheart governor. What exactly does it do in more simpler terms.
Is the battery life better than stock but with better performance?
Lionheart is a conservative-based governor which is based on samsung's update3 source. Tweaks comes from 1) Knzo 2) Morfic. 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 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.
Hope that helps
teambestyrandy said:
Lionheart is a conservative-based governor which is based on samsung's update3 source. Tweaks comes from 1) Knzo 2) Morfic. 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 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.
Hope that helps
Click to expand...
Click to collapse
Thanks but that is what I was talking about. I saw this definition on google but I can't understand that definition.
I just want to know where does Lionheart rank among the others in terms of performance and in terms of battery life (especially stock).
Right now I'm using Eugene's kernel with lionheart battery is great for me I get 13 to 15hours with good performance the other governor that would be good on batter is Brazilian wax and savages Zen those two are good to but I prefer lionheart ccause there's performance with good battery life better than stock in my opinion.
teambestyrandy said:
Right now I'm using Eugene's kernel with lionheart battery is great for me I get 13 to 15hours with good performance the other governor that would be good on batter is Brazilian wax and savages Zen those two are good to but I prefer lionheart ccause there's performance with good battery life better than stock in my opinion.
Click to expand...
Click to collapse
Brazilianwax and savagedzen are both derivatives of smartass, which doesn't work with our chipset. If you use any of those 3 your CPU frequencies will tend to stick at max value and not go down
yoft1 said:
Brazilianwax and savagedzen are both derivatives of smartass, which doesn't work with our chipset. If you use any of those 3 your CPU frequencies will tend to stick at max value and not go down
Click to expand...
Click to collapse
no they work fine...
Smartass & the other 2 have no issue with it sticking... however SmartassV2 does stick at Max speed.
eugene373 said:
no they work fine...
Smartass & the other 2 have no issue with it sticking... however SmartassV2 does stick at Max speed.
Click to expand...
Click to collapse
I stand corrected then
Lionheart vs. Interactive, Smartass, Brazillen Wax, Savage Zen?
Can anyone answer this?
How does its battery life and performance of Lionheart under typical usage compares to interactive's, smartass', brazillian wax's, and savage zen's?
You can just say something like, "Under normal and average use, Lionheart generally has a better battery life than abc and better performance than xyz."
h1a8 said:
Can anyone answer this?
How does its battery life and performance of Lionheart under typical usage compares to interactive's, smartass', brazillian wax's, and savage zen's?
You can just say something like, "Under normal and average use, Lionheart generally has a better battery life than abc and better performance than xyz."
Click to expand...
Click to collapse
bump

[-::REFERENCE::-] Kernel Governors Explained!

This post was not written by me, but by droidphile. I am sharing this here so that it's easier to find since this is a must read for every android/kernel enthusiast. Excellent work by droidphile. Thanks!
Most of us are flash maniacs, and we do it a lot. But after a kernel flash, we wonder:
Q. "OK i have flashed this xyz kernel. What're all these governors? How do i know which one is the best for me? How do i tweak them to bias their characters towards Battery-life/Performance/Balance between the Two".
Hope this thread could give you answers for all these questions. We're covering governors, modules, i/o schedulers that comes with Siyah kernel, plus more. That should cover almost all the popular governors/modules/io schedulers! Many people seem to get lost in Kernel dev threads without getting answers about governors and such.
The info in this thread holds good for non-siyah kernel users too. You should find here, info on most of the governors/modules/io schedulers in your kernel if not all.
Thanks To
1) Gokhanmoral for his mighty sweet Siyah Kernel which inspired me to write this thread.
2) Moderators for squeezing in extra posts when i ran out of space to fit everything in only 3 reserved posts.
3) Users/Readers for your warm comments.
** Kernel Governors: **
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
NOTE: Info on Samsung's own multi-core aware governor - Pegasusq is here
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!
So, Governors can be categorized into 3/4 on a high level:
1.a) Ondemand Based:
Works on "ramp-up on high load" principle. CPU busy-time is taken into consideration for scaling decisions. Members: Ondemand, OndemandX, Intellidemand, Lazy, Lagfree.
1.b) Conservative Based:
Members: Conservative, Lionheart, LionheartX
2) Interactive Based:
Works on "make scaling decision when CPU comes out of idle-loop" principle. Members: Interactive, InteractiveX, Lulzactive, Luzactiveq, Smartass, SmartassV2, Brazilianwax, SavagedZen.
3) Weird Category:
Members: Userspace, Powersave, Performance.
** reserved **
Thanks teeshx....
Sent from my SGH-T889 using xda app-developers app
Thanks teshxx. This is great for a noob like myself.
Sent from my SAMSUNG-SGH-T889 using xda app-developers app
Where is pegasusq? I guess this governor is for note.
Sent from my SGH-T889 using xda premium
jay661972 said:
Where is pegasusq? I guess this governor is for note.
Sent from my SGH-T889 using xda premium
Click to expand...
Click to collapse
Read the thread CAREFULLY. It's there.
This should be stickied.
Sent from my GT-N7105 using xda app-developers app
THANK YOU... I have been confused about this forever, Never cared to look it up, just set to performance everytime. teshxx, you have saved my device several times. Thank you for your work. You will be recieving a beer or two from me soon. . Keep up the :good: work!
Thank you so mutch for the work, but i don't understand with is the best to save the battery than stock CM10.1:
Pegasusq, ondemand( i read no), userpace, or performance.
................................................................................
Enviado desde mi Tamagotchi usando Tapatalk™ ©
Pickpoket said:
THANK YOU... I have been confused about this forever, Never cared to look it up, just set to performance everytime. teshxx, you have saved my device several times. Thank you for your work. You will be recieving a beer or two from me soon. . Keep up the :good: work!
Click to expand...
Click to collapse
kylesinho21 said:
Thank you so mutch for the work, but i don't understand with is the best to save the battery than stock CM10.1:
Pegasusq, ondemand( i read no), userpace, or performance.
................................................................................
Enviado desde mi Tamagotchi usando Tapatalk™ ©
Click to expand...
Click to collapse
Welcome!! I am glad you guys found it useful.
I personally use pegasusq. For TW, I use Perseus kernel and for CM, I use bullet kernel (extracted it from PA lol)
teshxx said:
Welcome!! I am glad you guys found it useful.
I personally use pegasusq. For TW, I use Perseus kernel and for CM, I use bullet kernel (extracted it from PA lol)
Click to expand...
Click to collapse
Thanck you so much for your work and your answer, you are great!
................................................................................
Enviado desde mi Tamagotchi usando Tapatalk™ ©
Your description of interactive and ondemand off quite a bit...
Ondemand uses parameters like polling intervals (sampling rate), CPU load thresholds (percentage of max CPU loads), down thresholds and differentials, to figure out when to scale the CPU up and out of idle. It does not come out of idle and scale to max frequency right away.
Interactive uses a sampling time but works differently... rather than have down thresholds and down differentials, it polls CPU and determines whether or not a percentage of max load has been met. If it has, it jumps to max frequency for (x) milliseconds. Then scales down.
cobraboy85 said:
Your description of interactive and ondemand off quite a bit...
Ondemand uses parameters like polling intervals (sampling rate), CPU load thresholds (percentage of max CPU loads), down thresholds and differentials, to figure out when to scale the CPU up and out of idle. It does not come out of idle and scale to max frequency right away.
Interactive uses a sampling time but works differently... rather than have down thresholds and down differentials, it polls CPU and determines whether or not a percentage of max load has been met. If it has, it jumps to max frequency for (x) milliseconds. Then scales down.
Click to expand...
Click to collapse
Will take a look and compare. Thanks for the heads up.
Virtuous?
THX ... Very Informative :good:

best governor io/ scheduler combo for battery

hey guys, i was just wondering. i have been using badass governor but i
am trying to figure the best io/ scheduler to use with the governor to get best battery..
thanks in advance..
badass is good.
Try with row.
What are your goals here?
I have had the best battery results with Badass2 governor with Row Scheduler and underclocked CPU min 192 max 1188.

I/o scheduler and governer

What are the best options one gaming performance and second for battery performance. I am currently on zen/ondemand.
note 2
IO does not contribute much to every day performance. Most of the governers should scale to max during games so don't worry about that but if you really want max performance just set it to performance. Best battery life is obviously the power saver governer but honestly for every day performance OnDemand or Pegasusq is the best of both worlds
Currently under clocked at 1.2ghz, in combination with aggressive govr and row sched
What about interactive?

Categories

Resources