yashsingh1/xdaforums huggingface dataset:
[General Topics] Saber:
Hi,

VM tweaks are beyond what this guide can cover (and frankly, I don't think there's enough room for more guides in this thread).

vfs_cache_pressure, dirty ratios and background_ratios don't really have to be touched as the default values are "good enough" for all usage cases. If you want "better" multitasking, I would focus more on ZRAM and swappiness values (speaking from experience on low-ram devices). However, this isn't an area of my expertise (even though I used to maintain kernels) ;)

Edit: Maybe try some kernel modifying apps like L speed. I'm usually against these kind of apps unless it is the only app you are using to tweak your kernel (conflicts with installed custom kernel tweaks, etc).
[General Topics] jlb1959.01:
great thread!!..
[General Topics] rohitdave:
Amazing
[General Topics] razibrizal:
Which one is better, bfq 128kb or noop 512kb?
[General Topics] guest4711:
It depends on your usage and your preferences... What do you mean by using 'better': More power or more battery life? Reliable or fast connections? ... There are no good or bad govenors, but some suit your needs better than others.
[General Topics] razibrizal:
Im prefer battery for daily usage, im not gamer anyway
[General Topics] Saber:
Noop 512KB, but we really shouldn't be comparing different schedulers with different values for read-ahead as results in read/write speeds may differ.

Follow the guide carefully to get a good start, then tweak or adjust to your liking to get the desired result ;)
[General Topics] Saber:
Well, you are looking this in the wrong way. Schedulers shouldn't have a noticeable impact in battery, only read/write operations and transactions which as a result will impact responsiveness (although not so noticeable in modern devices), file transfers and general UI usage.

Some quick picks include:

- CFQ

- Deadline

- Noop

- ROW

All with their strengths and weaknesses, but there is no "perfect" scheduler in the real world.
[General Topics] razibrizal:
Thx for the explaination
[General Topics] aocboe:
arter97 said,“CFQ is the fastest I/O Scheduler available on the 3.18 kernel.”

Believe me, CFQ is really great on the 3.18 kernel.If my brain doesn't go wrong, you're using mi 5, and mi 5 uses the 3.18 kernel
[General Topics] jlb1959.01:
to each their own,like said in previous statement by moderator,I use zen,and it preforms great...
[General Topics] Saber:
Depends on what way "fastest" is interpreted. CFQ has received many SSD optimizations and it usually performs best in real world throughput tests. But throughput isn't the only factor to consider when in comes to scheduling.

As you may have seen from my posts, I favour simpler schedulers that may try to improve latency sensitive workloads which has some real benefits to the android world. Again, this has some drawbacks.

But what I want people to take away is that benchmarks alone isn't a good way to compare schedulers. However, my assumption is that the kernel developer/maintainer knows what they are doing and that there is a good reason why they have chosen something as a default ;)
[General Topics] jlb1959.01:
[MENTION=5811506]Saber[/MENTION],very true......
[General Topics] DB126:
Extensible to governors, read-ahead, seeding and many dozens of other popular tweaks. Clearly there are unique circumstances where a specific configuration yields 'optimal' outcomes. Problem is most folks do not know how to assess that (qualitatively or quantatively) so either blindly depend on others recommendations (usually derived on dissimilar hardware and/or test conditions) or simply look at one element and declare nervana when the needle moves. When in doubt stick with the defaults.
[General Topics] Iliyena:
Or test away without fear! Numbers and the feeling of improvement/placebo by feeling in control is a great steppingstone to find real knowledge :) I really annot measure or feel some things I do, but I still want them set by me. :S
[General Topics] DB126:
Yep - fully agree with retaining total control and the deep satisfaction of learning through experimentation and failure. Things get dicey when single data point successes are enthustically promoted without full disclosure of how results were obtained, measured and validated. We are all entitled to the varied (and often unjustified) little tweaks that personalize our electronic gizmos provided the path out of deep doo-doo is both understood and executable.
[General Topics] razibrizal:
Can someone give me explanation about this tunable schedutil governor

Down_rate_limit_us

Up_rate_limit_us and

Iowait_boost_enable
[General Topics] Saber:
Here is an extract from the kernel commit message:

Note that the tunable is measured in us (microseconds).

More info

As for iowait_boost_enable:

In short, a boolean that really shouldn't be touched as it will follow the cpufreq policy settings.

