[Q] CPU Governors and I/O Schedulers

Search This thread

nasye

Member
Mar 19, 2013
43
4
Zagreb
Can anyone recommend whats best to use to get max battery life with reasonable performace ( btw i dont do heavy gaming, only CoC from time to time :p ) and mabey some additional governor settings for stock 4.4.2.
My kernel supports:

Governors:
-ondemand
-interactive
-userspace
-powersave
-performance

Schedulers:
-noop
-deadline
-row
-cfq

Thanks in advance
 
Last edited:
  • Like
Reactions: razkal1

hhp_211

Senior Member
May 15, 2008
1,832
926
Can anyone recommend whats best to use to get max battery life with reasonable performace ( btw i dont do heavy gaming, only CoC from time to time :p ) and mabey some additional governor settings for stock 4.4.2.
My kernel supports:

Governors:
-ondemand
-interactive
-userspace
-powersave
-performance

Schedulers:
-noop
-deadline
-row
-cfq

Thanks in advance

everybody's usage varies, just try them out and make a record of what you got from each one then go back and check out to see what worked best for you

-----------------------------------------------------------------------------------------------------------------------------------------------------
laggy? Snappy? Battery life? SOT [screen on time]?
-----------------------------------------------------------------------------------------------------------------------------------------------------

-ondemand:::-noop
-ondemand:::-deadline
-ondemand:::-row
-ondemand:::-cfq

--------------------------------------------------------------------------------------------------

-interactive:::-noop
-interactive:::-deadline
-interactive:::-row [stock setup]
-interactive:::-cfq

--------------------------------------------------------------------------------------------------


--------------------------------------------------------------------------------------------------

[-powersave]::: .not really worth trying, probably gonna lag if you try to game, etc. CPU frequency at the lowest frequency when doing a task
[-performance]::: May not be worth trying, it runs max cpu all the time when doing a task [1200 Mhz] it will idle and sleep though if kernel allows it and is set up that way
[-Userspace]::: This governor, exceptionally rare for the world of mobile devices

--------------------------------------------------------------------------------------------------

:::: 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.

--------------------------------------------------------------------------------------------------

:::: 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.

Unlike OnDemand, which you'll recall scales clockspeed in the context of a work queue, Interactive scales the clockspeed over the course of a timer set arbitrarily by the kernel developer. In other words, if an application demands a ramp to maximum clockspeed (by placing 100% load on the CPU), a user can execute another task before the governor starts reducing CPU frequency. This can eliminate the frequency bouncing discussed in the OnDemand section. Because of this timer, Interactive is also better prepared to utilize intermediate clockspeeds that fall between the minimum and maximum CPU frequencies. This is another pro-battery life benefit of Interactive.

However, because Interactive is permitted to spend more time at maximum frequency than OnDemand (for device performance reasons), the battery-saving benefits discussed above are effectively negated. Long story short, Interactive offers better performance than OnDemand (some say the best performance of any governor) and negligibly different battery life.

Interactive also makes the assumption that a user turning the screen on will shortly be followed by the user interacting with some application on their device. Because of this, screen on triggers a ramp to maximum clockspeed, followed by the timer behavior described above.

-----------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------

:::Noop:
The noop scheduler is the simplest of them. He is best suited for storage devices that are not subject to mechanical movements, such as our flash drives in our SGSII's to use to access the data. The advantage is that flash drives do not require rearrangement of the I / O requests, unlike normal hard drives. ie the data that come first are written first. He's basically not a real scheduler, as it leaves 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

Disadvantages:
- Reducing the number of CPU cycles corresponds to a simultaneous decline in performance einhergehendem

--------------------------------------------------------------------------------------------------

:::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 very popular and in many well known kernels, such as the Nexus S Netarchy. He was indeed better than the BFQ, but compared to the VR he will be weaker.

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.
- As the Governor-noop ideal for flash drives

Disadvantages:
- If the system is overloaded, can go a lost set of processes, and is not as easy to predict

--------------------------------------------------------------------------------------------------
:::Row:
Q: What is the ROW I/O scheduler?
A: ROW stands for "READ Over WRITE"


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.


--------------------------------------------------------------------------------------------------


:::CFQ:
The CFQ - Completely Fair Queuing - similar to the Dead Line maintains a scalable continuous Prozess-I/O-Warteschlange, ie the available I / O bandwidth tried fairly and evenly to all I / O requests to distribute. He created a statistics between blocks and processes. With these statistics it can "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 V2 and the CFQ has some fixes, such as were the I / O request, hunger, and some small search backward integrated to improve the responsiveness.

Benefits:
- Has the goal of a balanced I / O performance to deliver
- The easiest way to set
- Excellent on multiprocessor systems
- Best performance of the database after the deadline

Disadvantages:
- Some reported user that the media scanning would take this very very long time and this by the very fair and even distribution of bandwidth on the I / O operations during the boot process is conditioned with the media scanning is not necessarily the highest should have priority
- Jitter (worst case delay) can sometimes be very high because the number of competing with each other process tasks

