[GUIDE] CPU Governors Explained in Detail for Android....

2,730 posts
Thanks Meter: 2,432
 
By mj.vikram, Senior Member on 27th August 2012, 05:08 PM
Post Reply Email Thread
Many of us don't know what is CPU Governor's and which suites them perfectly, so after doing some Googling i am writing these.

What is a CPU governor?

A CPU governor in Android controls how the CPU raises and lowers its frequency in response to the demands the user is placing on their device. Governors are especially important in smartphones and tablets because they have a large impact on the apparent fluidity of the interface and the battery life of the device over a charge.

NOTE: You cannot change your CPU governor unless your phone is rooted and you have a ROM or app that lets you make a change. Also, different kernels (the intermediary software between your phone's hardware and the operating system) offer different sets of governors.

S/W or App's for using these features:
1. SetCPU.
2. No-frills CPU.
3. Tegrak Overclock.

1. Smartass: Performance is on par with the “old” minmax and smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies.
Smartass will also cap the max frequency when sleeping to 352Mhz (or if your min frequency is higher than 352 it will cap it to your min frequency).

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

3. SavagedZen: Another smartassV2 based governor. Achieves good balance between performance & battery.

4. Ondemand: which would instantly go to max frequency once it detects cpu activity and then scales down as the requirement decreases.

5. Performance: It has the same min and max frequency so I guess your phone will heat up and throttle really quick, although if you want to benchmark this would give you the best result.

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

7. InteractiveX: Created by kernel developer "Imoseyon," the 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.

8. Pegasusq: The Pegasus-q / d is a multi-core based on the Ondemand governor and governor with integrated hot-plugging.
Ongoing processes in the queue, we know that multiple processes can run simultaneously on. These processes are active in an array, which is a field called "Run Queue" queue that is ongoing, with their priority values arranged (priority will be used by the task scheduler, which then decides which process to run next).

To ensure that each process has its fair share of resources, each running for a certain period and will eventually stop and then again placed in the queue until it is your turn again. If a program is terminated, so that others can run the program with the highest priority in the current queue is executed.

9. Abyssplug: from what I have read is a modified hotplug which is simillar to ondemand but has the ability to turn off a core when it is not needed and is a little more precise in scaling down cpu performance.

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. Powersave: This is opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.

12. Lagfree: This 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.

Now you decide it on your own which will suite you ....

Hope this helped you .......

Source
The Following 130 Users Say Thank You to mj.vikram For This Useful Post: [ View ] Gift mj.vikram Ad-Free
27th August 2012, 05:14 PM |#2  
bhargav143's Avatar
Senior Member
Flag Berhampur
Thanks Meter: 86
 
More
Thanks mj for the wonderful explanation... Learnt some stuff..

Sent from my GT-I9103
27th August 2012, 06:19 PM |#3  
Senior Member
Thanks Meter: 78
 
More
Well done. Great work.
27th August 2012, 06:36 PM |#4  
The-Droidster's Avatar
Senior Member
XDA 24 x 7
Thanks Meter: 899
 
More
This is good work.

I found this thread and this. It explains many more governers.....if any one is interested!

If anyone is interested to know about I/O schedulers...a term that is very commonly used along with CPU governors, refer this
The Following 9 Users Say Thank You to The-Droidster For This Useful Post: [ View ] Gift The-Droidster Ad-Free
27th August 2012, 06:43 PM |#5  
Senior Member
Flag Mumbai
Thanks Meter: 281
 
More
Could you also explain on how to use it ??
I m completely noob...are these governors bundled with kernel or thru some app ??

Sent from my GT-I9103 using Tapatalk 2
27th August 2012, 06:55 PM |#6  
The-Droidster's Avatar
Senior Member
XDA 24 x 7
Thanks Meter: 899
 
More
Quote:
Originally Posted by vipul12389mehta

Could you also explain on how to use it ??
I m completely noob...are these governors bundled with kernel or thru some app ??

Sent from my GT-I9103 using Tapatalk 2

NOTE:
You cannot change your CPU governor unless your phone is rooted and you have a ROM or app that lets you make a change. Also, different kernels (the intermediary software between your phone's hardware and the operating system) offer different sets of governors.

Quoted from here
m.kochan10
27th August 2012, 07:19 PM |#7  
Guest
Thanks Meter: 0
 
More
Good job. Can you please add a source of this information?
27th August 2012, 08:29 PM |#8  
rhodrhi's Avatar
Member
Flag Nottingham
Thanks Meter: 16
 
More
Thank You OP ! Im now using abyssplug and it saves my battery so much !! Also with a good performance while gaming too !!

Sent from my GT-I9103 using xda app-developers app
28th August 2012, 01:26 AM |#9  
Senior Member
Thanks Meter: 6
 
More
what does save most battery for our galaxy r ?

Sent from my GT-I9103 using xda premium
28th August 2012, 04:04 AM |#10  
mj.vikram's Avatar
OP Senior Member
Flag XDA 24 X 7
Thanks Meter: 2,432
 
More
Quote:
Originally Posted by vipul12389mehta

Could you also explain on how to use it ??
I m completely noob...are these governors bundled with kernel or thru some app ??

These Governor's are related to Kernel, when Kernel is developed these will be coded into kernel and we can select them by using App's like "Set CPU" or "No frill CPU".

"No frill CPU" is free and similar to set CPU...

Eg: In Horsepower kernel developed by fuss132 for Galaxy R we are having most of these Governor's...

Quote:
Originally Posted by m.kochan10

Good job. Can you please add a source of this information?

Source added to OP...
28th August 2012, 04:08 AM |#11  
mj.vikram's Avatar
OP Senior Member
Flag XDA 24 X 7
Thanks Meter: 2,432
 
More
Quote:
Originally Posted by Birki96

what does save most battery for our galaxy r ?

As rhodrhi said you can try abyssplug or Powersave ( I forgor about this i will add it to OP) and Under clock the CPU will save some power....

Eg: When screen is off i will set it to max 780 and min 256 ( Presently i don't have mobile with me so i don't remember exactly the frequency's)....
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes