yashsingh1/xdaforums huggingface dataset:
[General Topics] Saber:
The OP has been updated

Here are the changes for today:

Changed recommended I/O read-ahead buffer values for 32GB+ to a more sensible value

This is probably the last change for the year (I'll take a break from working on this guide).

Saber ;)
[General Topics] bdwilk:
Merry Christmas & Happy New Year then. :good:
[General Topics] rejneesh:
Can anyone guide me to set the best ideal CPU parameters for efficient battery life.I am using Asus zenphone 2 laser (550KL).Thnx
[General Topics] pedrohxn:
Does these I/O configs also apply for internal storage??

This is the one guide to rule them all.

Thank you [MENTION=5811506]Saber[/MENTION] !
[General Topics] Saber:
Hi,

The I/O configs covered in the guide applies to both internal and external storage (if applicable).

Saber ;)
[General Topics] djsolidsnake86:
for battery life in a redmi note 3 pro qualcomm, what choose between interactive, conservative and ondemand?
[General Topics] krasCGQ:
If the only choices are these, I would prefer to use interactive, or maybe conservative. I wouldn't use ondemand at the most on newer devices.
[General Topics] Iliyena:
Perfectly tweaked Interactive is the way to go. Eg. everything seemed to work on my Galaxy S6 with conservativex... until I had to use the GPS, lagged behind awfully. So tweaked my interactive some. Seems ok.
[General Topics] externus:
Why is "bluactive" recommended for battery life, but in the description "This governor is mainly focused on performance "

And would be Intellimm fine for Mediatek SOCs ? I have MT6752
[General Topics] mjohnson4580:
On interactive if you set timer_slack to -1 does that technically mean you turn off timer-slack or timer-slack and time-frame?
[General Topics] jlb1959.01:
I'm not the smartest on setups however I do know each Rom,kernel reacts differently to the settings,example for me is stock kernel on jasmin 9.1 using interactive and row I get average battery life and performance,then I flashed Dragon kernel,use smart ads and Zen and I get double the battery and performance..
[General Topics] Saber:
Thanks for spotting this issue.

The OP has been updated

As for Intellimm, you will have to try it out for yourself as I don't know how it will behave on that SOC.

Saber ;)
[General Topics] reality1234:
Which is the best governor and hotplug combo for least battery drain when idle?
[General Topics] Saber:
Depends on the device you have.

If you have Qualcomm SOC, mpdecision would be the best hotplug.

For governor, choose one of the recommended governors for battery life.

Saber ;)
[General Topics] yarpiin:
I use Despair on both clusters with alucard hotplug or autosmp on Oneplus3 Qcom 820 .
[General Topics] aryaazimi72:
Hi!

1. Does the low stablity in file system mean , files may get corrupted or lost?

What do you mean by "f2fs has the worst stablity"? (In the chart on your site)

So if i use it , files may get lost and corrupted?

2. How can i tweak ext4 to remove journaling and improve the drive lifespan?

3. Are the filesystem stuff writen in your site , right about an 128gb sd card or an 200gb one? Or just for internal sd?

4. My external storage ( micro sd ) is formatted as exFat by default , is it better to format it as Ext4 ? I mean in performance and lifespan... should i do this in twrp? ( when i wipe , i have an option to do that....)
[General Topics] Saber:
Hi,

Although this thread is only about governors and IO schedulers, I will answer your questions.

1. When referring to the chart, 'worst' stability implies that there is a chance you may lose your data or it may get corrupted due to unpolished code or the design of the file system. F2FS for example is still a relatively new filesystem which still needs a lot more testing before I would consider it 'stable'. 'Best' stability is usually observed from filesystems with mature code that have been universally tested.

2. While there are guides on XDA about formatting to ext4 without journaling, the guides have only been tested on older devices and I don't personally recommend removing journaling for stability reasons. I intended to write the filesystem guide to other applications not specific to android devices.

3. Most of the differences will be observed on internal sd. It does however apply to both internal and external storage.

4. External sd should only be formatted to ext4 if your ROM supports it and if you don't intend to remove your external sd. Otherwise, stick to vfat (fat32) or exfat.

Saber ;)
[General Topics] dsjiffry:
Hey Saber, I have a small problem I came across this awesome governor settings for my phone but they don't use the entire freq. Range......... I'll attach the settings and the Cpu Spy details......

