[Q] About noop, deadline, bfq, cfq - Sony Xperia P, U, Sola, Go

I’ve flashed DooMKernel and installed IncrediControl app.
There are 4 I/O schedulers: noop, deadline, bfq, cfq.
Which one is the best for performance & long battery life?

bfq for heavy IO load, deadline for normal usage.
Sent from my LT26i using XDA

http://forum.xda-developers.com/showpost.php?p=22134559&postcount=4
Q. "Best I/O Scheduler?"
A.There is nothing called "best" i/o scheduler. Depending on your usage environment and tasks/apps been run, use different schedulers. That's the best i can suggest.
However, considering the overall performance, battery, reliability and low latency, it is believed that
SIO > Noop => Deadline > VR > BFQ > CFQ, given all schedulers are tweaked and the storage used is a flash device.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=25387200&postcount=1

drigerott said:
http://forum.xda-developers.com/showpost.php?p=22134559&postcount=4
http://forum.xda-developers.com/showpost.php?p=25387200&postcount=1
Click to expand...
Click to collapse
Deadline > noop for average android workload. Noop is good for slow(ish) memory
Sent from my LT26i using XDA

yes me too prefer Deadline over Noop
i asked DooM for SIO in next releas

The phone has flash memory, I don't think the I/O scheduler makes any difference at all.
Or does the scheduler collect reads/writes to leave the memory in sleep mode (if there is any) a longer time?

Pezo said:
The phone has flash memory, I don't think the I/O scheduler makes any difference at all.
Click to expand...
Click to collapse
yes , at least you can get 10 ms less in latency or 1 fps (considering an OC xperia s at 1,89 GHz ) but normally i prefer use noop and seldom bfq
P.S. I you wanna try the best you can benchmark it or force cpu freq. to 192 mhz and try all the schedulers

for those interested i benched at lowest cpu speeds, pretty much no difference between noop & deadline, noop slightly faster read (64.4 / 61.4)
cfq only 40.3 read, same write

There can be a huge diference!..
ishamm said:
for those interested i benched at lowest cpu speeds, pretty much no difference between noop & deadline, noop slightly faster read (64.4 / 61.4)
cfq only 40.3 read, same write
Click to expand...
Click to collapse
I have tested just about all and they are noticeable under different types of workload no doubt using setcpu on my Galaxy S3.
Cfq- "completely fair quing" does just as is sounds.
Bfq- "bandwidth fair quing" similar to cfq but distributes work load fairly giving the exception to prioritize work or task requiring more bandwidth given the app or task has set a priority
, usually asked within a program app.
Row "read over write" gives priority to reading task such as video play back, play intense games and or graphics, overall screen smoothness and cripness , as long as data doesn't require heavy write type of task. Example of an issue I had is, I left I/o in row and had been using ttorent to download a large torrent, uploading was OK but downloading speed was sticking and malfunctioning ttorent up until I switched to cfq. Could not multi task since downloading is obviously a write style task and all priority was to read over write. I love row when I am playing games or want a smooth experience.
Noop- is the idea of first come first serve, get you cake and wait in line to get another peice so if a fat ass is just requiring the whole cake others get hungry but must wait there turn. Bfq can solve that issue especially with sudden heavy multitasking not sticking a task to feel sluggish.
On demand - ramps up processor speed fairly quick returning to idle quick using juice to regain accelerated state once requested again. Conservetive is similar but less quick to jump up and with that said I can get good battery life on performance at times of heavy use do to the stability rather than constant ramps.
---------- Post added at 03:24 AM ---------- Previous post was at 03:19 AM ----------
ishamm said:
for those interested i benched at lowest cpu speeds, pretty much no difference between noop & deadline, noop slightly faster read (64.4 / 61.4)
cfq only 40.3 read, same write
Click to expand...
Click to collapse
I have tested just about all and they are noticeable under different types of workload no doubt using setcpu on my Galaxy S3.
Cfq- "completely fair quing" does just as is sounds.
Bfq- "bandwidth fair quing" similar to cfq but distributes work load fairly giving the exception to prioritize work or task requiring more bandwidth given the app or task has set a priority
, usually asked within a program app.
Row "read over write" gives priority to reading task such as video play back, play intense games and or graphics, overall screen smoothness and cripness , as long as data doesn't require heavy write type of task. Example of an issue I had is, I left I/o in row and had been using ttorent to download a large torrent, uploading was OK but downloading speed was sticking and malfunctioning ttorent up until I switched to cfq. Could not multi task since downloading is obviously a write style task and all priority was to read over write. I love row when I am playing games or want a smooth experience.
Noop- is the idea of first come first serve, get you cake and wait in line to get another peice so if a fat ass is just requiring the whole cake others get hungry but must wait there turn. Bfq can solve that issue especially with sudden heavy multitasking not sticking a task to feel sluggish.
On demand - ramps up processor speed fairly quick returning to idle quick using juice to regain accelerated state once requested again. Conservetive is similar but less quick to jump up and with that said I can get good battery life on performance at times of heavy use do to the stability rather than constant ramps.

I wonder what's in 2022 now. I read that on netbooks with eMMC BFQ gives a significant boost and there were even benchmarks for normal operation (not just read/write)

I too have definitely wondered where the Android OS has gotten in terms of efficiency with much newer hardware and proficiency in schedulers.
Being the OP is approaching a decade old, and a Google search for "android schedulers and their use cases" tubs this ancient thread up in #2 position! Lol

lenigma1too said:
I too have definitely wondered where the Android OS has gotten in terms of efficiency with much newer hardware and proficiency in schedulers.
Being the OP is approaching a decade old, and a Google search for "android schedulers and their use cases" tubs this ancient thread up in #2 position! Lol
Click to expand...
Click to collapse
So also finding firmware with other schedulers is another story. So is finding firmware with F2FS on the /system partition

FineSoFar said:
So also finding firmware with other schedulers is another story. So is finding firmware with F2FS on the /system partition
Click to expand...
Click to collapse
F2FS AFAIK is not a scheduler, but a type of file system for NAND flash, such as the type on nearly all cell phones.
You likely have seen ext4, or XFS, and perhaps in windows you have seen NTFS when initializing a new drive
These are all types of file systems.
F2FS, specifically 3.2 and above are extremely fast & efficient, and support much larger drives and file sizes in comparison to its geriatric older cousin ext4
As for efficient schedulers for F2FS, this is where I need more data, preferably explained to me the 1st time like I'm a very inquisitive 5 year old
I have found info, lots of highly technical info I don't have the collage degree to understand fully on GitHub, but it doesn't do a great job at explaining why A type scheduler is better than B type scheduler for doing this that and those things.
But I am slowly learning!
If any Dev in the know happens upon this post, I'll dance at your wedding if you could drop a list of pros and cons for say the 10 most common schedulers used in MODERN Android builds?
Say, Oreo and above maybe?
I completely understand if you want to exclude Android 12, as I understand it contains significant changes to how Android and apps both read and utilize data
I suspect that would make answering my question quickly and efficiently near impossible, yeah?
Cheers all!!