--------------------------------------------------------------------------------------------------
credits
http://xdaforums.com/showthread.php?t=1663809
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Can anyone recommend whats best to use to get max battery life with reasonable performace ( btw i dont do heavy gaming, only CoC from time to time :p ) and mabey some additional governor settings for stock 4.4.2.
    My kernel supports:

    Governors:
    -ondemand
    -interactive
    -userspace
    -powersave
    -performance

    Schedulers:
    -noop
    -deadline
    -row
    -cfq

    Thanks in advance

    everybody's usage varies, just try them out and make a record of what you got from each one then go back and check out to see what worked best for you

    -----------------------------------------------------------------------------------------------------------------------------------------------------
    laggy? Snappy? Battery life? SOT [screen on time]?
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    -ondemand:::-noop
    -ondemand:::-deadline
    -ondemand:::-row
    -ondemand:::-cfq

    --------------------------------------------------------------------------------------------------

    -interactive:::-noop
    -interactive:::-deadline
    -interactive:::-row [stock setup]
    -interactive:::-cfq

    --------------------------------------------------------------------------------------------------


    --------------------------------------------------------------------------------------------------

    [-powersave]::: .not really worth trying, probably gonna lag if you try to game, etc. CPU frequency at the lowest frequency when doing a task
    [-performance]::: May not be worth trying, it runs max cpu all the time when doing a task [1200 Mhz] it will idle and sleep though if kernel allows it and is set up that way
    [-Userspace]::: This governor, exceptionally rare for the world of mobile devices

    --------------------------------------------------------------------------------------------------

    :::: 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.

    --------------------------------------------------------------------------------------------------

    :::: 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.

    Unlike OnDemand, which you'll recall scales clockspeed in the context of a work queue, Interactive scales the clockspeed over the course of a timer set arbitrarily by the kernel developer. In other words, if an application demands a ramp to maximum clockspeed (by placing 100% load on the CPU), a user can execute another task before the governor starts reducing CPU frequency. This can eliminate the frequency bouncing discussed in the OnDemand section. Because of this timer, Interactive is also better prepared to utilize intermediate clockspeeds that fall between the minimum and maximum CPU frequencies. This is another pro-battery life benefit of Interactive.

    However, because Interactive is permitted to spend more time at maximum frequency than OnDemand (for device performance reasons), the battery-saving benefits discussed above are effectively negated. Long story short, Interactive offers better performance than OnDemand (some say the best performance of any governor) and negligibly different battery life.

    Interactive also makes the assumption that a user turning the screen on will shortly be followed by the user interacting with some application on their device. Because of this, screen on triggers a ramp to maximum clockspeed, followed by the timer behavior described above.

    -----------------------------------------------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    :::Noop:
    The noop scheduler is the simplest of them. He is best suited for storage devices that are not subject to mechanical movements, such as our flash drives in our SGSII's to use to access the data. The advantage is that flash drives do not require rearrangement of the I / O requests, unlike normal hard drives. ie the data that come first are written first. He's basically not a real scheduler, as it leaves 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

    Disadvantages:
    - Reducing the number of CPU cycles corresponds to a simultaneous decline in performance einhergehendem

    --------------------------------------------------------------------------------------------------

    :::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 very popular and in many well known kernels, such as the Nexus S Netarchy. He was indeed better than the BFQ, but compared to the VR he will be weaker.

    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.
    - As the Governor-noop ideal for flash drives

    Disadvantages:
    - If the system is overloaded, can go a lost set of processes, and is not as easy to predict

    --------------------------------------------------------------------------------------------------
    :::Row:
    Q: What is the ROW I/O scheduler?
    A: ROW stands for "READ Over WRITE"


    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.


    --------------------------------------------------------------------------------------------------


    :::CFQ:
    The CFQ - Completely Fair Queuing - similar to the Dead Line maintains a scalable continuous Prozess-I/O-Warteschlange, ie the available I / O bandwidth tried fairly and evenly to all I / O requests to distribute. He created a statistics between blocks and processes. With these statistics it can "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 V2 and the CFQ has some fixes, such as were the I / O request, hunger, and some small search backward integrated to improve the responsiveness.

    Benefits:
    - Has the goal of a balanced I / O performance to deliver
    - The easiest way to set
    - Excellent on multiprocessor systems
    - Best performance of the database after the deadline

    Disadvantages:
    - Some reported user that the media scanning would take this very very long time and this by the very fair and even distribution of bandwidth on the I / O operations during the boot process is conditioned with the media scanning is not necessarily the highest should have priority
    - Jitter (worst case delay) can sometimes be very high because the number of competing with each other process tasks

    --------------------------------------------------------------------------------------------------
    credits
    http://xdaforums.com/showthread.php?t=1663809
    1
    Can anyone recommend whats best to use to get max battery life with reasonable performace ( btw i dont do heavy gaming, only CoC from time to time :p ) and mabey some additional governor settings for stock 4.4.2.
    My kernel supports:

    Governors:
    -ondemand
    -interactive
    -userspace
    -powersave
    -performance

    Schedulers:
    -noop
    -deadline
    -row
    -cfq

    Thanks in advance
    1
    although wheatley governor is not here, i HIGHLY reccommend it.