More info
[General Topics] LolHacker17:
right now wht is the best governor n io for balance perfomance n battery?
[General Topics] :
Anything else ?
[General Topics] Saber:
I suggest reading back a few pages as this question has been asked several times already in the thread. As for the short answer, Interactive is generally seen as the best choice for a majority of devices. If you've had bad experiences with it, experiment with other governors.
[General Topics] Haldi4803:
or tweak interactive governor settings.

As interactive is not the same as interactive at all, depending on settings.
[General Topics] ggelo10:
hi

which hotplugdriver for sd820 lg g5? balanced - battery set, andr 7.1.2? autosmp?

greetings
[General Topics] Saber:
Hi guys,

So I've spent a couple of hours working on the guide and here is what I was able to come up with:

15/07/17:
- Removed "what to look out for" sections
- Removed kernel app recommendations
- Removed governor classifications
- Removed generic looking IO sched and TCP alg comparisons - Non-realistic and variable, YMMV
- Made the CPU hotplug guide simpler and easier to read. Updated with better recommendations
- Moved zzmoove profile number info into CPU gov tunable section
- Added a new summary section under all CPU governors to help give a basic comparison between governors - Don't take these indicators as your only deciding factor, ask around as well before using!

You'll notice there are a lot of deletions as well as additions! Why remove some of the info you might ask? Well I've decided that some of the info were redundant or was never mentioned later on in the guide or were plain useless!

Looking into the bright side of things, I've added a new summary sections under all CPU governors :highfive: Please note that these indicators are not final (if anyone objects with what has been present, PM me), and also please don't use these as your only deciding factor. Look around XDA, ask in your relevent device forum, research (hell yeah).

Edit: For those wondering how I was able to come up with so many summaries, if the governor was based on some well known governor (let's say interactive), it's behaviour will not be that significantly changed so it should have similar summaries.

Meanwhile, if the governor is completely unique, and if I don't really know how it behaves, I just followed it's description having full trust on the developers and their kernel users.

There are downsides to this like over generalisation (and sometimes inaccuracies) which reiterates the point that the guide will never be at it's final form.

Have a good read, Saber ;)

Knowledge is power :)
[General Topics] jlb1959.01:
[MENTION=5811506]Saber[/MENTION] great job....
[General Topics] Haldi4803:
i still think you should remove 101. sched-DVFS and add an own EAS section for sched, schedutil, alucardsched and darknessched.

Except the Pixel using EAS on Stock there are more and more EAS Kernel around for Devices Like HTC10, OP3 and Axon 7.
[General Topics] Saber:
Will do.