lenigma1too said:
F2FS AFAIK is not a scheduler, but a type of file system for NAND flash, such as the type on nearly all cell phones.
You likely have seen ext4, or XFS, and perhaps in windows you have seen NTFS when initializing a new drive
These are all types of file systems.
F2FS, specifically 3.2 and above are extremely fast & efficient, and support much larger drives and file sizes in comparison to its geriatric older cousin ext4
As for efficient schedulers for F2FS, this is where I need more data, preferably explained to me the 1st time like I'm a very inquisitive 5 year old
I have found info, lots of highly technical info I don't have the collage degree to understand fully on GitHub, but it doesn't do a great job at explaining why A type scheduler is better than B type scheduler for doing this that and those things.
But I am slowly learning!
If any Dev in the know happens upon this post, I'll dance at your wedding if you could drop a list of pros and cons for say the 10 most common schedulers used in MODERN Android builds?
Say, Oreo and above maybe?
I completely understand if you want to exclude Android 12, as I understand it contains significant changes to how Android and apps both read and utilize data
I suspect that would make answering my question quickly and efficiently near impossible, yeah?
Cheers all!!
Click to expand...
Click to collapse
I know the difference and I don't confuse the two. It's all about memory optimisation, which is why I mentioned it.
You don't usually choose a scheduler for the FS, you usually choose a scheduler for the host. I checked this with my own computer and for WD Gold for example BFQ was always better, but for Toshiba BFQ was ambiguous, it increased some characteristics and worsened others. On Android, similar scheduler tests, one is better and one is worse. So there's a choice between which numbers you want.
But on desktop Linux it's easier. F2FS and mq-deadline for SSD and ext4 and BFQ for HDD. After a good experience on the desktop I would like F2FS on the phone as well. The speed is not necessarily higher, but at least there will not be double journaling as with ext4 (if it is still relevant on A12).
Translated with www.DeepL.com/Translator (free version)

Related

[ZIP]Flashable SIO Init.d Script + Optional Module Installation

So with the hubbub about io schedulers and stuff, I created two zips. One just creates an init.d script to force SIO to be the io scheduler on boot. The other installs the SIO module (thanks to batoo here for the module!) and creates an init.d that initiates and forces SIO on boot.
All the files are attached below, and you just have to flash them. There is no need to use an app to change the scheduler; I'd recommend telling the app to remove it's boot defaults.
Prerequistes
An unlocked Prime with CWM or TWRP is all that is really needed.
For those with a ROM/kernel that already has SIO as a module (ie Motley's kernel): use the sio-script zip.
For those with a ROM/kernel that does NOT have SIO incorporated: use the sio-script+module zip.
Credit goes to batoo who compiled and provided the SIO module. All I did was made it easily flashable without meddling in the terminal.
For those who are wondering why use this instead of an app to set SIO, there are a few reasons:
a) You can flash this with a ROM when you are starting from scratch.
b) Some apps don't set it while android is booting and only after you reach boot. This makes things significantly faster when your tablet is fresh started. And those that do set it with init.d probably take a little longer.
c) I don't really like an app messing with low-level boot instructions. That's just me.
Thanks st33med for giving noob like me an easy way to do this.
Quick question, how would i go about uninstalling this, would it be a matter of just deleting a script from init.d or would i need to do something else, the reaon i ask is that im having random reboots on andrrowooks latest rom while playing video over wifi, and im pretty sure ive narrowed it down to the enabling of sio through system tuner app.
Dont know if the issue is with the system tuner app or if the sio scheduler is conflicting with something else in my system, if so, i'd need to be able to uninstall, if that were the case
Prime seems to be playing nicely with cfq scheduler
Yeah just remove the 97siosched script or whatever it is called. It's in /system/etc/init.d/. If anything, noop would also give better performance now than CFQ with the motley kernel.
st33med said:
Yeah just remove the 97siosched script or whatever it is called. It's in /system/etc/init.d/. If anything, noop would also give better performance now than CFQ with the motley kernel.
Click to expand...
Click to collapse
Thanks man
Yeah ive been reading up on it, and been testing the shedulers while using cool tool, seems like noop likes to use the lower clock speeds more often when compared to cfq, i think in regard to battery, noop does a better job at using lower level clock speeds compared to others, seems to do a better job at keeping to a steady 102mhz while idle too
Am currently testing noop and and the conservative governer, but seems like there is minor performance hit, i dont think its a placebo, and im leaning towards it being mostly the governer, so ill leave it for a while, and set it back to interactive and see if i notice a performance boost
Theres quite a few governers and schedulers out there, wonder if we'll see any more of them head towards the primes way
Like banderos said, this is great, thanks for making this so easy to use!
st33med said:
Yeah just remove the 97siosched script or whatever it is called. It's in /system/etc/init.d/. If anything, noop would also give better performance now than CFQ with the motley kernel.
Click to expand...
Click to collapse
To clarify, you're suggesting noop + your init.d script for all kernels, or just if you're using motley kernel?
Komodo Rogue said:
Like banderos said, this is great, thanks for making this so easy to use!
To clarify, you're suggesting noop + your init.d script for all kernels, or just if you're using motley kernel?
Click to expand...
Click to collapse
Noop is a separate IO scheduler that comes as the default in the stock kernel. My script would replace the default io scheduler with SIO.
banderos101 said:
Thanks man
Yeah ive been reading up on it, and been testing the shedulers while using cool tool, seems like noop likes to use the lower clock speeds more often when compared to cfq, i think in regard to battery, noop does a better job at using lower level clock speeds compared to others, seems to do a better job at keeping to a steady 102mhz while idle too
Am currently testing noop and and the conservative governer, but seems like there is minor performance hit, i dont think its a placebo, and im leaning towards it being mostly the governer, so ill leave it for a while, and set it back to interactive and see if i notice a performance boost
Theres quite a few governers and schedulers out there, wonder if we'll see any more of them head towards the primes way
Click to expand...
Click to collapse
This makes sense. SIO is doing a little bit of sorting of database access in the stack, so it takes some CPU time. CFQ is the same, probably even more intensive since it's doing Round Robin on everything. Noop sticks by it's name, no operations. It's just a FIFO stack with io access.
We probably won't see anymore. There is deadline (which came with the ATP app, doesn't work well for us), bfq, vr, and a few others. But to be honest, on our device, SIO gives the best IO performance of them all but noop uses the least cpu time. CFQ is good for the other kernels besides motley's 3.0.6 kernel because they have low io and every program needs access at once. CFQ schedules and predicts which requests would take the most time and preempts them to another time in the close future. This allowed the browser to be smooth but load times would suffer a bit.
st33med said:
Noop is a separate IO scheduler that comes as the default in the stock kernel. My script would replace the default io scheduler with SIO.
Click to expand...
Click to collapse
*facepalm* I didn't realize SIO was an IO scheduler, I've never heard of that one before.
Here, have a good laugh at my expense Through the eyes of a technically oblivious tech enthusiast: Half the time I have no idea what the people around here are talking about, but I like flashable scripts, ESPECIALLY init.d scripts, because it seems like that's where all the action is. :highfive: I'll try using something in different combinations until I blindly stumble into a combination that I like. If it breaks, I fire up adb, and if it's faster than before and doesn't kill battery, then it's a keeper.
But I DO at least understand IO schedulers, cpu governors, and other basic things! And I agree with "c) I don't really like an app messing with low-level boot instructions. That's just me." I also prefer a flashable/delete-able script to some app that you have to keep installed.
st33med said:
We probably won't see anymore. There is deadline (which came with the ATP app, doesn't work well for us), bfq, vr, and a few others. But to be honest, on our device, SIO gives the best IO performance of them all but noop uses the least cpu time. CFQ is good for the other kernels besides motley's 3.0.6 kernel because they have low io and every program needs access at once. CFQ schedules and predicts which requests would take the most time and preempts them to another time in the close future. This allowed the browser to be smooth but load times would suffer a bit.
Click to expand...
Click to collapse
Does any of that change if you're using a good SD card for swap space? I'm getting one (for free!) this week, and wanted to try making a swap space partition.
Komodo Rogue said:
Does any of that change if you're using a good SD card for swap space? I'm getting one (for free!) this week, and wanted to try making a swap space partition.
Click to expand...
Click to collapse
I don't think Android would like using the SD card as swap. It's slower than the eMMC inside the machine. I wouldn't worry about swap, we have a gig of DDR2 memory and motley includes swap to the MMC card already. I don't know about IO schedulers for external memory (I think there are controllers on the card itself that do the work so no need for IO schedulers for them), but the IO scheduler we set only applies for internal memory.
st33med said:
I don't think Android would like using the SD card as swap. It's slower than the eMMC inside the machine. I wouldn't worry about swap, we have a gig of DDR2 memory and motley includes swap to the MMC card already. I don't know about IO schedulers for external memory (I think there are controllers on the card itself that do the work so no need for IO schedulers for them), but the IO scheduler we set only applies for internal memory.
Click to expand...
Click to collapse
I am actually looking for improve the perf of the prime of my wife. Talking about the swap, Motley use Zram that create a swap on the RAM directly. From my experience on my HTC Sensation using swap on my SD provide a better experience for multitasking and permit to have a bigger swap that perfectly fit for heavy use. I am just wandering if it's possible to partition the internal memory without unlock the bootloader.
bASKOU said:
I am actually looking for improve the perf of the prime of my wife. Talking about the swap, Motley use Zram that create a swap on the RAM directly. From my experience on my HTC Sensation using swap on my SD provide a better experience for multitasking and permit to have a bigger swap that perfectly fit for heavy use. I am just wandering if it's possible to partition the internal memory without unlock the bootloader.
Click to expand...
Click to collapse
Nope, you can't change the internal partition scheme without unlocking it.