In that you can see the freq. Steps 1469MHz, 1625MHz and 1781MHz are barely used but the 1950MHz is being used more than all 3 combined........
[General Topics] Iliyena:
Thats a MT6975, Helio X10? Not using the whole range often is a good thing if the lower frequencies are the one used absolute most (403 & 806MHz).

When CPU gets a big chunk to do it should go up pretty quick to get it done fast, it doesn't now what you'll throw at it next so it wants to get things done as fast as you let it and then ramp down in the same fashion, as fast as you let it. I'd lower the max frequence to 1781 MHz btw, nothing gets better with the higher max freq in this SoC, just hotter ;)

Ps. There is nothing attached in your post. Ds.
[General Topics] RedToken:
Great poll, thanks!
[General Topics] DerTeufel1980:
[MENTION=5811506]Saber[/MENTION]: anyone already using sched-DVFS?
[General Topics] dsjiffry:
sorry about the attachments they don't seemed to have uploaded........

About limiting the CPU speed I seem to be unable to do it on my HTC X9 the system keeps resetting it....... Is there a file which I can directly change instead of using a 3rd party app??????
[General Topics] Iliyena:
What apps have you used? Does changing of CPU governor or I/O Sheduler stick?

Someone else should take it from here though. I haven't owned a HTC since my first smartphone, a HTC Tattoo running Android 1.6 ;)
[General Topics] christianpeso:
Can you give us some info on Sociopath TCP Algorithm please?
[General Topics] dsjiffry:
Yeah IO and Governor can be changed but the Max. Cpu freq. Keeps resetting to 1.9GHz........ :eek:
[General Topics] shawnbrennan55:
Some info on hotplugs would be very useful. Thanks for putting all of this info together!
[General Topics] Saber:
Hot plug information is on second post right after cpu governor descriptions. I'll make the guide more easier to read.

Update: Hotplug title is now enlarged. Also, I've fixed the general layout of some of the descriptions
[General Topics] cdzo72:
Putting items in alphabetical order would be awesome... take much less time to find info
[General Topics] Saber:
I've updated the guide today. Please let me know of any missing cpu governors! :)

Changelog
[General Topics] ArkReborn:
Hi ! I want to ask how to tune the i/o scheduler? Many thanks before :) (Sorry for my bad english, english is not my primary language)
[General Topics] subodhdhull:
hello guyz

can you tell me which governor is more battery efficient among asswax ,smartmax and smartassH3?
[General Topics] ARGD:
Thanks

Great guide.:good:
[General Topics] wkobaint:
It is depend to your devices hardware. For my G2, I've good battery life when using alucard gov and hotplug. But for my E975 having good battery with intelliactive gov.
[General Topics] Saber:
You need a phone with a kernel that supports changing of i/o schedulers, make sure you have root too. I've listed what apps you can use to change I/O schedulers on my guide. Anyway, you can use the app below to change i/o schedulers:

Trickster mod - https://www.google.com.au/url?sa=t&...Tu8XCJOcFTksqVwBXSOuIsw&bvm=bv.89947451,d.dGc
[General Topics] Saber:
We finally have 80 CPU governor descriptions! :)

More changes were done today. Enjoy!

Update 09/04/15: See changelog

Update 11/04/15: See changelog
[General Topics] Lughnasadh:
Thank you very much for this. Can tell you put a lot of work into it. Great guide :good:
[General Topics] 5559anand:
Thanks for sharing info
[General Topics] Saber:
It has been 2 months since I posted this guide up on XDA and it seems to be going well. Anyway, I've updated the guide again. This time, I've added a guide for things to look at in CPU governors and I/O schedulers. The lack of updates was because of my involvement in school work. Enjoy ;)
[General Topics] @soka:
Thank you very much for this.... most comprehensive collection of info in one place.
[General Topics] peped94:
Can i know which governor do u refer to smoothness, speed, stability and battery life ? U only mention the meaning of this governor. I want to know if that governor suitable for speed,battery life or smoothness ?
[General Topics] cdzo72:
The man has spent tireless hours obtaining and presenting to all of us this valuable information and you still want to be be spoonfed... instead if moderators cleaning threads they need to start eliminating lazy users
[General Topics] Thecrazyskull:
Scroll down on the first page you lazy ass
[General Topics] Saber:
Updated a few CPU governor descriptions today. This is a shout out to all of the cpu governor developers not mentioned in this thread, please PM so I can give credits or update any misleading info.

Changelog

Update: stay tuned this weekend. Will be cleaning up recommended cpu governors and io schedulers.

