[T-Mobile, Samsung Galaxy SIII] Perseus:
3. I/O SCHEDULER –

Scheduler Guide Link

This menu offers a choice of all the android Schedulers available in this kernel.
​

Given that there are so many excellent guides on the individual Schedulers, I do not wish to provide the same information again. (Besides this is indeed a vast topic by itself.) So without going to specific details, I am going to summarize what it means from a layman's point of view. For those with more technical inclination, I have provided a link to read further on each scheduler.

Think of an I/O Scheduler like an executive assistant to the Disc or storage of the phone. Just like the assistants, it effectively manages the disc reads or writing to it for all the processes. In particular, it determines what process gets prioritized and/or bandwidth. You have to understand; that each app you run has its own process as well as child processes it triggers. In addition, the OS too has its own processes that monitor various aspects of the phone. Effectively these are all the processes competing for the reading or writing. Based on that knowledge, you can choose whatever works best for your usage pattern. Later on I will be providing some sample settings to get you started.

Noop:

The noop scheduler is the simplest of them. It is best suited for Cell phone storage since it is flash media. As the flash drives do not require rearrangement of the I/O requests, the data that come first is written first (First in First Out). It's basically not a real scheduler, as it leaves out the scheduling of the hardware.

Benefits:

- Adds all incoming I / O requests in a first-come-who-first-served queue and implements requests with the fewest number of CPU cycles, so also battery friendly

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

- Good data throughput on db systems

- Is nearly a real-time scheduler.

- Characterized by reducing the waiting time of each process from - best scheduler for database access and queries.

- Bandwidth requirements of a process, eg what percentage CPU is used is easy to calculate.

Disadvantages:

- If the system is overloaded, it may lose a set of processes, and is not as easy to predict

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

Deadline:

This scheduler has the goal of reducing I/O wait time of a process. This is done using the block numbers of the data on the drive. This also controls how outlying block numbers are processed, each request receives a maximum delivery time. This is in very popular like BFQ and Deadline:

Benefits:

- Is nearly a real-time scheduler.

- Characterized by reducing the waiting time of each process from - best scheduler for database access and queries.

- Bandwidth requirements of a process, eg what percentage does a CPU is easy to calculate.

- noop is ideal for flash drives

Disadvantages:

- If the system is overloaded, can go a lost set of processes, and is not as easy to predict. It is indeed better than the BFQ, but VR is even better.

ROW:

Reference - http://lwn.net/Articles/509829/

Read Over Write Scheduler. This scheduler ignores or backpedals the disc write operations, giving higher priority to the Read Operations.

Mobile devices prefer user experience; hence, the READ IO requests get as much priority as possible. The main idea is, if there are READ requests in pipe - dispatch them but don't delay the WRITE requests too much.

All the incoming requests are kept in multiple queues according to their priority. The dispatching of requests is done in a Merry-Go-Round fashion with a different slice of time for each queue.

Presently there are 6 types of queues the requests are parked in

[FONT=&quot]- [/FONT]High priority READ queue

[FONT=&quot]- [/FONT]High priority Synchronous WRITE queue

[FONT=&quot]- [/FONT]Regular priority READ queue

[FONT=&quot]- [/FONT]Regular priority Synchronous WRITE queue

[FONT=&quot]- [/FONT]Regular priority WRITE queue

[FONT=&quot]- [/FONT]Low priority READ queue

If in a certain dispatch cycle one of the queues was empty and didn't use its time, that queue will be marked as "un-served". For Ex. While in the middle of executing requests of Queue Y, a request comes to queue X (X having more priority over Y), and was un-served in the previous cycle. Then queue X will be preempted over queue Y. This won't restart the cycle. Once queue Y is done with its request, scheduler will go back to X, and allow it to finish it's request, before proceeding with resto fo the queues in the cycle.

For READ request queues idling is allowed to give the application(s) a chance to add more requests. The idling is enabled if the application is making requests in rapid succession.

ROW scheduler will support special services for memory cards that

support High Priority Requests. In addition it will support rescheduling of interrupted requests. For example, while working on a long write request, a sudden high priority read request comes in, the scheduler will inform the device and the device can stop the write request to serve the high priority read request. In such a case the device may send back the interrupted write request so that the scheduler will send it later according to the scheduler policy.

CFQ:

CFQ (Completely Fair Queuing) is similar to the Deadline. It maintains a scalable continuous Process-I/O The available I/ O bandwidth is used fairly and evenly to all I/O requests to distribute. It creates a statistics of blocks and processes. This is then used to guess when the next block is requested by what process, ie each process queue contains requests of synchronous processes, which in turn is dependent upon the priority of the original process. There is a second version with some fixes, such as allowing the request to starve, and some small search backward integrated to improve the responsiveness.

Benefits:

- It has the goal of a balanced I/O performance to deliver

- The easiest way one set

- Excellent on multiprocessor systems

- Best performance of the database after the deadline

Disadvantages:

- Some reported user that the media scanning would take very long time

- The fair and even distribution of bandwidth can cause delays in the boot process.

- Jitter (worst case delay) can be caused sometimes because of the number of competing with each other process tasks

BFQ:

Requests divided into time segments as the CFQ, but on a budget. The flash drive will be granted an active process until it has exhausted its budget (number of sectors on the flash drive).

Benefits:

- Has a very good USB data transfer rate.

- Be 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

FIOPS:

Fair, Efficient Flash I/O Scheduler is geared for the modern Flash based storage media well. I haven’t been able to find a lot of documentation for this. Will keep looking.

SIO:

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. - Minimized Starvation for inquiries

Disadvantages:

- Slow random write speeds on flash drives as opposed to other schedulers. - Sequential read speeds on flash drives, not as good

V(R):

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. He will probably be the best for MTD Android devices. It also makes the most out of the benchmark points, but is also unstable scheduler, because its performance can fluctuates below or above average.

Benefits:

- Is the best scheduler for benchmarks

Disadvantages:

- Performance variability can lead to different results

- Very often unstable

ZEN:

This Scheduler is actually based on a combination of NOOP, SIO & VR Schedulers. This scheduler combines Synchronous & Asynchronous requests with same priority. It uses a deadline in order to derive or determine priority of a process.

FIFO:

First in First Out Scheduler. As the name says, it implements a simple priority method based on processing the requests as they come in.