Interestingly, I've hit the character limit for the second post limiting any room for expansion. I've planned for a cleanup throughout my guide where I will then be able to add new info in the future.
[General Topics] Adzkii:
zzmoove, can anyone recommend me a hotplug and i/o scheduler with this governor
[General Topics] Saber:
Hotplug: zzmoove native or a hotplug of your own choice (use only one, don't use them together)

I/O sched: ZEN or Noop
[General Topics] mfajribk:
do you think better interactive or darkness (ondemand base) for battery?
[General Topics] Saber:
Darkness is actually based on Nightmare which is a modified variant of PegasusQ. It may perform a bit better for battery, but if you've have a Snapdragon SOC, you're better off with interactive.
[General Topics] mfajribk:
thanks, yep sd820 so i'll go interactive then.
[General Topics] realista87:
hi, i read your guide about the read ahead values.....

i don't understand why all the custom modders of rom and kernels continue to use a low value like 128kb etc.... when in the ghude is clear that everyone should ose at least 2048kb value because most phones not are with 32 or 64gb of rom.

maybe, developers set 128kn FOR A PRECISE reason what i don't understand?
[General Topics] DB126:
The vast majority of read/writes to the system partition are small files. Such operations are hampered by large read-ahead values. A bit of benchmarking will likely surface which compromise value works best with your device and workflows. Total device storage is largely irrelevant - although it does lead to retaining larger files accessed sequentially that benefit from larger read ahead values (eg: games, video). Then again, when was the last time you had an *onboard* movie stutter/lag? One file vs the many thousands that the system needs to access during routine operations. Games are a different beast; highly optimized device tuning is essential for the best performance.

tl;dr: 128-256KB read-ahead typically yields the best system performance; app portfolio and device characteristics (eg: eMMC speed) determine if higher values are beneficial.
[General Topics] aryaazimi72:
Hey Saber!!!

Thanks for This amazing Guide and all your Hard Work to make this Complete Reference!

I have a Suggestion , To add Details About The New TCP algorithms which are commonly used on new kernels (at least on my devices , Galaxy S7 , S8 ...)

These are known as MultiPath TCP and examples are: LIA (Linked Increase Algorithm) , OLIA (Opportunistic Linked Increase Algorithm) , BaLIA (Balanced Linked Increase Algorithm) , wVegas....

Thank You!!
[General Topics] TheRock40359:
I am currently on Westwood. I live in area that's low signal. So my speeds tend to vary a lot. Usually have right at 112 dB or 110 dB at 4g. Would switching tcp to cubic make a difference?
[General Topics] Saber:
Using TCP algorithm to boost throughput is not the best way of selecting an algorithm as it is a case of YMMV. You should think in terms of the fairness and the efficiency of the algorithm, where TCP Westwood/Westwood+ and TCP Cubic are generally well regarded at.

Try anyway and see if it helps.

Regards, Saber
[General Topics] Harshad121:
Thanks for the amazing guide it was really helpful for noobs like me to have a good start.:)
[General Topics] ThakurVartik:
Bro which seeting should i use for best signals
[General Topics] Wolfcity:
Signals? Where is the connection between kernel tweaks and some sort of signals?
[General Topics] Tech0308:
The TCP choices
[General Topics] Wolfcity:
Just read what [MENTION=5811506]Saber[/MENTION] wrote right above your post:
[General Topics] mfajribk:
sir, which better for battery and balance? interactive or schedutil?
[General Topics] Wolfcity:
Interactive is always a good choice imho.
[General Topics] guest4711:
Conservative for me ;) It gives more SOT without to much lags.
[General Topics] mfajribk:
How much get with how long standby?

---------- Post added at 01:47 PM ---------- Previous post was at 01:46 PM ----------

Have you try eas?
[General Topics] Wolfcity:
No. Your battery drain and your standby time depends a lot on your device, rom and your usage.

If you play games all the time you're good to go with performance, if you only check your mails and browse a bit ondemand or conservative is ok.

You have to check that by yourself, there's no setup that fits all users and devices.
[General Topics] ART:
Which governor is better for battery life? Conservative or interactive ? I'm on a 6p (snapdragon 810)
[General Topics] Iliyena:
As always... depends. Do you game? Underclock? I want to say interactive and direct you here: https://xdaforums.com/nexus-5x/general/guide-advanced-interactive-governor-t3269557 , there is probably a more 6P centric thread a well (mostly N5X in this one).
[General Topics] ART:
I've been there, and I've used Loki profile on ElementalX , excellent profile for battery and stability.

Now I'm on Franco, and the default is interactive governor. I don't game, use chrome , Google plus, Reddit, xda. So I want battery life. So I was wondering if conservative is better than interactive
[General Topics] Saber:
In most general applications, interactive will be the better performer in terms of performance and battery. It scales more efficiently compared to conservative and is very stable on most devices. Conservative is known for scaling inefficiently thus wasting power.
[General Topics] ART:
Really ? I thought conservative would have been better for battery since it usually stays at a low frequency, and reluctant to scale up. Didn't realize that it's reluctance is actually worse for battery
[General Topics] Iliyena:
Then you are set ;) Kill of some of the performance cores might help even more, making the SD810 into a SD808 I think you will get more SoT without any noticable drop in day to day performance. Heck, use that fix against bootloops that turns of all performance cores off on N5X and N6P, 4 of those A53 cores at a little higher freq get things done.

The conservative gov should help some, but at the same time you will just be spending those extra minutes watching all things take a little longer to happen. Unless you tweak the settings of the conservative gov it should be helpless against a tweaked interactive imo.
[General Topics] Saber:
Actually, if it is reluctant to scale up, it most probably will introduce latency and thus more CPU time is needed. Interactive is better designed for mobile devices and puts 'interactiveness' as a priority. You probably could get better results by downclocking and using interactive instead.
[General Topics] ART:
I thought the bootloop fix resulted in a usable phone, but at a significant drop in performance.

---------- Post added at 07:23 AM ---------- Previous post was at 07:22 AM ----------