[REF][Super Friendly] Governors, I/O Schedulers, Optimization Tips [14-NOV]

Introduction
"It takes few hours to make a thread but it doesn't even take few seconds to say Thanks"- arpith.fbi
Click to expand...
Click to collapse
Code:
Don't be afraid to ask me anything.
I won't bite, but I might lick you.
Just thank me for this super brief thread.
Give credits to this thread by linking it if you're using any of my info.
Thank you to you too
Have you unlocked your bootloader of your current device ? If so, read it ! If not, learn the benifits ! :victory:
What is this thread about ? It is a very brief explanation of every governors and schedulers to let you find the best combo for your device.
I've been searching a lot about informations about Kernels, Governors, I/O Schedulers and also Android Optimization Tips. No matter its Google or XDA or other android forums. I will go into it and try the best I can to find these infos. So I thought of sharing it to here for the Mini, Mini Pro, Active and also Live with Walkman users.
My main reason to share this is to benefit users for better knowledge about Kernels, Governors, I/O Schedulers and Tips on Android Optimization. I'm not aware of whether where this should be posted, its related to kernels, governors and schedulers so I think it would be best if I share it to here. Yes, I wrote it word by word with references.Happy learning. :angel:
After months on XDA, no matter its in a development forum or Off Topic forum. Users kept on asking what's this what's that. And I'm sure that not all members will understand what is it until they bump into my thread
FAQs regarding on :-
-I/O Schedulers
-Kernel Governers
-Better RAM
-Better Battery
-FAQs
*Will add more when I found something useful.
Click to expand...
Click to collapse
I do a lot of asking by PM, to learn, it doesn't matter whether its a stupid one. (People who know me understands)
With my experience and lots of asking. I managed to find a lot of infos that we can use to optimize our phone.
I will try to explain as clear as I can.
Governors :-
-Smoothass
-Smartass
-SmartassV2
-SavagedZen
-Interactivex
-Lagfree
-Minmax
-Ondemand
-Conservative
-Brazilianwax
-Userspacce
-Powersave
-Performance
-Scary
-Lulzactive *
-Intellidemand *
-Badass *
-Lionheart *
-Lionheartx *
-Virtuous *
* Not yet available in current kernels in this forum
Explanation
OnDemand
Brief
Available in most kernels, and the default governor in most kernels. When the CPU load reaches a certain point, OnDemand will rapidly scale the CPU up to meet the demand, then gradually scale the CPU down when it isn't needed.
Click to expand...
Click to collapse
Review
Brief says all. By a simple explantion, OnDemand scales up to the required frequency to undergo the action you are doing and rapidly scales down after use.
Conservative
Brief
It is similar to the OnDemand governor, but will scale the CPU up more gradually to better fit demand. Conservative governor provides a less responsive experience than OnDemand, but it does save batter
Click to expand...
Click to collapse
Review
Conservative is the opposite of Interactive; it will slowly ramp up the frequency, then quickly drops the frequency once the CPU is no longer under a certain usage.
Interactive
Brief
Available in latest kernels, it is the default scaling option in some stock kernels. Interactive governor is similar to the OnDemand governor with an even greater focus on responsiveness.
Click to expand...
Click to collapse
Review
Interactive is the opposite of Conservative; it quickly scales up to the maximum allowed frequency, then slowly drops the frequency once no longer in use.
Performance
Brief
Performance governer locks the phone's CPU at maximum frequency. While this may sound like an ugly idea, there is growing evidence to suggest that running a phone at its maximum frequency at all times will allow a faster race-to-idle. Race-to-idle is the process by which a phone completes a given task. After that it returns the CPU to extremely efficient low-power state.
Click to expand...
Click to collapse
Review
Good at gaming, Really good. Disadvantages are it may damage your phone if too much usage.
Powersave
Brief
The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
Click to expand...
Click to collapse
Review
Set it to your desired minimum frequency and you won't have to look for your charger for once in a while.
Scary
Brief
A new governor wrote based on Conservative with some Smartass features, it scales accordingly to Conservative's way. It will start from the bottom. It spends most of its time at lower frequencies. The goal of this is to get the best battery life with decent performance. It will give the same performance as Conservative right now.
Click to expand...
Click to collapse
Review
Hmm.. Overall I don't see any difference. After I understand its main objective. I was very curious and decided to use it again. Results are the same.. No difference. Report to me if anyone has tested this.
Userspace
Brief
Userspace is not a governor pre-set, but instead allows for non-kernel daemons or apps with root permissions to control the frequency. Commonly seen as a redundant and not useful since SetCPU and NoFrills exist.
Click to expand...
Click to collapse
Review
Highly not recommended for use.
Smartass
Brief
It is based on the concept of the Interactive governor.
Smartass is a complete rewrite of the code of Interactive. 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.
Click to expand...
Click to collapse
Review
Smartass is rather the governer that will save your battery and make use of your processor for daily use. Like the brief explantion said " Smartass will spend much more time on lower frequencies." So logically you don't need for sleep profiles anymore.
SmartassV2
Brief
Theoretically a merge of the best properties of Interactive and OnDemand; automatically reduces the maximum CPU frequency when phone is idle or asleep, and attempts to balance performance with efficiency by focusing on an "ideal" frequency.
Click to expand...
Click to collapse
Review
This is a much favourite to everybody. I believe almost everyone here is using SmartassV2. Yes, it is better than Smartass because of its speed no scaling frequencies from min to max at a short period of time.
Smoothass
Brief
A much more aggressive version of Smartass that is very quick to ramp up and down, and keeps the idle/asleep maximum frequency even lower.
Click to expand...
Click to collapse
Review
In my personal experience, this is really useful for daily use. And yes, I'm using it all the time. It may decrease your battery life. I saw it OC itself to 1.4 gHz when I set it to 1.2. Good use. Recommended.
Brazilianwax
Brief
Similar to SmartassV2. More aggressive scaling, so more performance, but less battery.
Click to expand...
Click to collapse
Review
Based on SmartassV2. But its advantage is a much more performance wise governor.
SavagedZen
Brief
Another SmartassV2 based governor. Achieves good balance between performance & battery as compared to Brazilianwax.
Click to expand...
Click to collapse
Review
Not much difference compared to SmartassV2. But it is a optimized version of it.
Lagfree
Brief
Again, similar to Smartass but based on Conservative rather than Interactive, instantly jumps to a certain CPU frequency after the device wakes, then operates similar to Conservative. However, it has been noted as being very slow when down-scaling, taking up to a second to switch frequencies.
Click to expand...
Click to collapse
Review
Used it before. Like the name of the governor, I didn't experience any lag whatsoever. Another governor based on performance, but not battery efficient.
MinMax
Brief
MinMax is just a normal governor. No scaling intermediate frequency scaling is used.
Click to expand...
Click to collapse
Review
Well.. it's too normal that I can't really say anything about it..
Interactivex
Brief
InteractiveX governor is based heavily on the Interactive governor, enhanced with tuned timer parameters to optimize the balance of battery vs performance. 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.
Click to expand...
Click to collapse
Review
A better understanding from the brief to you users, this is an Interactive governor with a wake profile. More battery friendly than Interactive.
Due to current kernels doesn't have these governors. I will be delaying the explanation, its very interesting. If you want it ASAP, post below
-Lulzactive *
-Intellidemand *
-Badass *
-Lionheart *
-Lionheartx *
-Virtuous *
**********************************************************************************************************************************************************************
I/O Schedulers(thanks to droidphile)
Deadline
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.
Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.
Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
Click to expand...
Click to collapse
Noop
Inserts all the incoming I/O requests to a First In First Out queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data. Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Advantages:
Serves I/O requests with least number of cpu cycles. (Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.
Disadvantages:
Reduction in number of cpu cycles used is proportional to drop in performance.
Click to expand...
Click to collapse
Anticipatory
Based on two facts
i) Disk seeks are really slow.
ii) Write operations can happen whenever, but there is always some process waiting for read operation.
So anticipatory prioritize read operations over write. It anticipates synchronous read operations.
Advantages:
Read requests from processes are never starved.
As good as noop for read-performance on flash drives.
Disadvantages:
'Guess works' might not be always reliable.
Reduced write-performance on high performance disks.
Click to expand...
Click to collapse
BFQ
nstead of time slices allocation by CFQ, BFQ assigns budgets. Disk is granted to an active process until it's budget (number of sectors) expires. BFQ assigns high budgets to non-read tasks. Budget assigned to a process varies over time as a function of it's behavior.
Advantages:
Believed to be very good for usb data transfer rate.
Believed to be the best scheduler for HD video recording and video streaming. (because of less jitter as compared to CFQ and others)
Considered an accurate i/o scheduler.
Achieves about 30% more throughput than CFQ on most workloads.
Disadvantages:
Not the best scheduler for benchmarking.
Higher budget assigned to a process can affect interactivity and increased latency.
Click to expand...
Click to collapse
CFQ
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process. V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.
Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.
Disadvantages:
Some users report media scanning takes longest to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
Click to expand...
Click to collapse
SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
Advantages:
Simple, so reliable.
Minimized starvation of requests.
Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
Click to expand...
Click to collapse
VR
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.
Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
Click to expand...
Click to collapse
**********************************************************************************************************************************************************************
Android Optimization Tips
Want more free RAM/Better Battery Life/More performance ?
There's a lot of ways available for optimizing. Some of them are crap and some of them are actually useful.
Here I will guide you on HOW TO MAKE FULL USE MY TIPS.
Guides/Explanation that needs Modding
LowMemoryKiller (thanks to pikachu01)
LowMemoryKiller is a constant debate between more free RAM and more multitasking capabilities as free RAM.
It is actually a feature in the Android OS for better memory management.
You can read more about it HERE
This is an important feature due to the perennial problem of having low free memory causing lagginess and slowness in launching apps. When you have free memory lingering around the number of 40MB or less, the Android OS just lags like LOL.
What this would mean is, you would want to tweak the LMK to not have the situation of it having less than 40MB (or even close to that).
The modern Linux machine in the Android ecosystem relies on a mechanism called Low Memory Killer (LMK) to consistently free up RAM. This is due to Android's internal mechanism of caching apps (and never fully exiting them) when you press the back button. This is to enable faster app switching and provide a seamless experience for apps usage model. Android also, by itself will also constantly look for often used apps to cache them for faster app opening. This will happen even before your system fully boots.
Now, when you mention LMK, the most obvious thoughts that come up are minfrees and Out Of Memory (OOM) groupings. Yes, those two are integral parts when it comes to LMK. The issue here is that no one actually mentioned that there are two LMK systems in Android, that being:
- Linux LMK
- Android Dalvik VM LMK
Both are separate entities that kills/removes app/dalvik cache from RAM when RAM reaches a certain level.
What confuses most people is that the OOM groupings of both mechanisms have the same names being (Android 2.3 based):
LMK App Categories
FOREGROUND_APP: Your apps in the foreground, being used currently, interfacing with the user.
VISIBLE_APP: Visible app that is still viewable by the user, but not interacting with the user, example could be apps that reside in the status bar, and giving live information i.e. Os monitor graphs.
PERCEPTIBLE_APP: App that the user can still perceive i.e. Music app that is playing music.
HEAVY_WEIGHT_APP: RAM heavy apps that are not being interacted with, but will be a pain to load if its information is cleared in the memory.
SECONDARY_SERVER: App that acts as a secondary server. Not sure what this really means, but client-server thingy but secondary? Could be something that syncs with an app, but is not syncing currently?
BACKUP_APP: App that is currently making a backup (like Titanium backup?)
HOME_APP: Your launcher.
HIDDEN_APP: An exited app that still significant residual memory in the RAM. Exited only some time ago, or is constantly used by the user.
EMPTY_APP: An exited app that only has small remnants of residual memory in RAM. App that is exited quite some time ago.
Click to expand...
Click to collapse
*NOTE I don't really understand OOM Groupings. This is what I learned from the link in the description above.
HEREis Gustavo RD78's thread that users could follow up on OOM Groupings
Want some more about OOMs? Tell me !
Guides/Explanation that uses Apps
-SOON
Guides/Explanation that uses Scripts
Delayed. basically will be reviewing each script available. Will start from this forum's scripts devs be ready to think more on describing you scripts
.BTW, here's The List of Scripts
BONUS!
Manner lessons.
Click the THANKS button whenever somebody helped you.
Also click THANKS to modders and themers and devs. It is understandable that not everybody could donate but clicking a THANKS might also make thier day. They are also humans though. If you were the modder / themer / dev, would you hope people thank you when they're enjoying your work ? YES!
so be respectful to anyone that work tirelessly to provide you with thier ROM, Script, Mods, Themes, etc..
and Click Thanks to them.
Click to expand...
Click to collapse
Would I like a Thanks ? YES OF COURSE
Credits
pikachu01
droidphile
Knight47
Wiki
Google
kokzhanjia
PM me if you THINK you should be here.
Kernel Info
Collecting reviews. Anyone send me your review and i will highly credit you.
If by the time I think I need to update, I will be adding my own review.
*NOTE PM me first to let me know if you're doing it. That way I will give you time and wait you.
FAQ
reserved for questions that are asked frequently
great work bro
very nicely explained and everything
bro i think Knight47 also explained same thing in ray forum...its better u add his credits also
mv_style said:
great work bro
very nicely explained and everything
Click to expand...
Click to collapse
Lol really took me a long time collecting infos. Making me crazy by describing the governors and schedulers.
Anyway Thanks
Sent from my WT19i
sandy7 said:
bro i think Knight47 also explained same thing in ray forum...its better u add his credits also
Click to expand...
Click to collapse
Added.. just saw it.. i think mine is much more brief ?
Sent from my WT19i
kokzhanjia said:
Added.. just saw it.. i think mine is much more brief ?
Sent from my WT19i
Click to expand...
Click to collapse
yup i can see...nice work.
Thanks Sandy..
Very nice explanation bro... Brief and to the point...
Sent from my WT19i using xda app-developers app
Nyc Work bro...briefly Explained...:thumbup:
Sent from my ST15i using xda premium
Excellent job !!
rachit.rc96 said:
Very nice explanation bro... Brief and to the point...
Sent from my WT19i using xda app-developers app
Click to expand...
Click to collapse
Thanks bro.. worked hard for this
Sent from my WT19i
dynamic_4444 said:
Nyc Work bro...briefly Explained...:thumbup:
Sent from my ST15i using xda premium
Click to expand...
Click to collapse
ctragas said:
Excellent job !!
Click to expand...
Click to collapse
these comment motivates me a lot. Thank you. I appreciate it.
Anyone give suggestion please? In depth kernel info first or faq first?
Sent from my WT19i
Hmmm...not bad...
Best Explanation so far i've seen bro
Thanks
http://forum.xda-developers.com/showthread.php?t=1369817
Till-Kruspe said:
Hmmm...not bad...
Click to expand...
Click to collapse
TeamIndia said:
Best Explanation so far i've seen bro
Thanks
Click to expand...
Click to collapse
Thank you. benefit users here
Sent from my WT19i
Yesterday I unlocked the bootloader on my phone and flashed a new kernel. And I was looking for some explanation of the governors..and here it is, just like that Thank you buddy, it really helped me
[email protected] 2
Patrol619 said:
Yesterday I unlocked the bootloader on my phone and flashed a new kernel. And I was looking for some explanation of the governors..and here it is, just like that Thank you buddy, it really helped me
[email protected] 2
Click to expand...
Click to collapse
Great
Sent from my WT19i