Edit: All done. As promised, all recommended CPU governors were checked for inconsistencies and misplacement
[General Topics] neoandresk:
Found this thread and get headache.. I take my decision using hyper and sio.. Is that best combination for balanced perfomance and battery? My device is nexus 5. Thx
[General Topics] Saber:
I can't say what's the best since I don't have the nexus 5. Although, that combo should be quite solid. I also recommend impulse governor.

I've tidied up the thread a little now and it should be easier to find the info people want.

Changelog
[General Topics] Haldi4803:
I think Nexus 6 after an Update, and Pixel use EAS as standard.

Probably still using Interactive... but maybe a custom ROM/Kernel there supports it.
[General Topics] Saber:
It is used as the default governor in EAS kernels, no tuning support but theoretically better mobile experience. I've only seen this implemented in kernels for newer devices like the Nexus 6P.

Saber ;)
[General Topics] Ac_gel:
no one is interested in schedutil?

Sched-DVFS will be better than cafactive?
[General Topics] Haldi4803:
Sched-DVFS is better than ANY Governor.

Governors are Reactive, they take a look at the CPU load in Period A and then Change CPU frequency for Period B.

Sched-DVFS uses Energy Aware Sheduling (EAS) so Android Task Scheduler knows in advance how much Load is going to be and how it's gonna be split on different cores. Sched-DVFS now scales CPU frequency accordingly so that the whole Task is done curing Period A.
[General Topics] DerTeufel1980:
Great. Thank you.

We just had to cherry-pick about 200 hundred commits, buried in some qcom merge...
[General Topics] DerTeufel1980:
The other important change is to introduce a new CPU frequency-scaling governor, schedutil, that makes decisions based on utilization as measured by the scheduler. The cpufreq_update_util() call that the scheduler makes whenever it updates the load average already carries information about the calculated load on the current CPU, but no governor uses that information. schedutil changes that. It doesn't change much though.

schedutil still only performs updates at the same rate as the current code, so it doesn't try to address the interactive responsiveness problem, and doesn't try to be clever about realtime or deadline threads. All it does is use the load calculated by the scheduler instead of the average load over the last little while, and optionally imposes that frequency change instantly (directly from the scheduler callback) if the driver supports it.

This is far from a complete solution for power-aware scheduling, but looks like an excellent base on which to make cpufreq more responsive to sudden changes in load, and more aware of some of the finer details that the scheduler can, in theory, provide.

copied from here: https://lwn.net/Articles/682391/

-----

Sched-DVFS IS power-aware scheduling!
[General Topics] Haldi4803:
Indeed, having a thread priority awareness would be pretty awesome.

Not only for Boost functions, but also for battery save options, throttling down when there is no need for full performance.

Also putting certain apps, onto Big Cores or small cores..... Is that currently not in the Task scheduler... Is it? Or st least HTC is using software to 'improve' that.
[General Topics] DerTeufel1980:
Putting different tasks to different clusters needs the scheduler to know about the energy used by each core/cluster on different speeds.

Since mediatek did not add sched-DVFS, there's no such information available for our device... We just set the energy for each core/cluster to 0, making the scheduler just decide for speed...

For knowing the correct values, one probably needs to ask mediatek [emoji3] [emoji12]
[General Topics] :
You miss this:

- https://source.codeaurora.org/quic/la/kernel/mediatek/log/?h=aosp-new/android-mtk-3.18

- https://source.codeaurora.org/quic/la/kernel/mediatek/log/?h=aosp-new/android-mtk-3.18&ofs=50
[General Topics] Haldi4803:
Seems like newest SchedTune allows for different Boost for different Apps. And even a Touchboost.

Source: http://de.slideshare.net/linaroorg/...ernel-adaptation-to-the-android-common-kernel
[General Topics] #Henkate:
[MENTION=5811506]Saber[/MENTION]

Hi there!

Just found this video: Real-world I/O scheduler benchmarks.

And after checking the comments, i have readed about DiscoMark Benchmark app. It seems a nice benchmark app. Gonna play with kernel settings and use this benchmark.

And with this occasion, i thank you for the best guide out there.
[General Topics] Wilguens Joachin:
What would you recommend for the OnePlus2 64GB?

Right now my CPUs are set to Impulse. I/O is set to Zen with 2048kb. Using IntelliPlug. TCP Westwood of course
[General Topics] Saber:
Those settings should give the best balance between battery life and performance for your device. However, I don't have a OP2 so I am only speaking from what people have posted in your device forum.