It may have introduced more latency, but it wasn't noticeable since I put all animations at 0.8x.

Franco has optimized his kernel perfectly, I don't feel the need to change anything, except for the governors (he uses interactive as default)
[General Topics] Iliyena:
You don't game ;) Try it out and let the world know how it feels and performs?! (Compare your choice to the necessity of others) =)
[General Topics] ART:
That I will do. I've already tried conservative for a day, now I'm on interactive till tomorrow. ?
[General Topics] davidk21770:
That was my experience on 2 Samsung devices. More responsive and better battery.
[General Topics] prajnay:
What are the benefits of EAS ?
[General Topics] DB126:
To emphasize [MENTION=365798]Sabre[/MENTION]'s point the correlation between average CPU frequency and the power consumed to perform a defined task is far from "1" and often surprisingly close to zero when CPU frequencies are artifically constrained on modern hardware. Beyond that, governor selection/tuning has a relatively small impact on battery endurance unless other large/larger power consumers (eg: panel brightness; radios, etc) have been fully optimized.
[General Topics] Haldi4803:
Mainly better performance and less Lag.
[General Topics] Saber:
^Possibly this :)

It however more accurately should provide better CPU frequency scaling by having a closer integration to the kernel's scheduler. I've provided a short summary in the description of schedutil.
[General Topics] koyo:
Hey. I looked up things about Android and why it's UI lags so much. I once stumbled upon a topic that said this was the fault of the CPU governor, as it was the frequency jumps that caused this and not anything inherent. Said poster then proceeded to provide profile GPU pics of stuttering between a locked CPU frequency and one that uses the governor, and it indeed displayed less dropped frames (iirc, when the graph shoots past the green line, it means frames have been dropped). Is this just some placebo effect? Should I be using the performance governor if I want smooth UI since it locks the frequency?
[General Topics] DB126:
Highly device, kernel and workload dependent. Take those findings with a grain of salt unless using the same hardware running an identical kernel and ROM (less important) with a similar suite of background activity/apps.
[General Topics] ART:
You could get that smooth ui with no lag even with an interactive governor, but with the added benefit of better battery life.
[General Topics] buffer overflow:
Let Interactive gov and try Noop or Zen scheduler if you want a smooth UI.
[General Topics] Haldi4803:
might have been true 3-5 years ago.

Nowadays most Devices have a "TouchBoost" function which Boosts CPU clock to a certain frequency whenever Screen is touched so input lag is widely reduced.

Also Pixel and few modern devices with Custom Kernel use EAS, Energy Aware Scheduling reacts way faster than a common governor. UI Lag is almost nonexistent in most EAS Kernels.
[General Topics] Iliyena:
Ohh... Those awful touchboosts, want to change how they work on every device I've had them... Find it weird that devs of custom kernels don't tend to let me either :P
[General Topics] ART:
Franco doesn't allow you to , but he disables it by default. He knows what's best.
[General Topics] jamu08:
Hi1 Saber....I am using S2 i9100 with slimsaber 4.4.4 installed. Which governer and I/o scheduler u recommend? I have tried using interactive but experience is not so good. However, by using zzmove I got gives good result. Should I stick to zzmove or move to other governer??
[General Topics] ART:
What does audio high performance mode do, and does it have a negative impact on battery life?
[General Topics] hawkdown77:
Hi, which ROM are u using?
[General Topics] ART:
Carbon Rom, with Franco kernel
[General Topics] akama1:
Hi.... I'm on oneplus 2 using halogen os with its default kernel. Are there any specific interactive governor tweaks to make that can improve the battery life?
[General Topics] buffer overflow:
Copy/paste from XDA; "High performance mode increases the audio processor to it's max performance. It overall should make audio sound better and run smoother but may use a little bit more power. It does make a difference, start playing music with earphones or earbuds and toggle it on and off and you should notice a difference. If not then PowerAmp may have some other functions that don't use the audio processor."

Btw, is ok Carbon ? Generally speaking. :)
[General Topics] ART:
You mean is carbon ok?
[General Topics] buffer overflow:
You said that you are using Carbon rom and I asked if is ok. ?
[General Topics] ART:
Yes, it's an excellent ROM. It doesn't have as many features in the settings like RR or DU, but it's probably got more under the hood performance innovations and tweaks that aren't there on other ROMs.