[REF][Super Friendly] Explanation of Governors, I/O Schedulers and Kernels [23-Nov]

Introduction
"It takes few hours to make a thread but it doesn't even take few seconds to say Thanks"- arpith.fbi
Click to expand...
Click to collapse
Code:
Don't be afraid to ask me anything.
I won't bite, but I might lick you.
Just thank me for this super brief thread.
Give credits to this thread by linking it if you're using any of my info.
Thank you to you too
Have you unlocked your bootloader of your current device ? If so, read it ! If not, learn the benifits ! :victory:
What is this thread about ? It is a very brief explanation of every governors and schedulers to let you find the best combo for your device.
I've been searching a lot about informations about Kernels, Governors, I/O Schedulers and also Android Optimization Tips. No matter its Google or XDA or other android forums. I will go into it and try the best I can to find these infos. So I thought of sharing it to here for the Neo users.
My main reason to share this is to benefit users for better knowledge about Kernels, Governors, I/O Schedulers and Tips on Android Optimization. I'm not aware of whether where this should be posted, its related to kernels, governors and schedulers so I think it would be best if I share it to here. Yes, I wrote it word by word with references.Happy learning. :angel:
After months on XDA, no matter its in a development forum or Off Topic forum. Users kept on asking what's this what's that. And I'm sure that not all members will understand what is it until they bump into my thread
FAQs regarding on :-
-I/O Schedulers
-Kernel Governers
-Better RAM
-Better Battery
-FAQs
*Will add more when I found something useful.
Click to expand...
Click to collapse
I do a lot of asking by PM, to learn, it doesn't matter whether its a stupid one. (People who know me understands)
With my experience and lots of asking. I managed to find a lot of infos that we can use to optimize our phone.
I will try to explain as clear as I can.
Governors :-
-Smoothass
-Smartass
-SmartassV2
-SavagedZen
-Interactivex
-Lagfree
-Minmax
-Ondemand
-Conservative
-Brazilianwax
-Userspacce
-Powersave
-Performance
-Scary
-Lulzactive *
-Intellidemand *
-Badass *
-Lionheart *
-Lionheartx *
-Virtuous *
* Not yet available in current kernels in this forum
Explanation
OnDemand
Brief
Available in most kernels, and the default governor in most kernels. When the CPU load reaches a certain point, OnDemand will rapidly scale the CPU up to meet the demand, then gradually scale the CPU down when it isn't needed.
Click to expand...
Click to collapse
Review
Brief says all. By a simple explantion, OnDemand scales up to the required frequency to undergo the action you are doing and rapidly scales down after use.
Conservative
Brief
It is similar to the OnDemand governor, but will scale the CPU up more gradually to better fit demand. Conservative governor provides a less responsive experience than OnDemand, but it does save batter
Click to expand...
Click to collapse
Review
Conservative is the opposite of Interactive; it will slowly ramp up the frequency, then quickly drops the frequency once the CPU is no longer under a certain usage.
Interactive
Brief
Available in latest kernels, it is the default scaling option in some stock kernels. Interactive governor is similar to the OnDemand governor with an even greater focus on responsiveness.
Click to expand...
Click to collapse
Review
Interactive is the opposite of Conservative; it quickly scales up to the maximum allowed frequency, then slowly drops the frequency once no longer in use.
Performance
Brief
Performance governer locks the phone's CPU at maximum frequency. While this may sound like an ugly idea, there is growing evidence to suggest that running a phone at its maximum frequency at all times will allow a faster race-to-idle. Race-to-idle is the process by which a phone completes a given task. After that it returns the CPU to extremely efficient low-power state.
Click to expand...
Click to collapse
Review
Good at gaming, Really good. Disadvantages are it may damage your phone if too much usage.
Powersave
Brief
The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
Click to expand...
Click to collapse
Review
Set it to your desired minimum frequency and you won't have to look for your charger for once in a while.
Scary
Brief
A new governor wrote based on Conservative with some Smartass features, it scales accordingly to Conservative's way. It will start from the bottom. It spends most of its time at lower frequencies. The goal of this is to get the best battery life with decent performance. It will give the same performance as Conservative right now.
Click to expand...
Click to collapse
Review
Hmm.. Overall I don't see any difference. After I understand its main objective. I was very curious and decided to use it again. Results are the same.. No difference. Report to me if anyone has tested this.
Userspace
Brief
Userspace is not a governor pre-set, but instead allows for non-kernel daemons or apps with root permissions to control the frequency. Commonly seen as a redundant and not useful since SetCPU and NoFrills exist.
Click to expand...
Click to collapse
Review
Highly not recommended for use.
Smartass
Brief
It is based on the concept of the Interactive governor.
Smartass is a complete rewrite of the code of Interactive. 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.
Click to expand...
Click to collapse
Review
Smartass is rather the governer that will save your battery and make use of your processor for daily use. Like the brief explantion said " Smartass will spend much more time on lower frequencies." So logically you don't need for sleep profiles anymore.
SmartassV2
Brief
Theoretically a merge of the best properties of Interactive and OnDemand; automatically reduces the maximum CPU frequency when phone is idle or asleep, and attempts to balance performance with efficiency by focusing on an "ideal" frequency.
Click to expand...
Click to collapse
Review
This is a much favourite to everybody. I believe almost everyone here is using SmartassV2. Yes, it is better than Smartass because of its speed no scaling frequencies from min to max at a short period of time.
Smoothass
Brief
A much more aggressive version of Smartass that is very quick to ramp up and down, and keeps the idle/asleep maximum frequency even lower.
Click to expand...
Click to collapse
Review
In my personal experience, this is really useful for daily use. And yes, I'm using it all the time. It may decrease your battery life. I saw it OC itself to 1.4 gHz when I set it to 1.2. Good use. Recommended.
Brazilianwax
Brief
Similar to SmartassV2. More aggressive scaling, so more performance, but less battery.
Click to expand...
Click to collapse
Review
Based on SmartassV2. But its advantage is a much more performance wise governor.
SavagedZen
Brief
Another SmartassV2 based governor. Achieves good balance between performance & battery as compared to Brazilianwax.
Click to expand...
Click to collapse
Review
Not much difference compared to SmartassV2. But it is a optimized version of it.
Lagfree
Brief
Again, similar to Smartass but based on Conservative rather than Interactive, instantly jumps to a certain CPU frequency after the device wakes, then operates similar to Conservative. However, it has been noted as being very slow when down-scaling, taking up to a second to switch frequencies.
Click to expand...
Click to collapse
Review
Used it before. Like the name of the governor, I didn't experience any lag whatsoever. Another governor based on performance, but not battery efficient.
MinMax
Brief
MinMax is just a normal governor. No scaling intermediate frequency scaling is used.
Click to expand...
Click to collapse
Review
Well.. it's too normal that I can't really say anything about it..
Interactivex
Brief
InteractiveX governor is based heavily on the Interactive governor, enhanced with tuned timer parameters to optimize the balance of battery vs performance. 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.
Click to expand...
Click to collapse
Review
A better understanding from the brief to you users, this is an Interactive governor with a wake profile. More battery friendly than Interactive.
Due to current kernels doesn't have these governors. I will be delaying the explanation, its very interesting. If you want it ASAP, post below
-Lulzactive *
-Intellidemand *
-Badass *
-Lionheart *
-Lionheartx *
-Virtuous *
**********************************************************************************************************************************************************************
I/O Schedulers(thanks to droidphile)
Deadline
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.
Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.
Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
Click to expand...
Click to collapse
Noop
Inserts all the incoming I/O requests to a First In First Out queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data. Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Advantages:
Serves I/O requests with least number of cpu cycles. (Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.
Disadvantages:
Reduction in number of cpu cycles used is proportional to drop in performance.
Click to expand...
Click to collapse
Anticipatory
Based on two facts
i) Disk seeks are really slow.
ii) Write operations can happen whenever, but there is always some process waiting for read operation.
So anticipatory prioritize read operations over write. It anticipates synchronous read operations.
Advantages:
Read requests from processes are never starved.
As good as noop for read-performance on flash drives.
Disadvantages:
'Guess works' might not be always reliable.
Reduced write-performance on high performance disks.
Click to expand...
Click to collapse
BFQ
nstead of time slices allocation by CFQ, BFQ assigns budgets. Disk is granted to an active process until it's budget (number of sectors) expires. BFQ assigns high budgets to non-read tasks. Budget assigned to a process varies over time as a function of it's behavior.
Advantages:
Believed to be very good for usb data transfer rate.
Believed to be the best scheduler for HD video recording and video streaming. (because of less jitter as compared to CFQ and others)
Considered an accurate i/o scheduler.
Achieves about 30% more throughput than CFQ on most workloads.
Disadvantages:
Not the best scheduler for benchmarking.
Higher budget assigned to a process can affect interactivity and increased latency.
Click to expand...
Click to collapse
CFQ
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process. V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.
Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.
Disadvantages:
Some users report media scanning takes longest to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
Click to expand...
Click to collapse
SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
Advantages:
Simple, so reliable.
Minimized starvation of requests.
Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
Click to expand...
Click to collapse
VR
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.
Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
Click to expand...
Click to collapse
Credits
-droidphile
-kokzhanjia
Reseved for kernel info
Sent from my WT19i
I usually go to http://forum.xda-developers.com/showthread.php?t=1369817 to see full explanation of each governor, io scheduler etc
archer928 said:
I always go to http://forum.xda-developers.com/showthread.php?t=1369817 to see full explanation of each governor, io scheduler etc
Click to expand...
Click to collapse
Yeah that one is great. Mine is straight forward i think
EDIT : And now you dont have to go that far now , just click over your development to see these ;D
Sent from my WT19i
Dude... exactly what I need. You are awesome.
archer928 said:
I usually go to http://forum.xda-developers.com/showthread.php?t=1369817 to see full explanation of each governor, io scheduler etc
Click to expand...
Click to collapse
Same here ...
But OP has already credited droidphile. I see!
So all's good!
Sent from my MT11i using xda premium
Ghostfreak NB said:
Same here ...
But OP has already credited droidphile. I see!
So all's good!
Sent from my MT11i using xda premium
Click to expand...
Click to collapse
In xda, i like how different forums have different users with different personalities. so i posted here so that i could feel that feeling again
Sent from my WT19i
Good work OP!
Keep updating whenever you've got time!
Sent from my MT11i using xda premium
kokzhanjia said:
Yeah that one is great. Mine is straight forward i think
EDIT : And now you dont have to go that far now , just click over your development to see these ;D
Click to expand...
Click to collapse
Mine isn't straight forward enough? May be because I over-explain things...
It isn't that 'far' if you bookmark a thread in browser bookmark toolbar
droidphile said:
Mine isn't straight forward enough? May be because I over-explain things...
It isn't that 'far' if you bookmark a thread in browser bookmark toolbar
Click to expand...
Click to collapse
I didnt mean that
What i meant was my thread is only for stuffs mentioned at the title.
No offence friend. Your thread is far more than complete.
Sent from WT19i
droidphile said:
Mine isn't straight forward enough? May be because I over-explain things...
It isn't that 'far' if you bookmark a thread in browser bookmark toolbar
Click to expand...
Click to collapse
Your thread is subscribed so question of it being 'far 'is totally wiped out!
And with that kinda explanation, that you've made,
Your thread rules!
Its best for getting very detailed info!
Just that OP has made a fair attempt to post it in our device forum! And has tried to keep it short!
Sent from my MT11i using xda premium

