[Defy Android Development] ela1103:
Categorization:

There are four different categories CPU governors can exist as.

1) 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, PegasusQ, HYPER, Wheatley, Hotplug, HotplugX, AbyssPlug, AbyssPlugv2, Nightmare, Sleepy.

2) Conservative Based:

Works by biasing the phone to prefer the lowest possible clockspeed as often as possible. Members: Conservative, Lionheart, LionheartX

3) Interactive Based:

Works on "make scaling decision when CPU comes out of idle-loop" principle. Members: Interactive, InteractiveX, Intelliactive, Lulzactive, Luzactiveq, Smartass, SmartassV2, SmartassH3, Brazilianwax, SavagedZen, Dyninteractive.

4) Unique Category:

These do not fall into any other category above and/or possess unique attributes. Members: Userspace, Powersave, Performance, Min Max, ZZmove, MSM DCVS

5) Hybrid Category:

These have a mix of two (or more) CPU governor behaviors. Members: Smartmax, Dancedance, Performance May Cry(PMC), Ktoonservative, KtoonservativeQ

For balanced battery saving and performance:

Single-core:

- Interactive/Intelliactive - Best

- Ondemand/OndemandX - Stock, Great

- SmartassV2 - Great

Multi-core:

- MSM DCSV - Great, not common

- Lulzactive - Requires tuning

- Intelliactive- Great

- Interactive(X) - Great

- Ondemand/OndemandX - Stock, Great

- Pegasus(q/d) - Best

- SmartassV2 - Great*

- Wheatley - Good

- Hotplug/HotplugX - Good*

- HYPER - Great

- ZZMove - Requires tuning

For gaming:

Single-core: - Interactive(X) - Best

- Performance - Good

- Ondemand/OndemandX - Great

- SmartassV2 - Great

Multi-core:

- Lionheart - Great

- Dancedance - Great

- Intelliactive - Great

- ZZMove - Requires tuning

- SmartassV2 - Great

- Pegasus(Q/D) - Best

- Ondemand/OndemandX - Great

- Hyper - Great

- Performance - Good

- Lulzactive - Great

- Intellidemand -Good

Here is a graph of the battery drain of the CPU governors listed

http://i.imgur.com/j9ZrHX2.png

http://i.imgur.com/SalDo6x.png

Ondemand

Much like the CPU governor, Ondemand will ramp up the frequency when a load is detected. A good balance between performance and battery savings.*

MSM-Adreno

The default GPU governor used by qualcomm for their adreno GPUs. It is more performance orientated than ondemand therefore it gives better performance in games but less battery life.*

Performance

As the name suggests, this keeps your GPU running at the max frequency. This is a governor if you want the best possible experience in games but you don't care about your battery life.*

Powersave

Like the CPU governor, this keeps your GPU running at the lowest possible frequency. Best battery life,

I/O Schedulers

What is an I/O Scheduler:

*Input/output (I/O) scheduling is a term used to describe the method computer operating systems decide the order that block I/O operations will be submitted to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'.

I/O schedulers can have many purposes depending on the goal of the I/O scheduler, some common goals are:

To minimise time wasted by hard disk seeks.

To prioritise a certain processes' I/O requests.

To give a share of the disk bandwidth to each running process.

To guarantee that certain requests will be issued before a particular deadline.

Why change your phones I/O Scheduler?

Most phone manufacturers keep your phones I/O Schedulers locked so users are unable to modify any values which could change the performance of your phone. However, once your phone is rooted, you can change these values allowing the potential to boost your phones performance and even slightly increase battery life. Here is a thorough guide on all of the common i/o schedulers.

Available*I/O schedulers

CFQ *

Deadline *

VR *

Noop*

Anticipatory

BFQ

FIOPS

SIO (Simple)

Row

ZEN

Sioplus

FIFO*

Tripndroid

Anticipatory:*

Two important things here are indicative of that event:*

- Looking on the flash drive is very slow from boot

- Write operations while at any time are processed, however, be read operations preferred, ie, this scheduler returns the read operations a higher priority than the write operations.*

Benefits:*

- Requests of read accesses are never treated secondarily, that has equally good reading performance on flash drives like noop.

Disadvantages:*

- Requests from process operations are not always available*

- Reduced write performance on high-performance hard drives*

- Not very common in most kernels

CFQ:*

The CFQ - Completely Fair Queuing - similar to the Dead Line maintains a scalable continuous Process-I/O, the available I / O bandwidth is *fairly and evenly shared to all I / O requests to distribute. It creates a statistics between blocks and processes. With these statistics it can "guess" when the next block is requested by what process, each process queue contains requests of synchronous processes, which in turn is dependent upon the priority of the original process. There the V2 version has some fixes, such as I / O request improvements, hunger fixes , and some small search backward integrated to improve responsiveness.This is the default IO scheduler for Samsung smartphones.*