Interactive may be another governor you can use but needs a little bit of tweaking.

Saber ;)
[General Topics] Wilguens Joachin:
Ya so far it's been pretty good. Switched to msm hotplug and using simple_ondemand GPU. Elementalx is pretty good to.
[General Topics] dsjiffry:
Hey Saber I wanted to know is there a way to make a soft cap on CPU scaling when using the Interactive governor.

My processor goes all the way to it's max freq. (1.9GHz) During usage leaving some frequencies unused. (1.6GHz and 1.8GHZ) which parameter can I use to make the CPU pause for a bit at 1.6 GHz before going all the way to the max?????
[General Topics] zputnyq:
Hi guys, I need your help.

Currently I wanna tweak hotplug governor on AcerZ205 but I am confused about a few things &

I have asked it on my device forum but still no answers yet.

Could u explain to me what are these please

1. cpu_down_avg_times

2. cpu_up_avg_times

3. io_is_busy

4. od_threshold

5. thermal_dispatch_avg_times

6. Ignore_nice_load
[General Topics] nexus_vl:
3 and 6 are familiar to me and appear on several govs, the other ones seem more exotic and probably more specific to one gov.

io_is_busy has two settings 0 and 1, at 1 the governor will ramp up more easily cause it will take storage writes and reads in to acount as cpu load.

ignore_nice_load, same as above, two settings 0 and 1.

Usually its at 0, at 1 it will ignore lighter loads and stay at min frequency longer, this can cause lags tho.

These settings also appear on some hotplug governers where this function will be the same
[General Topics] zputnyq:
Sorry I mean cpu_up_avg_time for number 2. I had edited my post

Thx for your reply.

I still wanna know the rest because I've been looking it on google & found nothing.

Someone explain to me about these please

1. cpu_down_avg_times

2. cpu_up_avg_times

3. od_threshold

4. thermal_dispatch_avg_times
[General Topics] Saber:
Hi,

Could you please provide a link to the kernel source or XDA thread?

I may be able to get some information on these variables.

Saber ;)
[General Topics] zputnyq:
Hi [MENTION=5811506]Saber[/MENTION] this is the kernel source from its official website.

the kernel source can be found under document tab

https://www.acer.com/ac/en/MY/content/support-product/5626?b=1

And this is for xda thread only for its rom but kernel can be found inside boot.img & recovery.img

https://xdaforums.com/android/development/guide-firmwares-roms-cwm-root-acer-mtk-t2945933?nocache=1

---------- Post added at 01:55 PM ---------- Previous post was at 12:56 PM ----------

You can try to tune "up_threshold" and "sampling_rate" first because most gov has it. Bigger number on them will make your cpu longer in reaching its highest freq.
[General Topics] Saber:
Hi,

Unfortunately, I was unable to obtain any information about these variables. I didn't download the kernel source to have a look, instead I found a google kernel source that had the variables contained in a governor named 'balanced', only found in a few mediatek devices. There were other governors (including hotplug) that had only some of the variables. My C programming skills aren't great enough to see that functions of each variable.

For reference, I will leave the links from where I've conducted my research:

https://android.googlesource.com/ke...-kitkat-mr2/drivers/cpufreq/cpufreq_balance.c

https://android.googlesource.com/kernel/mediatek/+/2b36ee80fc7af58da2213704ef39a0ca939de79a^!/

Saber ;)
[General Topics] zputnyq:
Wow thank you so much.

Yup no problem about that.

Those links are enough

[emoji4]

[emoji106]
[General Topics] LilAnt530:
Hey im wondering about tweaking specific tuneables with Kernel Auditor since the current build im on doesn't allow much in the way of selections (only govs are balances and interactive) (noop&cfq for I/O) and I have a heavy battery drain as well.
[General Topics] zputnyq:
You can try tuning sampling_rate & up_threshold first in Kernel Adiutor because most gov has them. Bigger number causes cpu stay longer on low cpu freq & save battery but it may drop your device performance too.

The easiest way is using an app named L Speed you don't need to scale anything, just enabling one of its options on L Speed's gov tuner section
[General Topics] Iliyena:
What phone? What ROM?

I'd tweak the interactive gov... And use CFQ for I/O Shed. For anyone to be able to help with the numbers to try out for the tweaking of gov the specifics of the device will help.
[General Topics] LilAnt530:
Lol im on a G928F on cm13, pretty sure CFQ causes a bootloop, the issue was fixed slightly with entropy tweaks.
[General Topics] Iliyena:
Weird... CFQ is every cowards stability-go-to-IO-shed :S
[General Topics] Saber:
Hi,

