Related
Hey guys!
I was wondering if anyone can give me some info on the differences between the governors with doomkernel and the schedulers.
Thanks!
Cheers,
This was posted by DooMLoRD, i just copied the post not all governors are there:
2. Governors In the Linux Kernel ================================
2.1 Performance ------------------------------
The CPUfreq governor "performance" sets the CPU statically to the highest frequency within the borders of scaling_min_freq and scaling_max_freq.
2.2 Powersave ----------------------------
The CPUfreq governor "powersave" sets the CPU statically to the lowest frequency within the borders of scaling_min_freq and scaling_max_freq.
2.3 Userspace ----------------------------
The CPUfreq governor "userspace" allows the user, or any userspace program running with UID "root", to set the CPU to a specific frequency by making a sysfs file "scaling_setspeed" available in the CPU-device directory.
2.4 Ondemand ---------------------------
The CPUfreq governor "ondemand" sets the CPU depending on the current usage. To do this the CPU must have the capability to switch the frequency very quickly. There are a number of sysfs file accessible parameters:
sampling_rate: measured in uS (10^-6 seconds), this is how often you want the kernel to look at the CPU usage and to make decisions on what to do about the frequency. Typically this is set to values of around '10000' or more.
show_sampling_rate_(min|max): the minimum and maximum sampling rates available that you may set 'sampling_rate' to.
up_threshold: defines what the average CPU usage between the samplings of 'sampling_rate' needs to be for the kernel to make a decision on whether it should increase the frequency. For example when it is set to its default value of '80' it means that between the checking intervals the CPU needs to be on average more than 80% in use to then decide that the CPU frequency needs to be increased.
ignore_nice_load: this parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilisation' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. This is useful if you are running a CPU intensive calculation on your laptop that you do not care how long it takes to complete as you can 'nice' it and prevent it from taking part in the deciding process of whether to increase your CPU frequency.
2.5 Conservative -------------------------------
The CPUfreq governor "conservative", much like the "ondemand" governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour more suitable in a battery powered environment. The governor is tweaked in the same manner as the "ondemand" governor through sysfs with the addition of:
freq_step: this describes what percentage steps the cpu freq should be increased and decreased smoothly by. By default the cpu frequency will increase in 5% chunks of your maximum cpu frequency. You can change this value to anywhere between 0 and 100 where '0' will effectively lock your CPU at a speed regardless of its load whilst '100' will, in theory, make it behave identically to the "ondemand" governor.
down_threshold: same as the 'up_threshold' found for the "ondemand" governor but for the opposite direction. For example when set to its default value of '20' it means that if the CPU usage needs to be below 20% between samples to have the frequency decreased.
2.6 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.7 MinMax ------------------------------
The CPUfreq governor "maxmin" tries to minimize the frequency jumps by limiting the selected frequencies to only two frequencies: either the min or the max frequency of the current policy. The frequency is raised or lowered according to the current load and the 'up_threshold' and 'down_threshold'.
Its parameters and implementation are similar to that of conservative.
It does not have the freq_step parameter as it jumps right from min to max and vice-versa.
The sampling_down_factor, unlike conservative, will count the minimal number of samplings since the last time we saw the 'up_threshold' load on the CPU. Hence it is set to higher default and acts as a limiter not to do too many frequency jumps without hurting the performance.
Thanks sorry, didnt see it for some reason. Ignore my questions.
Cheers,
oppiee said:
Thanks sorry, didnt see it for some reason. Ignore my questions.
Cheers,
Click to expand...
Click to collapse
One thing to note pal. All chipsets have different tolerances so whereas interactive works best for me, it may not be good for u. Just test em and use CPU spy/ ur own judgement to c which suits ur phone best.
Sent from my X10i using XDA App
Yup I am currently fiddling around with the different settings. The main thing I want to accomplish is not to have lag when im scrolling and opening up basic apps such as dialer and browser. I dont really play games. I hate the fact that the phone lags up sometimes. So far Its ok, but getting some WLOD on super high freq.
Any suggestions?
oppiee said:
Yup I am currently fiddling around with the different settings. The main thing I want to accomplish is not to have lag when im scrolling and opening up basic apps such as dialer and browser. I dont really play games. I hate the fact that the phone lags up sometimes. So far Its ok, but getting some WLOD on super high freq.
Any suggestions?
Click to expand...
Click to collapse
Can u post a screenshot of CPU tuner or whatever u use of freqs u use? Also are u using doomkernel fs version as I think some handsets can't even boot up oc kernel.
Sent from my X10i using XDA App
Any good programs to take screen shots? I am using the highest OC kernel by DL, and using doomkernel wolfbreak V7b6.
Not mean to sound patronising pal but just type screen shot into android market theres plenty
Edit: ur phone prob can't handle the overclock. Read the kernel thread it says this pal.
Sent from my X10i using XDA App
Oh i think there might has been some misunderstanding. My phone is running fine, just doing some testing. at 1.229 Mhz I tend to get WLODs, using minmax with SIO.
At 1.114 and 245, using min max with SIO. everything is fine so far. I just thought you wanted to know for your own purposes.
Cheers
Sorry buddy I misunderstood
Sent from my X10i using XDA App
thers some missing from the top
lagfree
scary
brazilianwax
savaged zen
what do theese do
also whats the best settings from all of them from your opinion
I have:
Brazilianwax
Smoothass
Lagfree
Smartassv2
SavagedZen
Scary
Smartass
Minmax
Interactivex
Interactive
Conservative
Userspace
Powersave
OnDemand
Performance.
Not used them all but lagfree is (as suggested free from lag & smooth. Brazilianwax didnt work for me very laggy. Scary was quite good also, along with interactive. Not really tested the others enough to pass comment to be honest
I bought a new android phone which is the Live with Walkman(WT19i) here in the Philippines, and I'm loving it, except for the battery life
Live with Walkman is known for its poor battery life(which i found here in xda forums), probably because of the crapware software installed in stock ROM and battery which is the EP500 rated at 3.7v 1200mAh. Some users, like me, have a battery capacity of 1160mAh which really suck(probably country/region specific), especially when running with the stock ROM from Sony. So I unlocked my bootloader flashed my kernel to Rage kernel v2.6, wipe all data and cache partitions and installed HYBROM v15 from CWM, so far so good. I installed No frills CPU Control but I'm having a hard time which CPU governor and I/O scheduler to choose. Some people say that I should choose SmartAssv2 and Noop, some say I should choose Conservative and Noop or SIO.
Installed Applications:
Angry Birds(RIO, Seasons, Space)
ASTRO File manager
AdFree
MapDroyd
Facebook(auto sync is OFF)
YouTube
Skype(auto sync is OFF)
oh, and BTW, I integrate these two apps via WinRAR which does not exist in HYBROM v15.
Google Maps
Google Search Widget
-Screen Brightness = 40%(I only set it to max when outdoors)
-Mobile Data network = OFF (using GSM only, I'm using WiFi for browsing, downloading and updating apps)
-AutoSync is off
-I only turn on WiFi when needed
No Frills CPU (My configuration):
Min:122Mhz
Max:1.024Ghz
Governor:SmartAssv2
I/O Scheduler:Noop
Apply on boot: checked
So my question is whats the best CPU Governor and I/O Scheduler combination for the Live with Walkman(assuming your using Rage kernel ang hybrom ROM) providing a balanced cpu performance and battery life for any casual user?
For your CPU config, I suggest increasing the minimum frequency to 320-480ish; because around that frequency it consumes more or less the same voltage. If you set it too low, you may end up using more power because your phone may struggle to process services (caused by low frequency). Reference here -it may be on another device forum but that's applicable on other phones-
IIRC smartassv2 will be defaulting to a low frequency when the phone's screen is off so I think it's good to use it, for your brightness it's ok but I use around 20-30% brightness when outdoors
thanks bro!
sir,
android noob question...
when you installed hybrom on the wt19i,
does the walkman button still work? and does it still have loudspeaker functionality?
im really hesistant in rooting or installing custom rom on mine...
thanks!
use either scary governor or ondemand and about the i/o bfq or sio.
buy a system tuner pro then config your startups and auto kill. mine is -1% / 4 hours deepsleep. min. 122Mhz - max. 1.5Ghz..
melander said:
sir,
android noob question...
when you installed hybrom on the wt19i,
does the walkman button still work? and does it still have loudspeaker functionality?
im really hesistant in rooting or installing custom rom on mine...
thanks!
Click to expand...
Click to collapse
walkman, and walkman button still works, and speakers are still loud and in stereo
and the bonus part, you get DSP manager, which enhances your sound and music experience further
xachiel said:
use either scary governor or ondemand and about the i/o bfq or sio.
buy a system tuner pro then config your startups and auto kill. mine is -1% / 4 hours deepsleep. min. 122Mhz - max. 1.5Ghz..
Click to expand...
Click to collapse
autokill?? I thought killing apps and processes is bad and since killed apps will restart again and will consume more battery life
kevincaja said:
autokill?? I thought killing apps and processes is bad and since killed apps will restart again and will consume more battery life
Click to expand...
Click to collapse
its a memory auto killer. not a task killer. and use gemini app to config auto-run your apps so they dont run at the background
kevincaja said:
walkman, and walkman button still works, and speakers are still loud and in stereo
and the bonus part, you get DSP manager, which enhances your sound and music experience further
Click to expand...
Click to collapse
thanks for the reply sir,
can you please share the steps you did to install the kernel and rom???
im really interested in installing a custom rom on mine...
melander said:
thanks for the reply sir,
can you please share the steps you did to install the kernel and rom???
im really interested in installing a custom rom on mine...
Click to expand...
Click to collapse
First, download all the necessary files:
this thread contains all the necessary files to unlock your bootloader, at the same time flash a custom kernel that contains ClockWorkMod(CWM) and root.
they also include download for the stock kernel with CMW and root but no overclocking, extra cpu governors and I/O scheduler features:
http://forum.xda-developers.com/showthread.php?t=1560613
if you want to overclock your phone, or improve battery life, download rage kernel:
http://forum.xda-developers.com/showthread.php?t=1398910
then download hybrom v15:
http://forum.xda-developers.com/showthread.php?t=1373435
well that's about it, be careful when flashing as you can easily brick your phone.
follow the instruction in the threads I've given to you.
You install custom ROMs via the ClockWorkMod, the only thing you flash via your computer is the kernel. In case your stuck in bootloop, you can always reflash to the stock ROM of sony ericsson.
Stock ROM for WT19i:
http://dl.dropbox.com/u/17122099/Sony Tools/WT19i_4.0.2.A.0.62__1254-1889.ftf
then flash it with flashtool or using the sofware on this thread.
NOTE:
-Rage kernel has a different way of entering in ClockWorkMod, turn your phone on. As it boots up, as soon you see the LED indicator turns blue or as soon as the boot logo brightens up, immediately press the home key to enter ClockWorkMod.
-in the stock kernel with CMW and root, the LED indicator is always off. Turn your phone on. Press the on-off key once or twice as soon as the b logo gets brighter, to enter in ClockWorkMod.
kevincaja said:
thanks bro!
Click to expand...
Click to collapse
I kinda disagree.If i remember correctly your phone has minimum frequency of 245 with stock kernel so why increasing?I use my mini with rage kernel at 122-1024 smartassV2 governor never had any problem.I use profile for screen off settings are 122-368.Battery consumption is 0.4-0.5% over night not in flight mode and cpu spy shows 99% of that time cpu is sitting on 122 MHz.So unless your phone is heavy loaded with apps that constantly require cpu power i recommend trying my settings and test over night, you got nothing to loose after all
kevincaja said:
First, download all the necessary files:
this thread contains all the necessary files to unlock your bootloader, at the same time flash a custom kernel that contains ClockWorkMod(CWM) and root.
they also include download for the stock kernel with CMW and root but no overclocking, extra cpu governors and I/O scheduler features:
http://forum.xda-developers.com/showthread.php?t=1560613
if you want to overclock your phone, or improve battery life, download rage kernel:
http://forum.xda-developers.com/showthread.php?t=1398910
then download hybrom v15:
http://forum.xda-developers.com/showthread.php?t=1373435
well that's about it, be careful when flashing as you can easily brick your phone.
follow the instruction in the threads I've given to you.
You install custom ROMs via the ClockWorkMod, the only thing you flash via your computer is the kernel. In case your stuck in bootloop, you can always reflash to the stock ROM of sony ericsson.
Stock ROM for WT19i:
http://dl.dropbox.com/u/17122099/Sony Tools/WT19i_4.0.2.A.0.62__1254-1889.ftf
then flash it with flashtool or using the sofware on this thread.
NOTE:
-Rage kernel has a different way of entering in ClockWorkMod, turn your phone on. As it boots up, as soon you see the LED indicator turns blue or as soon as the boot logo brightens up, immediately press the home key to enter ClockWorkMod.
-in the stock kernel with CMW and root, the LED indicator is always off. Turn your phone on. Press the on-off key once or twice as soon as the b logo gets brighter, to enter in ClockWorkMod.
Click to expand...
Click to collapse
Wow, thanks so much for the very detailed guide!
Will try it out now!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running Hybrom V15 now with Rage Kernel.
So far so good.
Now, how do I set the CPU frequency?
Kira.Lawliet said:
For your CPU config, I suggest increasing the minimum frequency to 320-480ish; because around that frequency it consumes more or less the same voltage. If you set it too low, you may end up using more power because your phone may struggle to process services (caused by low frequency). Reference here -it may be on another device forum but that's applicable on other phones-
IIRC smartassv2 will be defaulting to a low frequency when the phone's screen is off so I think it's good to use it, for your brightness it's ok but I use around 20-30% brightness when outdoors
Click to expand...
Click to collapse
I have had my minimum CPU frequency on 122 MHz for months, no problem. Phone sets the CPU frequency itself higher, when it needs more power. Putting minimum too low doesn't affect it.
T3sla said:
I kinda disagree.If i remember correctly your phone has minimum frequency of 245 with stock kernel so why increasing?I use my mini with rage kernel at 122-1024 smartassV2 governor never had any problem.I use profile for screen off settings are 122-368.Battery consumption is 0.4-0.5% over night not in flight mode and cpu spy shows 99% of that time cpu is sitting on 122 MHz.So unless your phone is heavy loaded with apps that constantly require cpu power i recommend trying my settings and test over night, you got nothing to loose after all
Click to expand...
Click to collapse
I have exactly same settings.
---------- Post added at 01:31 PM ---------- Previous post was at 01:18 PM ----------
xachiel said:
its a memory auto killer. not a task killer. and use gemini app to config auto-run your apps so they dont run at the background
Click to expand...
Click to collapse
Taskkillers/memoryautokillers etc are useless, even not recommended for Android. These close apps, that need to be running and when they start again, consume more battery.
Android is built self to kill apps, which are no longer needed in memory. It kills some apps, when free RAM amount reaches minfree level, amount of RAM that has to be always free.
If you want to improve RAM, better try out V6 Supercharger, link in my signature. It changes the minfree amounts to higher of lower, which one you want. Either multitasking, lowers minfree amount to allow more apps to work at one time, so you can access these easily, without the need of reopening. Or higher minfree amount, to keep more free RAM.
I personally have chosen Balanced.
Someguyfromhell said:
I have had my minimum CPU frequency on 122 MHz for months, no problem. Phone sets the CPU frequency itself higher, when it needs more power. Putting minimum too low doesn't affect it.
I have exactly same settings.
---------- Post added at 01:31 PM ---------- Previous post was at 01:18 PM ----------
Taskkillers/memoryautokillers etc are not useless, even not recommended for Android. These close apps, that need to be running and when they start again, consume more battery.
Android is built self to kill apps, which are no longer needed in memory. It kills some apps, when free RAM amount reaches minfree level, amount of RAM that has to be always free.
If you want to improve RAM, better try out V6 Supercharger, link in my signature. It changes the minfree amounts to higher of lower, which one you want. Either multitasking, lowers minfree amount to allow more apps to work at one time, so you can access these easily, without the need of reopening. Or higher minfree amount, to keep more free RAM.
I personally have chosen Balanced.
Click to expand...
Click to collapse
And i use V6supercharger too among others scriptsNext project undervolting.
Phone sets the CPU frequency itself higher, when it needs more power. Putting minimum too low doesn't affect it.
Click to expand...
Click to collapse
It does affect it in a little way; putting it up on low frequency -> phone will scale frequency according to needed -> what does it use to scale? -> uses abit of power to scale according to needed; so it's logical to why not set it to a mid frequency when it consumes the same volt therefore not wasting a bit energy to scale up or down when needed; of course' the number of your apps/running services affects this so it depends; you might hardly notice any change at all. It just that it's optimal but I'll not argue with this since we don't ran out of battery anyway on travelling eh?
-reference #1, #2 read more have fun testing
Kira.Lawliet said:
It does affect it in a little way; putting it up on low frequency -> phone will scale frequency according to needed -> what does it use to scale? -> uses abit of power to scale according to needed; so it's logical to why not set it to a mid frequency when it consumes the same volt therefore not wasting a bit energy to scale up or down when needed; of course' the number of your apps/running services affects this so it depends; you might hardly notice any change at all. It just that it's optimal but I'll not argue with this since we don't ran out of battery anyway on travelling eh?
-reference #1, #2 read more have fun testing
Click to expand...
Click to collapse
Yes but cpu power from my poor knowledge depends from frequency, so when you set a 3 times higher minimum frequency even if voltage is the same you'll have 3 times more power consumption when idle.I don't think that scaling cpu consumes more than 3 times powerBTW very interesting threads you provide us, did some reading so far and definitely gonna read the whole thing
melander said:
Wow, thanks so much for the very detailed guide!
Will try it out now!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running Hybrom V15 now with Rage Kernel.
So far so good.
Now, how do I set the CPU frequency?
Click to expand...
Click to collapse
you can download No Frills CPU Control in the Google Play Store(Market) for beginners, i suggest using SmartAssv2 for the CPU governor and Noop or SIO for the I/O Scheduler. as i remember, Noop or SIO provides the fastest throughput and best suitable for flash storage
here's the list of the advantages and disadvantages of those I/O Schedulers:
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.
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.
Q. "Best I/O Scheduler?"
A.There is nothing called "best" i/o scheduler. Depending on your usage environment and tasks/apps been run, use different schedulers. That's the best i can suggest.
However, considering the overall performance, battery, reliability and low latency, it is believed that
SIO > Noop > Deadline > VR > BFQ > CFQ, given all schedulers are tweaked and the storage used is a flash device.
Q. "How do i change I/O schedulers?"
Voltage Control or No Frills from market.
And here's the list and explanations for all CPU Governors for a custom android kernel:
These are the 18 governors we're talking about.
1) Ondemand
2) Ondemandx
3) Conservative
4) Interactive
5) Interactivex
6) Lulzactive
7) Smartass
8) SmartassV2
9) Intellidemand
10) Lazy
11) Lagfree
12) Lionheart
13) LionheartX
14) Brazilianwax
15) SavagedZen
16) Userspacce
17) Powersave
18) Performance
1) Ondemand:
Default governor in almost all stock kernels. One main goal of the ondemand governor is to switch to max frequency as soon as there is a CPU activity detected to ensure the responsiveness of the system. (You can change this behavior using smooth scaling parameters, refer Siyah tweaks at the end of 3rd post.) Effectively, it uses the CPU busy time as the answer to "how critical is performance right now" question. So Ondemand jumps to maximum frequency when CPU is busy and decreases the frequency gradually when CPU is less loaded/apporaching idle. Even though many of us consider this a reliable governor, it falls short on battery saving and performance on default settings. One potential reason for ondemand governor being not very power efficient is that the governor decide the next target frequency by instant requirement during sampling interval. The instant requirement can response quickly to workload change, but it does not usually reflect workload real CPU usage requirement in a small longer time and it possibly causes frequently change between highest and lowest frequency.
2) Ondemandx:
Basically an ondemand with suspend/wake profiles. This governor is supposed to be a battery friendly ondemand. When screen is off, max frequency is capped at 500 mhz. Even though ondemand is the default governor in many kernel and is considered safe/stable, the support for ondemand/ondemandX depends on CPU capability to do fast frequency switching which are very low latency frequency transitions. I have read somewhere that the performance of ondemand/ondemandx were significantly varying for different i/o schedulers. This is not true for most of the other governors. I personally feel ondemand/ondemandx goes best with SIO I/O scheduler.
3) Conservative:
A slower Ondemand which scales up slowly to save battery. The conservative governor is based on the ondemand governor. It functions like the Ondemand governor by dynamically adjusting frequencies based on processor utilization. However, the conservative governor increases and decreases CPU speed more gradually. Simply put, this governor increases the frequency step by step on CPU load and jumps to lowest frequency on CPU idle. Conservative governor aims to dynamically adjust the CPU frequency to current utilization, without jumping to max frequency. The sampling_down_factor value acts as a negative multiplier of sampling_rate to reduce the frequency that the scheduler samples the CPU utilization. For example, if sampling_rate equal to 20,000 and sampling_down_factor is 2, the governor samples the CPU utilization every 40,000 microseconds.
4) Interactive:
Can be considered a faster ondemand. So more snappier, less battery. Interactive is designed for latency-sensitive, interactive workloads. Instead of sampling at every interval like ondemand, it determines how to scale up when CPU comes out of idle. The governor has the following advantages: 1) More consistent ramping, because existing governors do their CPU load sampling in a workqueue context, but interactive governor does this in a timer context, which gives more consistent CPU load sampling. 2) Higher priority for CPU frequency increase, thus giving the remaining tasks the CPU performance benefit, unlike existing governors which schedule ramp-up work to occur after your performance starved tasks have completed. Interactive It's an intelligent Ondemand because of stability optimizations. Why??
Sampling the CPU load every X ms (like Ondemand) can lead to under-powering the CPU for X ms, leading to dropped frames, stuttering UI, etc. Instead of sampling the CPU at a specified rate, the interactive governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy between exiting idle and when the timer fires, then we assume the CPU is underpowered and ramp to max frequency.
5) Interactivex:
This is an Interactive governor with a wake profile. More battery friendly than interactive.
6) Lulzactive:
This new find from Tegrak is based on Interactive & Smartass governors and is one of the favorites.
Old Version: When workload is greater than or equal to 60%, the governor scales up CPU to next higher step. When workload is less than 60%, governor scales down CPU to next lower step. When screen is off, frequency is locked to global scaling minimum frequency.
New Version: Three more user configurable parameters: inc_cpu_load, pump_up_step, pump_down_step. Unlike older version, this one gives more control for the user. We can set the threshold at which governor decides to scale up/down. We can also set number of frequency steps to be skipped while polling up and down.
When workload greater than or equal to inc_cpu_load, governor scales CPU pump_up_step steps up. When workload is less than inc_cpu_load, governor scales CPU down pump_down_step steps down.
Example:
Consider
inc_cpu_load=70
pump_up_step=2
pump_down_step=1
If current frequency=200, Every up_sampling_time Us if cpu load >= 70%, cpu is scaled up 2 steps - to 800.
If current frequency =1200, Every down_sampling_time Us if cpu load < 70%, cpu is scaled down 1 step - to 1000.
7) 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.
8) 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.
9) 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.
10) 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.
11) 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.
12) 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.
13) LionheartX
LionheartX is based on Lionheart but has a few changes on the tunables and features a suspend profile based on Smartass governor.
14) Brazilianwax:
Similar to smartassV2. More aggressive ramping, so more performance, less battery.
15) SavagedZen:
Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
16) Userspace:
Instead of automatically determining frequencies, lets user set frequencies.
17) 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).
18) 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, Smartass, SmartassV2, Brazilianwax, SavagedZen.
3) Weird Category:
Members: Userspace, Powersave, Performance.
You can read all of these form this thread.
T3sla said:
I kinda disagree.If i remember correctly your phone has minimum frequency of 245 with stock kernel so why increasing?I use my mini with rage kernel at 122-1024 smartassV2 governor never had any problem.I use profile for screen off settings are 122-368.Battery consumption is 0.4-0.5% over night not in flight mode and cpu spy shows 99% of that time cpu is sitting on 122 MHz.So unless your phone is heavy loaded with apps that constantly require cpu power i recommend trying my settings and test over night, you got nothing to loose after all
Click to expand...
Click to collapse
kindly read this thread:
Q. "I'm going to set scaling min freq as 100 mhz because my kernel supports it. Hope there's nothing wrong in doing that."
A. Wait! You may want to stay away from using 100mhz during screen-off or screen-on states for three reasons 1) It seems 100 mhz uses more power than 200 mhz. According to tests, 100 mhz accounted to 1 W / GHz and 200 mhz to 0.7 W / GHz, when both the cores were online. 2) 200 mhz can finish same task faster compared 100 mhz and thus hit deep idle soon. 3) 200 mhz is the 'sweet spot' of frequency in SGS II. ie, the frequency used in the calculations based on the optimal energy to run (Ex: In Milestone it's 550 MHz). So , 'energetically efficient' frequency for our CPU is 200 mhz.
Someguyfromhell said:
I have had my minimum CPU frequency on 122 MHz for months, no problem. Phone sets the CPU frequency itself higher, when it needs more power. Putting minimum too low doesn't affect it.
I have exactly same settings.
---------- Post added at 01:31 PM ---------- Previous post was at 01:18 PM ----------
Taskkillers/memoryautokillers etc are useless, even not recommended for Android. These close apps, that need to be running and when they start again, consume more battery.
Android is built self to kill apps, which are no longer needed in memory. It kills some apps, when free RAM amount reaches minfree level, amount of RAM that has to be always free.
If you want to improve RAM, better try out V6 Supercharger, link in my signature. It changes the minfree amounts to higher of lower, which one you want. Either multitasking, lowers minfree amount to allow more apps to work at one time, so you can access these easily, without the need of reopening. Or higher minfree amount, to keep more free RAM.
I personally have chosen Balanced.
Click to expand...
Click to collapse
thanks for the link to V6 Supercharger, now my phone is lag free
Thank you again for the very detailed explanation...
Currently trying out your recommendations...
Ok I'm hoping this post sticks, because no one has this listed anywhere it seems. I have compiled a list of commonly recognized cpu governors and frequencies that the EVO 3D processor and different kernels recognize. The max frequency depends on the kernel you flashed.
Ok so the Evo 3D processor only changes in intervals of 54 so I
researched. No one seems to have a guide on the net that gives those
numbers. The OC Daemon on ViperRom tells you all your options when
you go into terminal to change it, and it also gives you all the
processor governor options too. Where as with MeanRom and Anthrax
Kernel it gives you the minimum and maximum but shows nothing
inbetween, both with governors and frequencies.
starting with minimum:
192000
216000
270000
324000
378000
432000
486000
540000
594000
648000
702000
756000
810000
864000
918000
972000
1026000
1080000
1134000
1188000 Stock max, not quite 1.2 Ghz
1242000 A true 1.2 Ghz
1296000
1350000
1404000
1458000
1512000
1566000
1620000
1674000
1728000 Zedomax says this is most stable max freq. for him on ViperRom
1782000
1836000
1890000
1944000 Only read of one person having stability with this
Governor settings:
Ondemand - when you need it
Powersave - obviously
Conservative - straight forward
Interactive - sounds cut and dry
Performance - I guess hardcore gaming
Userspace - not sure what this one does
Auto - Uses kernel to determine
The userspace governer is basically a legacy thing (see: http://www.thinkwiki.org/wiki/How_to_make_use_of_Dynamic_Frequency_Scaling) that allows you or an application/module that resides in userspace to manually adjust the CPU frequency.
This can be used in an android world by allowing an app to modify the CPU frequency without relying on root access, if I remember correctly. It's basically useless though since I don't think any applications aside from maybe setcpu would use such a feature since most applications automatically assume you aren't rooted thus are using the typical default cpu governor.
Good post.
umm.. i think this is in the wrong spot??? maybe im wrong?? should be in the general...
evod3 said:
umm.. i think this is in the wrong spot??? maybe im wrong?? should be in the general...
Click to expand...
Click to collapse
Then how do I move it? Honest question. This is my first true post/thread that I started.
It's just when I go looking for answers for my phone I go directly to the CDMA section. Only after I can't find my answer there do I branch out and search the whole site. I usually dont think of the EVO 3D as a GSM phone. I mean generally speaking the EVO 3D is more on sprint than any other network world wide.
Other than that does anyone else have the problem of not being able to change voltages? I mean the SetCPU app shows it as a tab but when you purchase and download it there's no tab for votages. I dont wanna pay for another app and not have what it advertises. I emailed the devs of setcpu and never heard back. so I feel like I waisted my money on the dern thing.
I want to be able to truely undervolt and overclock my cpu for power saving reasons. Come on. My stock battery life was like 4 hours, 5 tops, with moderate use. ViperRom changed that to 18+ with moderate use. Now Im using MeanRom with the Anthrax kernel, overclocked to 1.3 GHz and im getting a little more than 36 hours with moderate use.
I'm betting with undervolting we could get a lot more battery life.
SketchyStunts said:
You can run viperROM.....it comes with the Tiamat kernel & has vipercontrol/vipermod baked in & can undervolt your heart out. I believe the it come with voltages -100 from stock. Had mine -125 & the most stable ROM i've ran yet.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=24325646
This is from another thread I found earlier. Not sure what is meant buy -100. Is that mV V MV or what?
stephangardner said:
Then how do I move it? Honest question. This is my first true post/thread that I started.
It's just when I go looking for answers for my phone I go directly to the CDMA section. Only after I can't find my answer there do I branch out and search the whole site. I usually dont think of the EVO 3D as a GSM phone. I mean generally speaking the EVO 3D is more on sprint than any other network world wide.
Other than that does anyone else have the problem of not being able to change voltages? I mean the SetCPU app shows it as a tab but when you purchase and download it there's no tab for votages. I dont wanna pay for another app and not have what it advertises. I emailed the devs of setcpu and never heard back. so I feel like I waisted my money on the dern thing.
I want to be able to truely undervolt and overclock my cpu for power saving reasons. Come on. My stock battery life was like 4 hours, 5 tops, with moderate use. ViperRom changed that to 18+ with moderate use. Now Im using MeanRom with the Anthrax kernel, overclocked to 1.3 GHz and im getting a little more than 36 hours with moderate use.
I'm betting with undervolting we could get a lot more battery life.
http://forum.xda-developers.com/showthread.php?p=24325646
This is from another thread I found earlier. Not sure what is meant buy -100. Is that mV V MV or what?
Click to expand...
Click to collapse
That was from awile back when I had the EVO 4g & used vipermod to undervolt on AOSP. I used to get insane battery life. Miss that. Lol
Wait, maybe not can't remember. Stuck in 1x hell at the moment so can't check the link. Grrrrrr
Sent from my PG86100 using xda premium
I disagree. Because this has to do with frequency clocking, I'd say this is very much good to have stuck here.
Perhaps adding further information about undervolting would be even better?
LiquidSolstice said:
I disagree. Because this has to do with frequency clocking, I'd say this is very much good to have stuck here.
Perhaps adding further information about undervolting would be even better?
Click to expand...
Click to collapse
I hope we get some more insight.
I rooted for the sole purpose of getting better battery life. I read about undervolting, overclocking and underclocking to save battery. Then I find I can't change voltages like I thought. I know its out there just gotta get the right dev to respond to this thread.
Sent from my PG86100 using xda premium
stephangardner said:
I hope we get some more insight.
I rooted for the sole purpose of getting better battery life. I read about undervolting, overclocking and underclocking to save battery. Then I find I can't change voltages like I thought. I know its out there just gotta get the right dev to respond to this thread.
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
Best of luck to you, I'm sure many will thank you for this
stephangardner said:
. Then I find I can't change voltages like I thought..
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
What rom are you running? in system tuner pro click the "cpu" button you'll come to the screen where you set clock speeds, at the very top is a tab labled "voltage" hit that and there you can set your voltages. be careful though some phones dont play well with some setting, thats why i dont preset voltages in my ROM.
Originally Posted by stephangardner
. Then I find I can't change voltages like I thought..
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
What rom are you running? in system tuner pro click the "cpu" button you'll come to the screen where you set clock speeds, at the very top is a tab labled "voltage" hit that and there you can set your voltages. be careful though some phones dont play well with some setting, thats why i dont preset voltages in my ROM.
Click to expand...
Click to collapse
+1 for System Tuner Pro, love that app! I, too, hope this thread sticks cause I've been looking for PRECISELY this info to no avail recently!
Subscribed! Howdy folks!
Relevant to Dev. This stays here....
Nice work getting this here, OP.
Here is a great thread with a TON of useful information about kernels, govenors,I/O schedulers, kernel modules and a lot more... Very informative.
http://forum.xda-developers.com/showthread.php?t=1369817
Sent from my PG86100 using Tapatalk 2 Beta-5
steal25 said:
What rom are you running?
Click to expand...
Click to collapse
First Rom was viperRom then I added the rc remix kernel. Second Rom was the meanRom then a few hours later added the anthrax kernel
Sent from my PG86100 using xda premium
droidphile said:
1. GOVERNORS
I) MANUAL:
These are the 18 governors we're talking about.
1) Ondemand 2) Ondemandx 3) Conservative 4) Interactive 5) Interactivex 6) Lulzactive 7) Smartass 8) SmartassV2 9) Intellidemand 10) Lazy 11) Lagfree 12) Lionheart 13) LionheartX 14) Brazilianwax 15) SavagedZen 16) Userspacce 17) Powersave 18) Performance
1) Ondemand: Default governor in almost all stock kernels. One main goal of the ondemand governor is to switch to max frequency as soon as there is a CPU activity detected to ensure the responsiveness of the system. (You can change this behavior using smooth scaling parameters, refer Siyah tweaks at the end of 3rd post.) Effectively, it uses the CPU busy time as the answer to "how critical is performance right now" question. So Ondemand jumps to maximum frequency when CPU is busy and decreases the frequency gradually when CPU is less loaded/apporaching idle. Even though many of us consider this a reliable governor, it falls short on battery saving and performance on default settings. One potential reason for ondemand governor being not very power efficient is that the governor decide the next target frequency by instant requirement during sampling interval. The instant requirement can response quickly to workload change, but it does not usually reflect workload real CPU usage requirement in a small longer time and it possibly causes frequently change between highest and lowest frequency.
2) Ondemandx: Basically an ondemand with suspend/wake profiles. This governor is supposed to be a battery friendly ondemand. When screen is off, max frequency is capped at 500 mhz. Even though ondemand is the default governor in many kernel and is considered safe/stable, the support for ondemand/ondemandX depends on CPU capability to do fast frequency switching which are very low latency frequency transitions. I have read somewhere that the performance of ondemand/ondemandx were significantly varying for different i/o schedulers. This is not true for most of the other governors. I personally feel ondemand/ondemandx goes best with SIO I/O scheduler.
3) Conservative: A slower Ondemand which scales up slowly to save battery. The conservative governor is based on the ondemand governor. It functions like the Ondemand governor by dynamically adjusting frequencies based on processor utilization. However, the conservative governor increases and decreases CPU speed more gradually. Simply put, this governor increases the frequency step by step on CPU load and jumps to lowest frequency on CPU idle. Conservative governor aims to dynamically adjust the CPU frequency to current utilization, without jumping to max frequency. The sampling_down_factor value acts as a negative multiplier of sampling_rate to reduce the frequency that the scheduler samples the CPU utilization. For example, if sampling_rate equal to 20,000 and sampling_down_factor is 2, the governor samples the CPU utilization every 40,000 microseconds.
4) Interactive: Can be considered a faster ondemand. So more snappier, less battery. Interactive is designed for latency-sensitive, interactive workloads. Instead of sampling at every interval like ondemand, it determines how to scale up when CPU comes out of idle. The governor has the following advantages: 1) More consistent ramping, because existing governors do their CPU load sampling in a workqueue context, but interactive governor does this in a timer context, which gives more consistent CPU load sampling. 2) Higher priority for CPU frequency increase, thus giving the remaining tasks the CPU performance benefit, unlike existing governors which schedule ramp-up work to occur after your performance starved tasks have completed. Interactive It's an intelligent Ondemand because of stability optimizations. Why?? Sampling the CPU load every X ms (like Ondemand) can lead to under-powering the CPU for X ms, leading to dropped frames, stuttering UI, etc. Instead of sampling the CPU at a specified rate, the interactive governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy between exiting idle and when the timer fires, then we assume the CPU is underpowered and ramp to max frequency.
5) Interactivex: This is an Interactive governor with a wake profile. More battery friendly than interactive.
6) Lulzactive: This new find from Tegrak is based on Interactive & Smartass governors and is one of the favorites. Old Version: When workload is greater than or equal to 60%, the governor scales up CPU to next higher step. When workload is less than 60%, governor scales down CPU to next lower step. When screen is off, frequency is locked to global scaling minimum frequency. New Version: Three more user configurable parameters: inc_cpu_load, pump_up_step, pump_down_step. Unlike older version, this one gives more control for the user. We can set the threshold at which governor decides to scale up/down. We can also set number of frequency steps to be skipped while polling up and down. When workload greater than or equal to inc_cpu_load, governor scales CPU pump_up_step steps up. When workload is less than inc_cpu_load, governor scales CPU down pump_down_step steps down. Example: Consider inc_cpu_load=70 pump_up_step=2 pump_down_step=1 If current frequency=200, Every up_sampling_time Us if cpu load >= 70%, cpu is scaled up 2 steps - to 800. If current frequency =1200, Every down_sampling_time Us if cpu load < 70%, cpu is scaled down 1 step - to 1000.
7) 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.
8) 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.
9) 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.
10) 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.
11) 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.
12) 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.
13) LionheartX LionheartX is based on Lionheart but has a few changes on the tunables and features a suspend profile based on Smartass governor.
14) Brazilianwax: Similar to smartassV2. More aggressive ramping, so more performance, less battery.
15) SavagedZen: Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
16) Userspace: Instead of automatically determining frequencies, lets user set frequencies.
17) 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).
18) 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, Smartass, SmartassV2, Brazilianwax, SavagedZen. 3) Weird Category: Members: Userspace, Powersave, Performance.
Click to expand...
Click to collapse
Good explanations as to what the OP was trying to relay.
gunfromsako said:
Here is a great thread with a TON of useful information about kernels, govenors,I/O schedulers, kernel modules and a lot more... Very informative.
http://forum.xda-developers.com/showthread.php?t=1369817
Click to expand...
Click to collapse
I'll have to read this one when I'm on a computer. Way to much info for the app.
steal25 said:
in system tuner pro click the "cpu" button you'll come to the screen where you set clock speeds, at the very top is a tab labled "voltage" hit that and there you can set your voltages.
Click to expand...
Click to collapse
Brownie points for this guy. Downloaded that app now and loving it. I'm gonna start with a 10 mV decrease on all voltages then do like 2 mV increments till I have issues then I'll report back.
dimebagdan65 said:
+1 for System Tuner Pro, love that app!
Click to expand...
Click to collapse
+2
By the way guys and gals does anyone else here have dyslexia? I didn't think I could get into all this because of it but I find it kinda soothing. Like working on cars helps with my ADHD. I feel like Jessie from The Fast And The Furious. Ha ha
Sent from my PG86100 using xda premium
oohaylima said:
Good explanations as to what the OP was trying to relay.
Click to expand...
Click to collapse
Same post I linked right above you...
I wipe till it bleeds...
gunfromsako said:
Same post I linked right above you...
I wipe till it bleeds...
Click to expand...
Click to collapse
I know. All I did was quote the author of the section that pertains to the governor in which the OP was trying to break down in the beginning.
I'm a big fan of keeping things under one thread for easy fluidity of related information.
gunfromsako said:
Same post I linked right above you...
I wipe till it bleeds...
Click to expand...
Click to collapse
Oh... my... GOD! I friggin love your sig! My sides hurt! I'm totally with ya! Never want problems? Always start with a clean slate! Duh... ^_^
I always keep my phone undervolted -50mv @ 1.5GHz intellanthrax. That's the farthest I can go without problems.
sent from America...F__k Yeah!
Comin again to save the motherf**kin day yeah!
Only one question... Rockin out or ballad style? XD
Original post by droidphile about Kernel Governors, Modules, I/O Schedulers, CPU Tweaks, AIO App Configs under Galaxy S II General.I altered & wrote in a way Newbies can read His post
Thanks To................
Sirkay,hansip87,jjdoctor for their work in Xperia ray which inspired me to write(Modified and altered from the original thread )
NEW-Check my 3rd post for QUESTIONS AND ANSWERS(21-08-12)-Click here
1. Kernel Governors
These are the 19 governors we're talking about.
1) Ondemand
2) Conservative
3) Interactivex
4) Smartass
5) SmartassV2
6) Lagfree
7) Brazilianwax
8) SavagedZen
9) Userspacce
10) Powersave
11) Performance
12)Minmax
13)Scary
14)Lulzactive
15)intellidemand
16)badass
17)Lionheart
18)Lionheartx
19)Virtuous
1) 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
2) Conservative:
A slower Ondemand which scales up slowly to save battery. 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.
3) Interactivex:
This is an Interactive governor with a wake profile. More battery friendly than interactive.
4) Smartass:
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.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
5) SmartassV2:
SmartassV2 is a governor (controls the frequency of the CPU at each give moment) which like the first smartass is generally based on the implementation of interactive with some major changes and the addition of a built in sleep profile (behaves a bit differently when screen is off vs. on).The smartassV2 improves the very naive scheme which the first smartass had
6) 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.
7) Brazilianwax:
Similar to smartassV2. More aggressive ramping, so more performance, less battery.
8) SavagedZen:
Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
9) Userspace:
Instead of automatically determining frequencies, lets user set frequencies.
10) Powersave:
runs minimum speed all the time (good for low battery/high temp situations)
11) Performance:
Top speed all the time(better for benchmarking/speed test)
12)Minmax
stays at minimum speed until more speed is needed then goes straight to highest speed
13)Scary
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.
14) 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.
15) 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.
16)badass
Badass removes all of this "fast peaking" to the max frequency. On a typical system the cpu won't go above 918Mhz and therefore stay cool and will use less power. To trigger a frequency increase, the system must run a bit @ 918Mhz with high load, then the frequency is bumped to 1188Mhz. If that is still not enough the governor gives you full throttle. (this transition should not take longer than 2-5 seconds, depending on the load your system is experiencing) Badass will also take the gpu load into consideration. If the gpu is moderately busy it will bypass the above check and clock the cpu with 1188Mhz. If the gpu is crushed under load, badass will lift the restrictions to the cpu.
17)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.
18)Lionheartx
LionheartX is based on Lionheart but has a few changes on the tunables and features a suspend profile based on Smartass governor.
19)virtuous governor
It set your max cpu for wake and sleep and changes the governor when your device is awake or asleep. It saves battery by lowering cpu frequencys while the device sleeps, when it awakes it automatically speeds it up again. Or alternately you can set the cpu.It is based on smartassV2(It use 2 governors.one for sleep and other for awake)
Governor which is for performance and battery life-smartassV2(To get maximum performance, use ondemand or conservative)
2. I/O SCHEDULERS
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.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
Q. "Best I/O Scheduler?"
A.There is nothing called "best" i/o scheduler. Depending on your usage environment and tasks/apps been run, use different schedulers. That's the best i can suggest.
However, considering the overall performance, battery, reliability and low latency, it is believed that
SIO > Noop > Deadline > VR > BFQ > CFQ, given all schedulers are tweaked and the storage used is a flash device.
I didn't know my 'essay' could be shortened nicely this way and still convey the real idea
Questions
Question Time
Q.which governor is for performance and which one is for battery life?
A. Tough question! lulzactive and smartassV2 for a balance between performance and battery. For light weight tasks, lulzactive should be better for battery. And for heavy weight tasks, lulzactive should be better for performance also. To get maximum performance, use a tweaked ondemand or conservative, but never complain about battery. NOTE: It's not so easy to tame luzactive. If you don't know how exactly to do it, stay away from it or you will end up complaining about battery drain!
Q. "Hey, almost forgot. How do i change governors?"
A.use Voltage Control/SetCpu/No Frills/Antuntu CPU Master, etc. Nofrills has the interfaces for gpu oc/uc/uv and charge-current change if your kernel supports them. Like we guessed, these apps will tell us the active governor too.
Q. "How do i know which governor is best for me?"
A. It depends on what you need and your daily usage pattern. Performance or battery. Better choose a governor that's balanced for battery/performance. Or tweak a governor to give performance an upper-hand as compared to battery. We can always re-charge the phone:
Q. "Well i have set my favorite governor as screen-on governor and another one as screen-off governor. Why the hell is the phone not waking up after deep sleep. I need to force-restart the phone by pressing power button for about 10 secs. Is it a sleep-of-death?"
A. Yes it is. Do not use two governors as screen-on & screen-off govs, if they both have an upper frequency limit for screen-off state.
Didn't get it?
Examples for right combinations(screen-on:screen-off):-
ondemand:smartassV2, lulzactive:smartassV2
Q. "How to make my device more snappier. I don't care much about batt....err...I do care about battery life, but only in terms of avoiding unwanted power consumption. Device should instantly dance to my tunes."
A. Scale 500 to 1200 during screen-on and 200-500 during screen-off. Use performance tweaked conservative/ondemand(x). Response will be sweet. And don't worry, minimum of 500 during screen-on will not drain too much battery like you think!
Q.Which Rom is more battery friendly?
A.hmmm.....well.JJ's Hybrid.which is smooth in 800mhz
Q.What kernel will you recommend me to use?
A.Sirkays 7.3.431 kernel.Link for that thread
Q.What is the stable value for OC in Xperia Ray?
A. 1400mhz(1,4Ghz) because you'll experience some wild reboots in 1600Mhz(1.6Ghz)
Q.Is it possible to have Dual boot in Ray?
A. No
Q.What exactly is smooth scaling?
A. Ondemand governor jumps straight to max frequency a little too often. We can control this by setting a smooth scaling frequency to which the CPU will scale to first before scaling to maximum frequency. A little power saving is the target here. Note that CPU driver does smooth scaling - not governor. When CPU driver is requested by governor to scale up to max frequency, it first scales to smooth frequency, and only in the next sampling to highest frequency. Smooth scaling atm is active for ondemand
Q.What is OTG?
A. On-The-Go,is a specification that allows Xperia Ray to act as a host allowing a USB flash drive to be attached and also connecting USB peripherals directly for communication purposes among them.
Q.Q.What is BFS?
A.Brain F**k Scheduler (BFS) is a task scheduler .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. BFS has been reported to improve responsiveness.It's better for Multi Tasking
Q.What is task sheduler?
A.scheduling is the method by which threads, processes or data flows are given access to system resources (e.g. processor time, communications bandwidth). This is usually done to load balance a system effectively or achieve a target quality of service. The need for a scheduling algorithm arises from the requirement for most modern systems to perform multitasking (execute more than one process at a time) and multiplexing (transmit multiple flows simultaneously).For more info
Q.What is ZRAM?[/B]
A.It increases performance by avoiding paging on disk and instead uses a compressed block device in RAM in which paging takes place until it is necessary to use the swap space on the hard disk drive. Since using RAM is faster than using disks, zRam allows to make more use of RAM when swapping/paging is required.
Q.How to make a Zram script?
A.1. Using Root Explorer, got to /sytem/etc/init.d/
2. press Menu then create new file
3. paste these in it
Code:
#!/system/bin/sh
sysctl -w vm.swappiness=60
echo '1' > /sys/block/zram0/reset
echo $((60*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0
4. close and save it as 99zram
5. set permission to 777 or "rwxrwxrwx" (tick all)
6. take note: 60*1024*1024 = 60MB zram disksize. if you want to set 30MB, change 60 to 30.
Source-Sirkays thread
Q.Is there is any way to run Tegra,PowerVR android games on Ray?
A.Yea,you can use Chainfire3D(you have to install Tegra,PowerVR plugins too
Q.My device is not stable at 1.6 Ghz. But i still wanna overclock the device to possible maximum and show off to friends?
A.Try 1516Mhz
Q.I sometimes get unexpected reboots. What could be wrong?
A. Number of reasons.
- Problem from ROM side -wrong build.prop tweaks, etc.
- Too much UV on CPU
- Too much CPU OC
- CPU/Battery heated up too much because of weather/benchmarking/faulty charger, etc
Q.I want to help dev debug an issue providing a Log-cat. How to?
A. After the problem (random reboot/freeze/lockup), do not pull out battery to recover. Just long press power button so that device can reboot. Then connect device to PC,
Then do the following steps from this guids
Q.How to flash kernel in Xperia ray other than "fastboot flash boot <file name>.img"?
A.Use Flash-tool or this QuickIMG tool
Knight47 said:
I think you missed scary and minmax in your post.. ...Anyway your post is better than mine ...
Sent from my ST18i using XDA
Click to expand...
Click to collapse
Nice post well, actually I'm stuck with ondemand. Because the smartassv2 is too active in high freq imho and buggy with setXperia app. could you give me another recommendation?
sent from my white ray using XDA App
hansip87 said:
Nice post well, actually I'm stuck with ondemand. Because the smartassv2 is too active in high freq imho and buggy with setXperia app. could you give me another recommendation?
sent from my white ray using XDA App
Click to expand...
Click to collapse
Yeah bro. I have a problem with setxperia. My ray becomes so lazy when receives a call. Dont use setxperia. Use incredicontrol.
Sent from my ST18i using Tapatalk
Great post,very informative
Sent from my Desire using XDA Premium App
hansip87 said:
Nice post well, actually I'm stuck with ondemand. Because the smartassv2 is too active in high freq imho and buggy with setXperia app. could you give me another recommendation?
sent from my white ray using XDA App
Click to expand...
Click to collapse
Use InteractiveX............ Because I don't have any problem with that governor in set Xperia. .
Sent from my ST18i using XDA
Srkineo said:
Great post,very informative
Sent from my Desire using XDA Premium App
Click to expand...
Click to collapse
Don't forget to hit thanks
Sent from my ST18i using XDA
can explain about io?
Sent from my ST18i using XDA
blaze012345 said:
can explain about io?
Sent from my ST18i using XDA
Click to expand...
Click to collapse
I updated the post with io
Other Governors....
I updated these govenors
16)Lionheart
17)Lionheartx
Sent from my ST18i using XDA
I have two questions : first, someone can tell me where I can download Aire Kernel V2 ?
Then I think that's an easy question but i was wondering : when I download a kernel, when do i choose the I/O scheduler ? (like noop...)
IIMatII said:
I have two questions : first, someone can tell me where I can download Aire Kernel V2 ?
Then I think that's an easy question but i was wondering : when I download a kernel, when do i choose the I/O scheduler ? (like noop...)
Click to expand...
Click to collapse
In RayOniumICS topic. And use No-frills CPU to choose I/O (can download on gg play)
Sent from my ST18i using Forum Runner
@Knight try looking for badass gov. heard that it is a good gov too. wana get it work to kernel
Sent from my ST18i using xda premium
sirkay said:
@Knight try looking for badass gov. heard that it is a good gov too. wana get it work to kernel
Sent from my ST18i using xda premium
Click to expand...
Click to collapse
My name is knight47 not knight
BTW I updated governors with badass(Stay cool and use less power)
Knight47 said:
My name is knight47 not knight
BTW I updated governors with badass(Stay cool and use less power)
Click to expand...
Click to collapse
lazy to mentioned fullname
Sent from my ST18i using xda premium
sirkay said:
lazy to mentioned fullname
Sent from my ST18i using xda premium
Click to expand...
Click to collapse
Hahaha
Sent from my Xperia Ray using xda premium
@knight47 how does virtuous governor in sirkays new kernel work?
Sent from my Xperia ray using XDA
gauravcd said:
@knight47 how does virtuous governor in sirkays new kernel work?
Sent from my Xperia ray using XDA
Click to expand...
Click to collapse
virtuous governor
It set your max cpu for wake and sleep and changes the governor when your device is awake or asleep. It saves battery by lowering cpu frequencys while the device sleeps, when it awakes it automatically speeds it up again. Or alternately you can set the cpu
I updated my 1st post
hi friends i want to explain about: CPU Governors and I/O Schedulers
This is a collection of some references that I got on google: D
may be useful: D
CPU Governors:
1: OnDemand Governor:
This governor has a hair trigger for boosting clockspeed to the maximum speed set by the user. If the CPU load placed by the user abates, the OnDemand governor will slowly step back down through the kernel's frequency steppings until it settles at the lowest possible frequency, or the user executes another task to demand a ramp.
OnDemand has excellent interface fluidity because of its high-frequency bias, but it can also have a relatively negative effect on battery life versus other governors. OnDemand is commonly chosen by smartphone manufacturers because it is well-tested, reliable, and virtually guarantees the smoothest possible performance for the phone. This is so because users are vastly more likely to ***** about performance than they are the few hours of extra battery life another governor could have granted them.
This final fact is important to know before you read about the Interactive governor: OnDemand scales its clockspeed in a work queue context. In other words, once the task that triggered the clockspeed ramp is finished, OnDemand will attempt to move the clockspeed back to minimum. If the user executes another task that triggers OnDemand's ramp, the clockspeed will bounce from minimum to maximum. This can happen especially frequently if the user is multi-tasking. This, too, has negative implications for battery life.
2: Performance Governor:
This locks the phone's CPU at maximum frequency. While this may sound like an ugly idea, there is growing evidence to suggest that running a phone at its maximum frequency at all times will allow a faster race-to-idle. Race-to-idle is the process by which a phone completes a given task, such as syncing email, and returns the CPU to the extremely efficient low-power state. This still requires extensive testing, and a kernel that properly implements a given CPU's C-states (low power states).
3: Powersave Governor:
The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
4:Conservative Governor:
This biases the phone to prefer the lowest possible clockspeed as often as possible. In other words, a larger and more persistent load must be placed on the CPU before the conservative governor will be prompted to raise the CPU clockspeed. Depending on how the developer has implemented this governor, and the minimum clockspeed chosen by the user, the conservative governor can introduce choppy performance. On the other hand, it can be good for battery life.
5: Userspace Governor:
This governor, exceptionally rare for the world of mobile devices, allows any program executed by the user to set the CPU's operating frequency. This governor is more common amongst servers or desktop PCs where an application (like a power profile app) needs privileges to set the CPU clockspeed.
6: Min Max
well this governor makes use of only min & maximum frequency based on workload... no intermediate frequencies are used.
7: Interactive Governor:
Much like the OnDemand governor, the Interactive governor dynamically scales CPU clockspeed in response to the workload placed on the CPU by the user. This is where the similarities end. Interactive is significantly more responsive than OnDemand, because it's faster at scaling to maximum frequency.
8: InteractiveX Governor:
InteractiveX governor is based heavily on the Interactive governor, enhanced with tuned timer parameters to better balance battery vs. performance. The InteractiveX governor's defining feature, however, is that it locks the CPU frequency to the user's lowest defined speed when the screen is off.
9: 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.
10: 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.
11: Smartass
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
12: 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.
13: Brazilianwax:
Similar to smartassV2. More aggressive ramping, so more performance, less battery
14: SavagedZen:
Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
15: 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.
18: Lionheart:
Lionheart is a conservative-based governor which is based on samsung's update3 source.
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.
I/O Schedulers:
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.
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.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
"so we had to try it so we know which one is better for our phone"
*nb:
references above may be less appropriate.
Wow this information is really useful thank you a lot!!
Enviado desde mi GT-S5830
It was about time. I had been looking for this but I just got bits and pieces around. Thanks a lot for the info.
Sent from my GT-S5830 using xda app-developers app
Great explanation
POTATO!!!!
i see
More Info
atleast give references to og links where IO schedulers are explained
and Y U NO Love BFQ ??
Whao! This was the kind of information, all at one place that I needed! Thanx a lot!
madman said:
i see
More Info
atleast give references to og links where IO schedulers are explained
and Y U NO Love BFQ ??
Click to expand...
Click to collapse
bfq isn't explained
Sent from Ursa's claws.
CallMeVentus said:
bfq isn't explained
Sent from Ursa's claws.
Click to expand...
Click to collapse
as i am learning from bfq's developer site it is best for heavy multi-taskers
DEV SITE
and i am using it as default in my kernel which will be up with 1.1Ghz OC in our group today LOL
madman said:
as i am learning from bfq's developer site it is best for heavy multi-taskers
DEV SITE
and i am using it as default in my kernel which will be up with 1.1Ghz OC in our group today LOL
Click to expand...
Click to collapse
I just tried bfq for an entire day today.....it seems to lag whenever I lock the phone while playing music....but overall performance has been inproved.....better than cfq IMO.....however I feel that deadline is better (albeit the not-so-good performance)
Sent from Ursa's claws.
CallMeVentus said:
I just tried bfq for an entire day today.....it seems to lag whenever I lock the phone while playing music....but overall performance has been inproved.....better than cfq IMO.....however I feel that deadline is better (albeit the not-so-good performance)
Sent from Ursa's claws.
Click to expand...
Click to collapse
upto bfq v4 there was problem of latency.. but in v5 its resolved..
i have been using it since 2-3 days and overall performance is good..
deadline is good too but it does suffer when system is in heavy load
IMO heavy multitasking is where bfq shows potential.. when less load noop/deadline gives somewhat better throuput
madman said:
upto bfq v4 there was problem of latency.. but in v5 its resolved..
i have been using it since 2-3 days and overall performance is good..
deadline is good too but it does suffer when system is in heavy load
IMO heavy multitasking is where bfq shows potential.. when less load noop/deadline gives somewhat better throuput
Click to expand...
Click to collapse
Y U NO make CM7.x kernel ?!!
Sent from Ursa's claws.
CallMeVentus said:
Y U NO make CM7.x kernel ?!!
Sent from Ursa's claws.
Click to expand...
Click to collapse
Y U NO GIVE cyanX battery comparable to stock
i like stability and performance of latest stocks (ktq)..
Code:
if(VentusOptimiseCyanX() == true)
SwitchToCM7();
else
TrollOMG();
madman said:
Y U NO GIVE cyanX battery comparable to stock
i like stability and performance of latest stocks (ktq)..
Code:
if(VentusOptimiseCyanX() == true)
SwitchToCM7();
else
TrollOMG();
Click to expand...
Click to collapse
Sent from Ursa's claws.
CallMeVentus said:
Sent from Ursa's claws.
Click to expand...
Click to collapse
unpack my boot.img and get zimage..
Repack it with cm7 ramdisk with proprietory modules from my ramdisk and you are done lol...else give me a boot.img of your current rom
madman said:
unpack my boot.img and get zimage..
Repack it with cm7 ramdisk with proprietory modules from my ramdisk and you are done lol...else give me a boot.img of your current rom
Click to expand...
Click to collapse
Lol use dragonnn's extract mode hahahahahaha
Sent from Ursa's claws.
The best setting kernel for ace
so what do you think, the best settings for your ace?
please share.
and if you can show the benchmark*for comparison.
thanks. :fingers-crossed:
stealthware said:
so what do you think, the best settings for your ace?
please share.
and if you can show the benchmark*for comparison.
thanks. :fingers-crossed:
Click to expand...
Click to collapse
245-800MHz ondemand bfq
atarquino said:
Very good, thank you.
Click to expand...
Click to collapse
Youre welcome brother
Sent from my GT-S5830 using Tapatalk 2