Benefits:*

- Has a well balanced I / O performance

- Excellent on multiprocessor systems*

- Easiest to tune.

- Best performance of the database after the deadline*

- Is the default IO scheduler for most mobile phones today

- Good for multitasking*

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) can sometimes be very high because the number of competing with each other process tasks*

Deadline:*

This scheduler has the goal of reducing I / O wait time of a process of inquiry. This is done using the block numbers of the data on the drive. This also blocks an outlying block numbers are processed, each request receives a maximum delivery time. This is in addition to the Governor BFQ, it is very popular and is in many well known kernels.*

Benefits:*

- It is nearly a real-time scheduler.*

- Excels in reducing latency of any given single I/O*

- Best scheduler for database access and queries.*

- Does quite well in benchmarks, most likely the best

- Like noop, a good scheduler for solid state/flash drives

- Good for light and medium multitasking workloads

Disadvantages:*

- If the phone is overloaded, crashing or unexpected closure of processes can occur*

- Bad battery life if doing a lot of multitasking

ROW:

ROW stands for "READ Over WRITE"which is the main requests dispatch policy of this algorithm. The ROW IO scheduler was developed with the mobile devices needs in mind. In mobile devices we favor user experience upon everything else,thus we want to give READ IO requests as much priority as possible. In mobile devices we won't have as much parallel threads as on desktops. Usually it's a single thread or at most 2 simultaneous working threads for read & write. Favoring READ requests over WRITEs decreases the READ latency greatly.

The main idea of the ROW scheduling policy is: If there are READ requests in pipe - dispatch them but don't starve the WRITE requests too much. Bellow you'll find a small comparison of ROW to existing schedulers. The test that was run for these measurements is parallel read and write.

Benefits:

- Faster UI navigation and better overall phone experience

- Faster boot times and app launch times*

- Possibly better battery life

- Sometimes used by default for custom roms and custom kernels

Disadvantages:

- Slower write speeds

- Some intensive applications like games could slow down your phone

SIO (Simple):*

It aims to achieve with minimal effort at a low latency I / O requests. Not a priority to put in queue, instead simply merge the requests. This scheduler is a mix between the noop and deadline. There is no conversion or sorting of requests.*

Benefits:*

- It is simple and stable.

- Reliable IO scheduler

- Minimized starvation for inquiries

- Good battery life

Disadvantages:*

- Slow random write speeds on flash drives as opposed to other schedulers.

- Sequential read speeds on flash drives, not as good*

Noop:*

The noop scheduler is the simplest of them. It is best suited for storage devices that are not subject to mechanical movements, such as our flash drives in our phones use to access the data. The advantage is that flash drives do not require rearrangement of the I / O requests, unlike normal hard drives. the data that come first are written first. It's basically not a real scheduler, as it leaves the scheduling of the hardware.*

Benefits:*

- Serves I/O requests with least number of cpu cycles.

- Is suitable for flash drives because there is no search errors*

- Good data throughput on db systems

Disadvantages:*

- Reducing the number of CPU cycles corresponds to a simultaneous decline in performance*

- Not very good at multitasking

VR:*

Unlike other scheduling software, synchronous and asynchronous requests are not handled separately, but it will impose a fair and balanced within this deadline requests, that the next request to be served is a function of distance from the last request. It is a very good scheduler with elements of the deadline scheduler. It is the best for MTD Android devices. Vr can make the most of the benchmark points, but it is also an unstable scheduler. *Sometimes the scores fluctuate below the average, sometimes it fluctuates above the average.*

Benefits:

- Generally excels in random writes.*

Disadvantages:*

- Performance variability can lead to different results (Only performs well sometimes)

- Very often unstable and unreliable

BFQ:*

Instead requests divided into time segments as the CFQ has, on the BFQ budget. The flash drive will be granted an active process until it has exhausted its budget (number of sectors on the flash drive). The awards BFQ high budget does not read tasks. BFQ has received many updates to the scheduler and the performance is consistently improving.*

Benefits:*

- Has a very good USB data transfer rate.*

- The best scheduler for playback of HD video recording and video streaming (due to less jitter than CFQ Scheduler, and others)*

- Regarded as a very precise working Scheduler*

- Delivers 30% more throughput than CFQ

- Being constantly updated

- Good for multitasking*

Disadvantages:*

- Not the best scheduler for benchmarks*

- Higher budgets that were allocated to a process that can affect the interactivity and bring with it increased latency.*