The devs are really skilled, they keep adding features that no other ROM has , to make it fast and smooth ( and battery efficient). Plus, you're guaranteed excellent support. They still push builds every Tuesday for devices like the Samsung Galaxy s2 and 3.
[General Topics] sahafdeen:
Super post !
[General Topics] tuan287:
thank:D
[General Topics] Saber:
I felt that some of the io scheduler info was too confusing for some people, so I've updated the descriptions. Stay cool ;)
[General Topics] dante2p:
Thanks for complete information. :good:
[General Topics] kai.man:
Thanx a lot for your incredible and so helpful work. ??
[General Topics] DirkStorck:
Could someone please tell me where I can find an explanation of the tunables of the Nightmare governor?

Thank you ☺
[General Topics] Saber:
Sure, will upload more governor tunable explanations today.
[General Topics] DirkStorck:
Thank you because I really start to like this governor ☺
[General Topics] Saber:
This is the last change for this month (and I guess a few weeks too). I've updated the tunables guide post which now includes some info on darkness and nightmare governor. Have exams soon so updates will be delayed for a while.

Changelog

What do you guys think about the poll on this thread? Should I remove it? Should I make it open for everyone again?
[General Topics] DirkStorck:
Thank you! :)
[General Topics] Lughnasadh:
I would keep the poll and make it open to everyone again. Its nice and useful to see what everyone else is using. Thank you for all your hard work. You've done quite a lot to help people and you should be proud of your work...
[General Topics] Saber:
No worries, poll will be reopened soon. Options that have 2 or less votes will be changed to different CPU governors. :good: Thanks [MENTION=4775688]GermainZ[/MENTION]!
[General Topics] Saber:
Poll reopened, enjoy! ;)
[General Topics] btrdossantos:
I just wanted to say... THANK YOU FOR YOUR HARD WORK!!!!!!!! :D:D
[General Topics] boilavera1980:
darkness seems to be pretty good, i like it smooth and it seems to scale really fast and good :)
[General Topics] Logicheart:
Thank you

At last, a comprehensive guide on governors..

Thank you for your efforts...
[General Topics] -zalo:
awesome!!! thank you master!!!
[General Topics] Saber:
My guide is pretty much matured now. Not much things to adjust and add now. Remember that I'm always open for suggestions that you may want to feature in this guide.
[General Topics] HK-AD:
Maybe you could go a little bit more in depth in the hotplug section? My current device is a LG G3 an one of our kernels (Fechdakernel) got a update recently where the dev added like a bunch of different hotplug solutions.

"Make it COUNT"
[General Topics] y0000:
Amazing thread im lucky to find it, always i have so many questions and now not, perfect thread, Gratzz for so many informations to share for all users. And me i use this kernel for my G3 and now have so many hotplugs with last update and i cant find mutch informations to internet. I tested some hotplugs, for a time i use Alucard but i dont know so mutch for hotplugs. can you please write some informations for hotplugs if have free time. If you know something fot that hotplugs i would appreciate. Intelliplug - Mako Hotplug - Alucard Hotplug - MSM Hotplug - Bricked Hotplug - Zen Decision. thnx for this amazing thread its very helpful.
[General Topics] Saber:
Sure. I'll improve the hotplug section. It should be done by tomorrow (hopefully).
[General Topics] k2065183s:
Hello everyone,

About I/O Read Ahead Buffer,

The rules recommended below is for better performance right?

"Less than 8GB - 128KB

8GB - 512KB

16GB - 1024KB

32GB or above - 2048KB"

My device is 32GB with NOOP scheduler.

If I want more battery life instead of performance,should I decrease the value?

Maybe 128KB?

Thank you.
[General Topics] buffer overflow:
2048kb is ok for 32GB. If you decrease value that not have impact in "more" battery life.
[General Topics] k2065183s:
I get it.

Thank you for reply.

Have a nice day.
[General Topics] TheRock40359:
My kernel only offers 3 governors to choose from. Is there a way to add other governors?
[General Topics] ART:
Which device and kernel you on?

Find a kernel that has different governors.
[General Topics] TheRock40359:
I am on note 3 with phantom kernel. Someone told me I could add governors to it as it only has 3
[General Topics] :
Read the phantom thread to see why there are only 3 governors and how to add more. Please don't be lazy !
[General Topics] Legend_dimebag:
the best post I have ever seen ?