I/O Scheduler

Which I/O Scheduler do you guys use? I've always used ROW but I've heard good things about SIO
ive stuck to sio or deadline have you ever read the list to make the decision based on your usage?
mr4r4n said:
ive stuck to sio or deadline have you ever read the list to make the decision based on your usage?
Click to expand...
Click to collapse
Yes, i've breifly read the descriptions, but I've always stuck to ROW, im testing out SIO right now but idk if I wil be able to tell a difference.
SIO scores highest on benchmarks when compared to Deadline, Noop, and ROW. I used Antutu for testing.
I/O scheduler makes very little real world difference. Benchmarks overall do a really poor job of simulating real world workload and seem to place a higher emphasis on the results than even a perfect simulation would warrant. The best place to feel it is in media scanning and app installation. Apps themselves place comparatively very light loads on the storage.

[ZEN-KERNEL] 3.10-zen1 "Dollar Drink Night" (April 19)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The buck stops here
Project Background
This kernel makes things BETTER. Without tons and tons of over exaggerated fluff
"But BB...What about INTelligentSuperBOOSTXX5MillionPOINT5MegaBlast?!?!?!? Can you add this!?". While I appreciate all the great and free work that several great individuals do for the community. I personally don't see the need to alter any of these TEGRA/Board drivers a whole lot - not on these latest generation of devices. Things run pretty well I think.
"Why don't you just run the stock kernel then you sick low-life waste of space?"
Because, I still think improvements can be made.
I think there's a lot of good intentions out there to make improvements in the kernel-space, BUT:
I've observed a variety of things that were prevalent a couple of years ago and that are still prevalent today. (1) A lot of small things are changed - and advertised as a huge improvement, (2) some tunables are adjusted and advertised as a huge change/improvement but end up being a regression because they were never tested, or (3) some code is merged that causes regressions and it turns out that self-inflicted bugs are being chased around.
Zen is an attempt at improving the stock kernel. That's it.
Project Summary
The Zen kernel has always been oriented at improving the experience for desktop mobile users as much as possible. This iteration of the series is no different. The goal is simple: Improve the experience.
BFS CPU Scheduler
BFS is an alternative CPU scheduler to the stock kernel's CFS. BFS features a simple single-runqueue O earliest virtual deadline first design. There is no need for excessive balancing to achieve fariness on multiple runqueues, nor is there a need for strict NICE values.
The goal of the Brain **** Scheduler, referred to as BFS from here on, is to completely do away with the complex designs of the past for the cpu process scheduler and instead implement one that is very simple in basic design. The main focus of BFS is to achieve excellent desktop interactivity and responsiveness without heuristics and tuning knobs that are difficult to understand, impossible to model and predict the effect of, and when tuned to one workload cause massive detriment to another.
Click to expand...
Click to collapse
Anyway, not going to get into it much but you may find more information in post 2, or throughout this thread (I explained a bit more details about it around page 4).
Also, check these out:
BFS FAQ
BFS Wikia
Android/Tegra 3.10 BFS Port
What is different about this and the 3.10-ck1 bfs v440 patch available on ck.kolivas.org
Backport fixes and features (not SMT NICE) from up to bfs v460ish
Some of Alfred Chen's upstream synchronization and refactoring of BFS methods (linux-3.18/19-gc branch)
My own syncing with mainline as well as backporting
support for tegra yield notifiers
What does this mean
Suspend/Wake issues that were killer on bfs v440 for 3.10 are not present in this port - these issues have been resolved.
You should NEVER report any issue related to this kernel upstream. Not android, linux, or BFS related. Do not report any issues anywhere but here.
"How about the performance?"
This kernel is all about interactivity by default.
The default rr_interval is set to 6. The logic is the human eye cannot detect jitter until about 7ms. Try lowering it if you want to increase interactivity. Try increasing it to achieve higher thoroughput.
-------------------------
Zen/Shamu Features
BFS CPU Scheduler
@flar2 Wake Gestures
USB Fastcharge Support
Fsync SysFS Interface
Overclocking support to 2.5GHz
FIOPS + BFQ in addition to the stock ROW, CFQ, Deadline, No-op I/O schedulers
Several misc upstream updates/fixes.
zRam support
@osm0sis AnyKernel2
---------
Releases
Wipe /cache before flashing for best results
DIRTY FLASH ROM FIRST!
If you have any issues or if you are coming from another custom kernel.
DIRTY FLASH ROM FIRST IF COMING FROM ANOTHER CUSTOM KERNEL
3.10-zen1 "Dollar Drink Night"
First Release/Features:
BFS CPU Scheduler by Con Kolivas. Backport from v461 and Alfred Chen's -gc branch ported to android/tegra 3.10 by me
BFQ + FIOPS I/O Schedulers in addition to CFQ (default), ROW, Deadline
Interactive governor sync'd up with ZenKernel_Shamu
EXT4 from v3.10.y
Several misc. memory leak, race condition fixes, etc. picked from v3.10.y
CPU overclocking up to 2.5GHz
Wake gestures from @flar2
MM+VM Changes from upstream v3.10.y
2A Charging Support
Fsync toggle support
3.10-zen1 AnyKernel Zip (Use for any ROM)
Legacy Releases
3.10-zen0 "Warranty Voided"
Changes:
This is just experimental
Make sure it works
Changes
3.10-zen0 AnyKernel Zip (Use for any ROM)
Thanks guys, and enjoy. Feedback is always appreciated.
XDA:DevDB Information
Zen Kernel, Kernel for the Nexus 9
Contributors
bbedward
Source Code: https://github.com/bbedward/ZenKernel_Flounder
Kernel Special Features:
Version Information
Status: Beta
Current Stable Version: 1
Beta Release Date: 2015-04-19
Created 2015-04-19
Last Updated 2015-04-19
this is untested + experimental.
I fixed a BFS suspend issue in my first test kernel and resolved f2fs issues.
This is here because somebody suggested it to me as the general section is not a good place to be.
AnyKernel zip uploaded
Love your kernel on the nexus 6. And I'm sure I'll love it on the n9!
Thanks man!
omvir said:
Love your kernel on the nexus 6. And I'm sure I'll love it on the n9!
Thanks man!
Click to expand...
Click to collapse
Thanks, if I didn't think -Zen was the best option then it wouldn't exist
I wanted to try this but I guess I'll have to wait till the official 5.1 is out. I'm still running stock ROM with a custom kernel so that puts me on 5.0.1.
time_shock said:
I wanted to try this but I guess I'll have to wait till the official 5.1 is out. I'm still running stock ROM with a custom kernel so that puts me on 5.0.1.
Click to expand...
Click to collapse
Doesn't matter, this is on stock 5.0 base. I use AnyKernel so it's probably compatible with 5.1 too
bbedward said:
Doesn't matter, this is on stock 5.0 base. I use AnyKernel so it's probably compatible with 5.1 too
Click to expand...
Click to collapse
I see why you thought this I just copy pasted my n6 thread
Made some changes.
bbedward said:
Doesn't matter, this is on stock 5.0 base. I use AnyKernel so it's probably compatible with 5.1 too
Click to expand...
Click to collapse
I bootlooped on AICP....went back to Fire and Ice.
Sent from my Nexus 9 using Tapatalk
So in daily usage, what effect should I notice after flashing this kernel? I read lots of your QA and such but still unsure.
Phantom Pt. II said:
So in daily usage, what effect should I notice after flashing this kernel? I read lots of your QA and such but still unsure.
Click to expand...
Click to collapse
I'm not even sure this 0 build works I may have to package an entire ramdisk and quit trying AnyKernel because of all the different 5.1 and 5.0 stuff going on here.
But the point is to add things that matter and things that make a difference. You probably don't care about having 3 alternative random number generators built in the kernel, or about having slightly more optimized memcpy/memmove operations. Not that those things aren't necessarily good, but what's the difference you'll notice with and without those - nothing on the other hand maybe you care about real performance and battery improvements, fast USB charging ,upstream stability, etc, etc.
This is where Zen comes in. Cut out everything except what matters. BFS helps me make a real difference in the performance and battery department.
How does it benefit performance? Well the stock scheduler has lots of overhead with 1 run queue per CPU, huge balancing algorithms, huge fairness calculation algorithms, many tunables. Stuff that's probably pretty essential if you have 64+ logical CPUs where you need to have the separate runqueues to avoid contention issues that come from such a setup. BFS chooses 1 run queue shared by all the CPUs. By design it is able to be fair without big balancing algorithms, interactive without focusing on countless priority calculations, and perhaps most importantly if you run 4 jobs on 4 CPUs it will keep those CPUs busy with a consistent load. On the stock scheduler they may tell you to run -8 or so jobs on a 4 CPU system to keep things busy.
You see a focus on a power-aware CPU scheduler lately as well. What they are doing to achieve that is keep jobs on the left most CPU cores keeping the other ones idle more. On BFS, these power aware things are not applicable because it requires no such load balancer. BFS uses sticky tasks to keep jobs on a CPU which aids in allowing other CPUs to idle more frequently. So when you see 1 CPU get busy 1 CPU will scale in the CPU frequency driver rather than unnecessarily scaling multiple CPUs after balancing.
Anyway, why doesn't google use it if it's so good - because it isn't mainline essentially. It will never go mainline unless they add a pluggable CPU scheduler interface (not in the foreseeable future) because it isn't applicable for a wide variety of systems (specialized for light-NUMA desktop type workloads). Google has had it in an experimental android branch before, but going so far away from mainline takes away a big aspect of support that you get from staying mainline (you get a bug and you can't rely on mainline support)
Why have no other kernels implemented it if it's so good? (They have now, since I brought it here and on the N6) probably because they didn't think it was worth the time to bring back the newest implementation to 3.10 or they didn't have the know how (the official 3.10 -Ck BFS patch is quite old, and broken with suspending - which is why I started the back port/sync process to begin with) so maybe others tried it and gave up.
Anyway the difference between a non-zen nexus 6 and a zen nexus 6 is a noticeable one. It's the only one I believe makes a noticeable performance difference (without over clocking or ramping up frequency scaling). Many claim it makes a noticeable battery difference too, without sacrificing touch boost or killing frequency scaling (in other words, it isn't making lag for better battery life)
Anyway enough rambling. Its coming here to the nexus 9 because I want to continue to support 2014+ nexus devices with my kernels and perhaps one or two other flag ships (I touched the S6 but there's one kernel per variant, their default config is incomplete, typical Samsung mess)
Also there will be a 100% free and open source GPL zen app. Which I think has a brilliant framework and a lot of potential. But that's limited by my time currently.
Let me understand this?
OK, bfs seem to be really smooth but what I'm trying to understand is that bfs is like i/o scheduler right?
AllanJacques said:
Let me understand this?
OK, bfs seem to be really smooth but what I'm trying to understand is that bfs is like i/o scheduler right?
Click to expand...
Click to collapse
No.
1.) I/O scheduler handles how requests to the disks (EMMC/Sdcard in this case) are served (order served first, etc.)
2.) The requests to get disk time are all coming from the CPU. (From the tasks getting CPU time)
3.) The CPU scheduler handles when, for how long, and how to serve the tasks that want CPU time. All factors considered such as keeping things fair between all the CPU cores, tasks that will do blocking due to an I/O wait or synchronization locking.
--BFS (Brain F*** Scheduler) is the CPU scheduler in (3). It is the only well-known replacement to the stock kernel's CFS (completely fair scheduler). I'm sure there have been others since CFS, but I haven't really heard about any. Some one and dones mostly.
What you are thinking of are the I/O schedulers which are completely separate, and only related to how requests to the EMMC/Disk are served. You and many are confusing BFS (Brain F*** Scheduler, CPU/Process scheduler) and BFQ (Budget Fair Queueing, I/O, disk scheduler)
See (both BFS and CFS are preemptive schedulers):
http://en.wikipedia.org/wiki/Scheduling_(computing)#Short-term_scheduling
http://ck.wikia.com/wiki/BFS
Got it!
One last question, BFS rr_interval can be tweaked? What does it do?
AllanJacques said:
Got it!
One last question, BFS rr_interval can be tweaked? What does it do?
Click to expand...
Click to collapse
You have millions and millions of tasks/processes going through the CPU in seconds.
Each task is waiting in line to be scheduled.
When BFS schedules said task, it is allowed to run for a maximum of RR_INTERVAL.
So by default at 6 (ms), a task cannot run for more than 6ms at a time. If it will take longer than that it will be "preempted" by another task, and will have to go back in the queue and wait until it is scheduled again (given a deadline).
If you raise it to 300, for example, a task will be allowed to be running for up to 300ms at a time. (Maybe a task has to wait for for disk time, which may take 100ms or something, etc.)
It is said that the lower value would mean lower latencies seen by the user, and a higher value would see higher thoroughput. 6 is default because it is determined the human eye can't detect jitters below 7ms. You can try lowering it/raising it. See what works best.
I used to always get battery drain on brain f kernels back in the day when it first came out. I look forward to any improvements since then.
dictionary said:
I used to always get battery drain on brain f kernels back in the day when it first came out. I look forward to any improvements since then.
Click to expand...
Click to collapse
The old implementations never sync'd up very well with mainline suspend/wake stuff. Since ~3.12 or so they have - and the one on this kernel (and the N6 kernel) do as well :good:
bbedward said:
The old implementations never sync'd up very well with mainline suspend/wake stuff. Since ~3.12 or so they have - and the one on this kernel (and the N6 kernel) do as well :good:
Click to expand...
Click to collapse
That makes me happy. Will report findings. Thanks again
Working well on CM 12.1 unofficial!
I know this isn't the kernels fault, its googles fault but the interactive governor tunables suck! Do you have any suggestions ? Can you work your magic? Currently its kind of stuttery!
omvir said:
Working well on CM 12.1 unofficial!
I know this isn't the kernels fault, its googles fault but the interactive governor tunables suck! Do you have any suggestions ? Can you work your magic? Currently its kind of stuttery!
Click to expand...
Click to collapse
I will sync it up with the same interactive of zen on the N6. Looks like the tegra version of interactive is a bit older.

Categories

Resources