I don't think the kernel alone is responsible for heavy battery drainage (although rarely occurs), I would suggest having a look at betterbatterystats and see what process is causing this issue. As with what [MENTION=5228018]zputnyq[/MENTION] said, try playing with your governor tunables. You may be able to get some ideas from following this guide:

[GUIDE] Advanced Interactive Governor Tweaks; Buttery smooth and insane battery life!

It does sound strange that CFQ causes a bootloop on your device, maybe it was caused by some kernel commits merged by your kernel/ROM maintainer, or it could be some other conflicting change as you've described. Next best option is either noop or ROW which should be available on most devices.

Saber ;)
[General Topics] LilAnt530:
Hey thanks alot for the link to that very well put together explanation of the further intricacies of how exactly its all put together! Very much appreciated man I found this thread by shot in the dark searching and you had the follow up to match. I think you're exactly correct now that I think about it if the commits and libs are from all over to bridge the gap obviously that contributes later on in the system resource management... Thanks again I actually feel like I have an idea now lol.
[General Topics] Haldi4803:
SchedUtil -> sched-DVFS ?
[General Topics] LilAnt530:
Dynamic Voltage & Frequency Scaling is basically all about thermals isn't it? I mean my thermals are ridiculous on this thing so im assuming its disabled lol.
[General Topics] Saber:
Actually, these two governors we are talking about are quite different from traditional governors which use a timer based approach for frequency scaling. Instead, it integrates the kernel scheduler utilization data for frequency scaling which could provide better battery life and responsiveness.

These two governors are still at an early stage, but there is an increasing awareness of what they can bring in terms of benefits to mobile devices.

Saber ;)
[General Topics] LilAnt530:
I have heard quite a bit of interesting actually very groundbreaking things about a few Govs within the last 2 or so months, I always assumed DVFS was more of a problem than solution for battery life, but thinking about it that makes alot of sense and I'm going to research it a little more xD. This is what turns my interest towards the Kernel end of development (Plus I can deal with C, Java is pretty rough though lol). Not to mention they keep going and making each SoC a little more refined and solid each year it seems. So I really appreciate the responses! This is the most important part to learn within the Android world imho & its getting pretty hard to keep up lately ^.^
[General Topics] dsjiffry:
Hey Saber could you tell me what the RQ Affinity setting does????? (io Scheduler section)

I've seen here and there some people recommend changing the value to 2. Will itt make a difference???? Also does it do so at the cost of battery life???
[General Topics] Iliyena:
Piece of screenshot from Kernel Adiutor included in post.

If it's actually better can always be debated. SoC, hotplugging, I/O Sched, overhead at the current frequency because of the task and so on... But yeah, in theory it should keep resources at one place until done instead of scattering them around between cores if I understand it correctly.
[General Topics] Saber:
The tunable is already explained in my guide for the noop scheduler. In theory, it should reduce some overhead (CPU Cycles) on I/O requests, but real world results may show little or no difference. This setting doesn't need to be touched at all as the default value is usually the best in most cases. I don't think it will adversely affect battery life if changed.

Saber ;)
[General Topics] dsjiffry:
So RQ affinity doesn't affect battery life????

Well the I guess I'll change it to 2 and see what happens...... :good:
[General Topics] mariopoldoja:
I changed it to 2 and haven't seen any changes in battery life whatsoever
[General Topics] Timmmmaaahh!:
This thread sucks... for people with decidophobia like me! I just read through all available governors (yes, all 109 of them) and do you know what I've learned? That I still can't decide! The horror! At least 50 of them seemed very appealing. Damn all those amazingly talented devs with all their superior kernel skills! [MENTION=5811506]Saber[/MENTION] most of all for grouping them all so nicely together. Damn yoooouuuuuu!!!....

(or simply put: thank you for creating such elaborated guide! It's a great reference.)
[General Topics] dsjiffry:
Do you see any other changes???? Maybe increased read writes or something???? :confused:
[General Topics] mariopoldoja:
Don't know... Read/write is still the same

CPU isn't doing anything strange either

Little to no effect for me
[General Topics] STORMING BLOOD17:
Thank You VERY VERY MUCH
[General Topics] iceman0826:
I know right? now, if they could combine tripndroid + bfq scheduler then I'm golden ? + interactive-performance mode governor ?