- Slower UI navigation

- Slower boot times

ZEN:

Based on the VR Scheduler. It's an FCFS (First come, first serve) based algorithm. It's not strictly FIFO. It does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ons. Other than that, pretty much the same as no-op.

Benefits:

- Well rounded IO Scheduler

- Very efficient IO Scheduler

- More stable than VR, mainly because it doesn't really behave like VR.*

Disadvantages:

- Not found in all kernels

Sioplus:

Based on the original Sio scheduler with improvements. Functionality for specifying the starvation of async reads against sync reads; starved write requests counter only counts when there actually are write requests in the queue; fixed a bug).*

Benefits:

- Better read and write speeds than previous SIO scheduler

- Good battery life*

Disadvantages:

- The same as SIO scheduler

- Not found in all kernels

FIOPS:*

This new I/O scheduler is designed around the following assumptions about Flash-based storage devices: no I/O seek time, read and write I/O cost is usually different from rotating media, time to make a request depends upon the request size, and high through-put and higher IOPS with low-latency.

Benefits:

- Achieves high read and write speeds in benchmarks

- Good battery life

Disadvantages:

- Not very common in most kernels

FIFO (First in First Out):

A relatively simple io schedulers that does what has been described. It is also known as FCFS (First come first serve) but this really isn't true. It does basic sorting; sorting the processes according to the appropriate order and nothing else. In other words, it is quite similar to noop.*

Benefits:

- Serves I/O requests with least number of cpu cycles.

- Is suitable for flash drives because there is no search errors

- Good data throughput on db systems

Disadvantages:

- Reducing the number of CPU cycles corresponds to a simultaneous decline in performance*

- Not very good at multitasking

Tripndroid

A new I/O scheduler based on noop, deadline and vr and meant to have minimal overhead. Made by TripNRaVeR

Recommended IO schedulers:

For everyday usage:

- SIO (My personal favourite)

- NOOP

- CFQ (Third choice)

- Deadline (Forth choice)

- ROW (My second choice)

- ZEN

For battery life:

- SIO (First choice)

- FIOPS*

- NOOP (Second choice)

- ROW (Third choice)

- FIFO

For gaming:*

- Deadline (First choice)

- CFQ (Second choice)*

- ROW (Third choice)

For performance(Benchmarking):

- VR

- SIO (Third Choice)

- Deadline (Second choice)

- FIOPS (First choice)*

For multitasking:*

- BFQ (Third choice)

- Deadline (Second choice)

- CFQ (First choice)

IO Scheduler Comparison

Overall performance:

Best<------------------------------------------------------------------------->Worst

FIOPS> Noop > ZEN >SIOplus > SIO > ROW > Tripndroid > VR > Deadline > BFQ > CFQ

Multitasking performance:

Less Apps<------------------------------------------------------------>Many Apps

Noop < FIOPS < SIO < *SIOplus < ROW < Tripndroid < ZEN < Deadline < VR < *CFQ < BFQ

Battery life:

Best<-------------------------------------------------------------------------> Worst

Noop > FIOPS > SIOplus > SIO > ROW> *ZEN > Tripndroid > Deadline > VR > CFQ > BFQ

http://4.bp.blogspot.com/-Ch3Bpq59JPw/U3uHt9RK8MI/AAAAAAAAAng/wph5yNqkmYQ/s1600/Rand-IO.png

http://2.bp.blogspot.com/-E8uS1WK2_TU/U3uHsueDkNI/AAAAAAAAAnY/AKLUFhSd4ZE/s1600/Seq-IO.png

http://2.bp.blogspot.com/-ZE5yDOoeOcY/U3uUjPTh_JI/AAAAAAAAAno/bOeiljIdv90/s1600/detlapercent.png

http://1.bp.blogspot.com/-An9priF53CU/U3z5xe90e3I/AAAAAAAAAn4/7dLYYngERtw/s1600/SQlite-IO.png

http://4.bp.blogspot.com/-jkHD94ij7...AoA/2n1TZg-WG74/s1600/SQlite-deltapercent.png

AS PER MY OWN REVIEW

IO schedulers

1.FLOPS (We NEED FOR OUR YU YUREKA)

2.NOOPS(ITS ALREADY IN STOCK CM11S)

Noops Iam using in My Moto Defy*

CPU GOVERNERS

1.SMART ASS V2(We NEED FOR OUR YU YUREKA)

2.SMOTHASS(We NEED FOR OUR YU YUREKA)Smartass v2 iam using in MY MOTO DEFY*

Source From*

XDA FORUM*

Androidmodguide

Andrux-and-Me