I pooled together information on cpu governors and I/O schedulers from several sources. If anyone has any additional information to add, feel free to chime in . Credit goes to Knzo, Pikachu01, HipKat, and Droidphile for this compilation. This will continue to expand as I come across more information.
Apps are the probably the most popular methods for controlling these settings. I won't list them all, but here are the most common:
Voltage Control - I find this to be the best option; its "set at boot" method is faster and more reliable (init.d script created by the app). Doesn't have a widget that I find useful, but has everything SetCPU has and then some (I/O scheduler, GPU control, charging current, etc.)
SetCPU - limited to governors, voltages, sampling rate, etc. but has a very useful widget. I've experienced issues before with it successfully setting values at boot.
*Interested in jumping to a particular governor/scheduler/term? Press Ctrl + F and enter the term.
Post 1 - Governors
Post 2 - I/O Schedulers
Governors
knzo said:
. . .
So, what's a governor?
Code:
Consider a CPU, the processor of Optimus Black. Well, this CPU operates at
different frequencies (on stock: 300, 600, 800 and 1000 Mhz) and we usually
say it's a 1 Ghz (1000 Mhz) processor because that's the max frequency it
can go 100% stable.
Now, a governor is a CPUFreq driver. Like the name suggests, it is what
decides when to be on full speed at max frequency or when to be at min
or mid and how fast should it reach the max/min, should it be almost insta
and provide a good smoothness overall? Should it take longer and go 200
Mhz at a time and preserve battery? This and more is what a governor is.
There are many governors around, some for single-cores, some for dual-cores which I won't even refer to (jRCU). In stock you can find 5 governors, in Quasar kernel you can find much more. Most android and xda users don't even know half of governors I'll list as there is no android kernel out there with more governors than Quasar, only one has the same amount and this is a kernel made by my friend and fellow portuguese franciscofranco.
Listing of knzo-known governors:
Ondemand *&
Powersave *@
Userspace *
Conservative *
Performance *
Interactive +
InteractiveX +
Smartass +
Smoothass +
BrazilianWax +
SavagedZen +
Minmax +&
Scary +
Legend: & - default | @ - disabled by default | * - exists in stock kernel | + - added in Quasar kernel
And now the official summary for each and brief comment by myself:
Ondemand:
Code:
/*
* drivers/cpufreq/cpufreq_ondemand.c
*
* Copyright (C) 2001 Russell King
* (C) 2003 Venkatesh Pallipadi <[email protected]>.
* Jun Nakajima <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
Ondemand is the default choice due to its balanced settings which offers a good compromise between battery and performance. However, it has no suspend profiles and falls a bit short on performance in smartphones.
Powersave:
Code:
/*
* linux/drivers/cpufreq/cpufreq_powersave.c
*
* Copyright (C) 2002 - 2003 Dominik Brodowski <[email protected]>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
Powersave sets the max frequency at the same clock as the min frequency. Impossible for daily usage for obvious reasons. Used usually with SetCPU screen-off profiles in combo with Ondemand.
Userspace:
Code:
/*
* linux/drivers/cpufreq/cpufreq_userspace.c
*
* Copyright (C) 2001 Russell King
* (C) 2002 - 2004 Dominik Brodowski <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
Userspace lets you manually set the frequencies. To be completely honest, I've never used it and I've never heard of anyone who uses it. I'm completely off on how it fares or if it even works or any of its kinks.
Conservative:
Code:
/*
* drivers/cpufreq/cpufreq_conservative.c
*
* Copyright (C) 2001 Russell King
* (C) 2003 Venkatesh Pallipadi <[email protected]>.
* Jun Nakajima <[email protected]>
* (C) 2009 Alexander Clouter <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
Conservative is a slower Ondemand when it comes to ramping. For example, when you turn on the phone and start interacting with it, Ondemand will increase frequency until it reaches max at x speed. Conservative will do the same at x/2. Faster the ramping the more battery it consumes so conservative while a worse governor for performance it's also a good one for battery.
Performance:
Code:
/*
* linux/drivers/cpufreq/cpufreq_performance.c
*
* Copyright (C) 2002 - 2003 Dominik Brodowski <[email protected]>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
If Powersave governor is Yin, this one is Yang. It sets the min frequency the same as max frequency so the phone is always at max power. This is usually used with SetCPU profiles for when charging or plugged to computer. For obvious reasons can't be used in daily usage.
Interactive:
Code:
/*
* drivers/cpufreq/cpufreq_interactive.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Mike Chan ([email protected])
*
*/
While Conservative is a slower Ondemand, Interactive is a faster one. Ramping will be slightly faster so interaction will seem more snappy with battery comsumption just increasing a tiny bit. This has been the most popular governor for the past year.
InteractiveX:
Code:
/*
* drivers/cpufreq/cpufreq_interactive.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Mike Chan ([email protected]) - modified for suspend/wake by imoseyon
*
*/
As you can see in the summary, this is Interactive with some modifications by imoseyon. Now instead of using the dirty SetCPU profiles method of locking the frequency to minimum when phone is asleep, the own governor will do that which is a cleaner method and with a better ramping management when coming out of sleep. Basically, it has Interactive's performance with better battery.
Smartass:
Code:
/*
* drivers/cpufreq/cpufreq_smartass2.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Erasmux
*
* Based on the interactive governor By Mike Chan ([email protected])
* which was adaptated to 2.6.29 kernel by Nadlabak ([email protected])
*
* SMP support based on mod by faux123
*
* requires to add
* EXPORT_SYMBOL_GPL(nr_running);
* at the end of kernel/sched.c
*
*/
This one has been increasingly popular and it's becoming the favorite one for Q3-4 2011. Smartass is based on Interactive but with some modifications, as well as built-in profiles. Recently, Erasmux released this v2 which by what people are saying it's very good. I suggest you go to this link for more informations. It's probably Quasar's best governor at the moment, along with Minmax.
Smoothass:
Code:
/*
* drivers/cpufreq/cpufreq_smoothass.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Erasmux
*
* Based on the interactive governor By Mike Chan ([email protected])
* which was adaptated to 2.6.29 kernel by Nadlabak ([email protected])
*
* requires to add
* EXPORT_SYMBOL_GPL(nr_running);
* at the end of kernel/sched.c
*
*/
One more jewel from Erasmux. As far as I know this is a Smartass v1 tuned for a more aggressive ramping, which means, more performance and snappiness, less battery.
BrazilianWax:
Code:
/*
* drivers/cpufreq/cpufreq_brazilianwax.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Erasmux
*
* Based on the interactive governor By Mike Chan ([email protected])
* which was adaptated to 2.6.29 kernel by Nadlabak ([email protected])
*
* requires to add
* EXPORT_SYMBOL_GPL(nr_running);
* at the end of kernel/sched.c
*
*/
Someone correct me if I'm wrong but this is basically the same as Smoothass.
SavagedZen:
Code:
/*
* drivers/cpufreq/cpufreq_savagedzen.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Joshua Seidel
* Based on the smartass governor by Erasmux
*
* Based on the interactive governor By Mike Chan ([email protected])
* which was adaptated to 2.6.29 kernel by Nadlabak ([email protected])
* --Modifications by arescode--
* adapted to stock (1 GHz) frequency by zacharias.maladroit
*
* requires to add
* EXPORT_SYMBOL_GPL(nr_running);
* at the end of kernel/sched.c
*
*/
Another Smartass-based kernel with many modifications aiming to attain both better battery and performance. And it succeeds in my opinion. I've used it in past devices, it's a very good overall governor, a balanced option.
Minmax:
Code:
/*
* drivers/cpufreq/cpufreq_minmax.c
*
* Copyright (C) 2001 Russell King
* (C) 2003 Venkatesh Pallipadi <[email protected]>.
* Jun Nakajima <[email protected]>
* (C) 2004 Alexander Clouter <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This governor is an adapatation of the conservative governor.
* See the Documentation/cpu-freq/governors.txt for more information.
*
* Adapatation from conservative by Erasmux.
*/
This governor was a very pleasant surprise. Although an adaptation of Conservative governor it has probably the best performance of them all. Might fall shorter on battery than Smartass v2 but I owe it my best experiences in terms of snappiness so far, reason why I selected it as default governor for Nova. My personal favorite until I can draw a conclusion from using Smartass v2.
Scary:
Code:
/*
Scary governor based off of conservatives source with some
of smartasses features
For devs - If you're going to port this driver to other devices,
make sure to edit the default sleep frequencies & prev frequencies
or else you might be going outside your devices hardware limits.
*/
This is just a weird governor. It's based on Conservative which has a slower ramping than Ondemand but then again it has Smartass elements which is a governor with one the fastest rampings. I've heard some people like it but alas I never tried it myself.
Click to expand...
Click to collapse
droidphile said:
. . .
lazy:
Basically and ondemand with an additional parameter min_time_state which specifies the minimum time cpu stays on a frequency before scaling up/down. Idea here is to eliminate instabilities caused by fast frequency switching of ondemand. lazy governor polls more often than ondemand, but changes frequency only after completing min_time_state on a step. Lazy also has a screenoff_maxfreq parameter which can be configured to specifiy max frequency while screen is off.
lulzactive:
Based on interactive & smartass governors, this governor tends to be the new favorite for many of us. When workload is greater than or equal to 60%, the governor scales up cpu to next higher step. When workload is less than 60%, governor scales down cpu to next lower step. On screen off, frequency is locked to global scaling minimum frequency.
lagfree:
Similar to ondemand. Difference is optimization to become more battery friendly. Frequency is gracefully decreased and increased, unlike ondemand which jumps to 100% too often. Lagfree doesn't skip frequencies while scaling up or down.
smartassV2:
Modified smartass and one of the favorite governor for many a people. This governor scales down cpu very fast while screen is off and scales up to 500 mhz quickly when screen is on. There's no upper limit for frequency while screen is off. The governor aim for an "ideal frequency", and ramp up more aggressively towards this freq and less aggressive after. It uses different ideal frequencies for screen on and screen off, namely awake_ideal_freq and sleep_ideal_freq. Thus ensuring a balance between performance and battery.
ondemandx:
Basically an ondemand with suspend/wake profile. This governor is a battery friendly ondemand. When screen is off, max frequency is 500 mhz.
. . .
Click to expand...
Click to collapse
droidphile said:
. . .
intellidemand:
Intellidemand aka Intelligent Ondemand from Faux is yet another governor that's based on ondemand. Unlike what some users believe, this governor is not the replacement for OC Daemon (Having different governors for sleep and awake). The original intellidemand behaves differently according to GPU usage. When GPU is really busy (gaming, maps, benchmarking, etc) intellidemand behaves like ondemand. When GPU is 'idling' (rather moderately busy), intellidemand limits max frequency to a step depending on frequencies available in your device/kernel for saving battery. This is called browsing mode. We can see some 'traces' of interactive governor here. Frequency scale-up decision is made based on idling time of cpu. Lower idling time (<20%) causes cpu to scale-up from current frequency. Frequency scale-down happens at steps=5% of current frequency. (This parameter is tunable only in conservative, among the popular governors )
To sum up, this is an intelligent ondemand that enters browsing mode to limit max frequency when GPU is idling, and (exits browsing mode) behaves like ondemand when GPU is not busy; to deliver performance for gaming and such. Intellidemand does not jump to highest frequency when screen is off.
lionheart:
Lionheart is a tweaked conservative governor from Knzo. You can simply modify conservative to experience lionheart. Set low up-threshold (60 or something) and lowest possible sampling rate on conservative. Lionheart's motto is extreme responsiveness and performance, at the cost of battery. When it comes to smoothness (not considering battery drain), a tuned conservative delivers more as compared to a tuned ondemand. This could be the reason for lionheart's 'birth'.
. . .
Click to expand...
Click to collapse
HipKat said:
Hotplug Governor:
The “hotplug” governor scales CPU frequency based on load, similar to “ondemand”. It scales up to the highest frequency when “up_threshold” is crossed and scales down one frequency at a time when “down_threshold” is crossed. Unlike those governors, target frequencies are determined by directly accessing the CPUfreq frequency table, instead of taking some percentage of maximum available frequency.
Click to expand...
Click to collapse
Information on the Pegasusq governor
robertobsc said:
LulzactiveQ
I was decided to optimize Lulzactive governor by including the dec_cpu_load parameter.
----
I was going to put it because if the inc_cpu_load is setted at a high value (example: 90%) and the pump_down_steps is also setted high (2 or 3 steps down if load < inc_cpu_load) it would happen a problem:
Suppose the current load is between 80 and 89% all the sampling rate and the pum_down_steps is 2 or 3. Do you think is a good idea to go down 2/3 steps in the load at that high?
This is not a theorical issue, i really felt lag when playing some simple games and my conclusion was that situation was happening in that moment.
Thats why i created dec_cpu_load, in this way we can tell the governor exactly when go down pump_down_steps.
----
I also fixed a little bug as well that the up_sample_time and down_sample_time wasnt been respected (the governor was scaling up and down as soon as the load criteria was matched).
-----
And i added as gokhan requested, the hotplug parameters from pegasusq. So now we have two governors with hotplug queue logic.
To the hotplug part i had to create another sample rate. The name is hotplug_sample_rate. I created that to make the hotplug part completely independent from scale up / down frequencies part. In fact, they are running in different threads.
-----
That's it. I also putted some logs that can be enabled / disabled by the dvfs_debug parameter.
If do you think something was wrong, or a problem apperead please enable this parameter for a while and execute this command in terminal emulator or adb:
dmesg > /sdcard/lulzactiveq.log.txt
----------------------
This is only a battery profile suggestion for the 16 steps. Please explore it!!!!!!
-- Parâmetros Lulzactive
echo "90" > /sys/devices/system/cpu/cpufreq/lulzactiveq/inc_cpu_load
echo "40" > /sys/devices/system/cpu/cpufreq/lulzactiveq/dec_cpu_load
echo "1" > /sys/devices/system/cpu/cpufreq/lulzactiveq/pump_up_step
echo "2" > /sys/devices/system/cpu/cpufreq/lulzactiveq/pump_down_step
echo "50000" > /sys/devices/system/cpu/cpufreq/lulzactiveq/up_sample_time
echo "25000" > /sys/devices/system/cpu/cpufreq/lulzactiveq/down_sample_time
echo "14" > /sys/devices/system/cpu/cpufreq/lulzactiveq/screen_off_min_step
-- Lulzactive - Hotplug Queue parameters
echo "50000" > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_sample_rate
echo "13" > /sys/devices/system/cpu/cpufreq/lulzactiveq/cpu_up_rate
echo "13" > /sys/devices/system/cpu/cpufreq/lulzactiveq/cpu_down_rate
echo "600000" > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_freq_1_1
echo "400000" > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_freq_2_0
echo "350" > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_rq_1_1
echo "300" > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_rq_2_0
echo "0" > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_lock
-- debug on/off
echo "0" > /sys/devices/system/cpu/cpufreq/lulzactiveq/debug_mode
Click to expand...
Click to collapse
I/O Schedulers
Every I/O scheduler except Anticipatory has explanations from two perspectives. At the end of the post is a discussion of benchmarking and a brief comparison.
knzo said:
. . .
So, what's a I/O Scheduler?
Code:
Input/output (I/O) scheduling is a term used to describe the method computer
operating systems decide the order that block I/O operations will be submitted
to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'.
I/O schedulers can have many purposes depending on the goal of the I/O
scheduler, some common goals are:
- To minimize time wasted by hard disk seeks.
- To prioritize a certain processes' I/O requests.
- To give a share of the disk bandwidth to each running process.
- To guarantee that certain requests will be issued before a particular deadline.
There is not so much offer when it comes to I/O Schedulers and the improvements aren't nearly as visible as choosing a gung ho governor but trust me they are there. Just to name one improvement you could see is for example the opening and closing of applications.
Listing of knzo-known I/O Schedulers:
Noop *
Anticipatory *@+
CFQ *&
Deadline *@+
VR +
Simple +&
BFQ #
Legend: & - default | @ - disabled by default | * - exists in stock kernel | + - added in Quasar kernel | # - not included in Quasar kernel
And now a summary for each and brief comment by myself:
Noop:
Code:
The NOOP scheduler inserts all incoming I/O requests into a simple, unordered
FIFO queue and implements request merging.
The scheduler assumes I/O performance optimization will be handled at some
other layer of the I/O hierarchy; e.g., at the block device; by an intelligent HBA
such as a Serial Attached SCSI (SAS) RAID controller or by an externally
attached controller such as a storage subsystem accessed through a switched
Storage Area Network).
NOOP scheduler is best used with solid state devices such as flash memory
or in general with devices that do not depend on mechanical movement to
access data (meaning typical "hard disk" drive technology consisting of seek
time primarily, plus rotational latency). Such non-mechanical devices do not
require re-ordering of multiple I/O requests, a technique that groups together
I/O requests that are physically close together on the disk, thereby reducing
average seek time and the variability of I/O service time.
Noop isn't actually that bad. It's a simple I/O Scheduler and when it comes to Android, the simplest the better.
I think in G1 one known "tweak" was to set Noop as default I/O Scheduler.
pikachu01 said:
NOOP is a simple I/O scheduler without overhead that tries to do each I/O transaction as it comes (FIFO). When a group of transactions is detected, it will try to merge it together to make batches of transactions (makes the whole transaction faster). NOOP doesn't have starvation detection, hence if an I/O transaction takes a painfully long amount of time, it will still continue to do it rather than switch the CPU into doing something else e.g. GUI interrupts (i.e. scrolling lists, flicking screens). All other schedulers also have the "merge" feature. NOOP is the only one that makes the "merge" feature its only feature.
Click to expand...
Click to collapse
Anticipatory:
Code:
Anticipatory scheduling is an algorithm for scheduling hard disk input/output.
It seeks to increase the efficiency of disk utilization by "anticipating"
synchronous read operations.
"Deceptive idleness" is a situation where a process appears to be finished
reading from the disk when it is actually processing data in preparation of
the next read operation. This will cause a normal work-conserving I/O
scheduler to switch to servicing I/O from an unrelated process. This situation
is detrimental to the throughput of synchronous reads, as it degenerates into
a seeking workload. Anticipatory scheduling overcomes deceptive idleness
by pausing for a short time (a few milliseconds) after a read operation in
anticipation of another close-by read requests.
I have no idea if this fares well in Android devices. It's disabled in stock kernel and also in Quasar kernel since I've never heard of anyone using it or even recommending it. I read it's more in servers and what nots.
CFQ:
Code:
CFQ, also known as "Completely Fair Queuing", is an I/O scheduler for the
Linux kernel which was written in 2003 by Jens Axboe.
CFQ works by placing synchronous requests submitted by processes into
a number of per-process queues and then allocating timeslices for each of the
queues to access the disk. The length of the time slice and the number of
requests a queue is allowed to submit depends on the IO priority of the given
process. Asynchronous requests for all processes are batched together in fewer
queues, one per priority. While CFQ does not do explicit anticipatory IO
scheduling, it achieves the same effect of having good aggregate throughput for
the system as a whole, by allowing a process queue to idle at the end of
synchronous IO thereby "anticipating" further close IO from that process. It can
be considered a natural extension of granting IO time slices to a process.
Well, like Ondemand is to governors, CFQ is to I/O Schedulers. It's the most balanced one, aiming to perform well in most scenarios. However, in Android since things work differently, it's not the most suitable I/O Schedulers. There are many tweaks spreaded throughout XDA for improving this baby.
pikachu01 said:
CFQ is a complex I/O scheduler that tries to determine the address space of the transaction and applies a cost algorithm in that if the address is close together, it will group them up and perform them. It also tries to make the transaction incremental (i.e. reading/writing through address incrementally so that the disk spindle needs to wind down the least in conventional platter hard disks) The problem is, our flash devices have very little delta between reading a far reaching address space (than the one currently being written/read) or a closer one as it doesn't rely on spindle/rotations. Hence, having this costing algorithm adds overhead and slows down the overall transaction. CFQ has a lot of algorithms to make sure each process gets a fair slice of time on I/O transcations. Too much overhead.
Click to expand...
Click to collapse
Deadline:
Code:
The goal of the Deadline scheduler is to attempt to guarantee a start service
time for a request. It does that by imposing a deadline on all I/O operations
to prevent starvation of requests. It also maintains two deadline queues, in
addition to the sorted queues (both read and write). Deadline queues are basically
sorted by their deadline (the expiration time), while the sorted queues are sorted
by the sector number.
Before serving the next request, the Deadline scheduler decides which queue to
use. Read queues are given a higher priority, because processes usually block
on read operations. Next, the Deadline scheduler checks if the first request in the
deadline queue has expired. Otherwise, the scheduler serves a batch of requests
from the sorted queue. In both cases, the scheduler also serves a batch of requests
following the chosen request in the sorted queue.
Deadline is actually quite popular along with BFQ. It is used in some known kernels for example Netarchy's for Nexus S. However, even though it's better than CFQ for Android devices it still falls short in comparison with VR.
pikachu01 said:
Deadline has a starvation detector and is simple enough that it doesn't have all the overhead of doing rotational/costing disks algorithm. However, reads are done 2x more likely than writes as it has a algorithm based on weights in that reads must be done first if both a read and a write is detected. It has a 2:1 ratio of read to write weights coded into the scheduler (that can be tweaked - writes_starved, will include it in the next version of system_tweak). Hence it's not a fair scheduler.
Click to expand...
Click to collapse
VR:
Code:
/*
* V(R) I/O Scheduler
*
* Copyright (C) 2007 Aaron Carroll <[email protected]>
*
*
* The algorithm:
*
* The next request is decided based on its distance from the last
* request, with a multiplicative penalty of `rev_penalty' applied
* for reversing the head direction. A rev_penalty of 1 means SSTF
* behaviour. As this variable is increased, the algorithm approaches
* pure SCAN. Setting rev_penalty to 0 forces SCAN.
*
* Async and synch requests are not treated seperately. Instead we
* rely on deadlines to ensure fairness.
*
*/
VR is a very good I/O Scheduler with Deadline elements. Probably the best for MTD Android devices and it's used also in known kernels such as IntersectRaven's for Nexus One. It's probably the one who can score the most in benchmarks but it's also one of the most... unstable. Its performance fluctuates, it can peak above average or it can go below it. But when it peaks... it's the best.
pikachu01 said:
V(R) tries to make sure that each transaction has a weight associated with it, being R. And if the seek is reversed, the R will be multiplied by a penalty making it less likely to be processed. Not for flash drives as reverse seek in a flash drive is just as fast as a forward seek.
Click to expand...
Click to collapse
Simple:
Code:
/*
* Simple IO scheduler
* Based on Noop, Deadline and V(R) IO schedulers.
*
* Copyright (C) 2010 Miguel Boton <[email protected]>
*
*
* This algorithm does not do any kind of sorting, as it is aimed for
* aleatory access devices, but it does some basic merging. We try to
* keep minimum overhead to achieve low latency.
*
* Asynchronous and synchronous requests are not treated separately, but
* we relay on deadlines to ensure fairness.
*
*/
Like the name suggests, Simple I/O is a simple one. Remember me saying that I/O Schedulers for Android devices, the simpler the better? This is such a case. Especially for EMMC devices. It's reliable and while not as good as VR when it peaks, it's still one of the best performance-wise. It's at the moment the default one in Quasar kernel.
pikachu01 said:
SIO is Simple I/O that tries to implement a NOOP type scheduler that has starvation detection. Hence, long I/O transactions will be preempted and given CPU time only after other faster transactions are completed, guaranteeing smoothness. Also, it doesn't have overhead of calculating costs. Also, it has a fair number of writes to read, guaranteeing that all transactions are equal.
Click to expand...
Click to collapse
BFQ:
Code:
/*
* BFQ, or Budget Fair Queueing, disk scheduler.
*
* Based on ideas and code from CFQ:
* Copyright (C) 2003 Jens Axboe <[email protected]>
*
* Copyright (C) 2008 Fabio Checconi <[email protected]>
* Paolo Valente <[email protected]>
*
* Licensed under the GPL-2 as detailed in the accompanying COPYING.BFQ file.
*
* BFQ is a proportional share disk scheduling algorithm based on the
* slice-by-slice service scheme of CFQ. But BFQ assigns budgets,
* measured in number of sectors, to tasks instead of time slices.
* The disk is not granted to the active task for a given time slice,
* but until it has exahusted its assigned budget. This change from
* the time to the service domain allows BFQ to distribute the disk
* bandwidth among tasks as desired, without any distortion due to
* ZBR, workload fluctuations or other factors. BFQ uses an ad hoc
* internal scheduler, called B-WF2Q+, to schedule tasks according to
* their budgets. Thanks to this accurate scheduler, BFQ can afford
* to assign high budgets to disk-bound non-seeky tasks (to boost the
* throughput), and yet guarantee low latencies to interactive and
* soft real-time applications.
*
*/
Here it is, the wrongly assumed best I/O Scheduler which happens to be the most popular one. It's based in CFQ but it has an inferior performance than VR or Simple, even if it's BFQv2 (although it seems to perform well in USB transfers rate).
pikachu01 said:
BFQ has a lot of algorithms to make sure each process gets a fair slice of bandwidth (Budget Fair Queueing). Too much overhead.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
pikachu01 said:
Here's my assessment of all the schedulers that I know:
SIO> NOOP> Deadline > VR > BFQ > CFQ
. . .
In benchmarking tests, the tests normally consists of testing the time it takes for a contiguous I/O transfer from 1 point to another. NOOP excels at that because it won't let itself get interrupted to perform another I/O task. This would mean that in real life testing, NOOP will let a long arduous task to finish while at the expense of UI functionality (you will get UI lags)
SIO on the other hand will perform badly at benchmarking as it gets pre-empted when the contiguous tasks takes more than 0.5secs (for synchronous tasks as benchmarking tools perform a synchronous I/O task from one point to another) to another more important task like UI interrupt (when you're scrolling) or Kernel interrupt (when your kernel needs to perform garbage collecting or swap memory etc)
The 0.5 secs can be tuned in the SIO tuneables though, but I would think 0.5 secs for synchronous tasks and 5 secs for async tasks is pretty good to maintain a balance between long/short tasks enabling a smoother experience in Android.
Click to expand...
Click to collapse
bbedward said:
Q: What is the zen I/O scheduler?
A: Well, the question that was asked above led me to an analysis of V(R ), deadline, and some others. I already knew, but realized "this is the main feature of V(R), but wait it has no benefit to us smartphone users." So I thought about adjusting the way V(R ) handled requests and how it dispatched them (I chose V(R ) because i'd rather not tinker with a scheduler thats official and widely supported). Then I was looking over it, and realized I might as well just write a new one I don't need any of this stuff. So I came up with something awfully similar to SIO, although its a bit simpler than SIO (closer to no-op) and works just slightly different.
- It's an FCFS (First come, first serve) based algorithm. It's not strictly FIFO. It does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ones. Other than that, pretty much the same as no-op.
Click to expand...
Click to collapse
A little more info in the old toolbox
Excellent pooling of information. Well done; I have (or now had) several bookmarks to cover this information--and even those were somewhat spotty.
I would also suggest you take it a step further and list out some other apps that control these settings (FauxClock, System Tuner Pro, etc.) that manipulate this information and maybe list some setting to try out for i/o scheduling (cache size, etc.).
Anyway, great post.
I linked this over at the T-mobile Galaxay S II thread. . .
Great post. With my less significant amount of experience, I can agree on all opinions too.
Nice reference work, Simba. Thanks.
I cannot believe something like this went so unnoticed. Consider this added to the FAQ for future reference. Thanks for the great guide.
For those looking for more information about these and other kernel-based tweaks, there's droidphile's own posts (1 and 2) from the I9100 forums. I'm sure most of what's in the first one I linked is covered here though it also covers a bit more on other tweaks. Second post is for ICS kernels.
Divine_Madcat said:
I cannot believe something like this went so unnoticed. Consider this added to the FAQ for future reference. Thanks for the great guide.
Click to expand...
Click to collapse
+1 Holy cow!! How the hell did I miss this??
Thanks, Simba!
Edit: This should be STICKIED!!
Great information, thanks.
Sent from my SGH-I777 using xda premium
Can this be a sticky please
dirtbikerr450 said:
Can this be a sticky please
Click to expand...
Click to collapse
+1
Sent from my SGH-I777 using xda premium
Things don't get stickied in these forums now so there isn't a buildup of sticky threads like there used to be. Instead, one sticky which links to all the important guides and posts exists at the top. It makes the forums cleaner.
Sent from my SGH-I777 using XDA
karate104 said:
Things don't get stickied in these forums now so there isn't a buildup of sticky threads like there used to be. Instead, one sticky which links to all the important guides and posts exists at the top. It makes the forums cleaner.
Sent from my SGH-I777 using XDA
Click to expand...
Click to collapse
Only problem is that this thread is NOT linked in the existing sticky
eep2378 said:
Only problem is that this thread is NOT linked in the existing sticky
Click to expand...
Click to collapse
Agreed. And it should be.
karate104 said:
Agreed. And it should be.
Click to expand...
Click to collapse
PM sent to mod
eep2378 said:
PM sent to mod
Click to expand...
Click to collapse
Devine already did it like 7 posts up. Read! Lol
We will sort you out!
UltraBeast said:
Devine already did it like 7 posts up. Read! Lol
We will sort you out!
Click to expand...
Click to collapse
Woops! My bad. Its still kinda buried oh well
Red, disregard pm
eep2378 said:
Woops! My bad. Its still kinda buried oh well
Red, disregard pm
Click to expand...
Click to collapse
Its ok, I'm used to being overlooked.
As it is, it is linked in the FAQ - it is not on the "main" page, because it is a QA post, rather than guide, etc. This is excellent info though, which is why it is on the FAQ.
Divine_Madcat said:
Its ok, I'm used to being overlooked.
As it is, it is linked in the FAQ - it is not on the "main" page, because it is a QA post, rather than guide, etc. This is excellent info though, which is why it is on the FAQ.
Click to expand...
Click to collapse
I feel so bad sometimes because you are! I know you're around and active, but everyone just refers to Red when it comes to moderating XD
Related
Bricked Kernel from the sensation forums, and it screams performance! I asked the dev show-p1984 if he thought about porting it our way, but said since he doesn't have a 3d it's probably not gonna happen... Maybe one of our awesome kernel devs could work with him to get it over here. Wishful thinking I guess! Anyways what do you all think of this kernel? Maybe if we can get enough interest in it, we may see it in our future!
Here's the thread: http://forum.xda-developers.com/showthread.php?t=1256668
If this is not gravy to post my bad and mods can delete!
show-p1984 said:
Bricked-Kernel v1.0
THE FIRST 2.3.4 BASED KERNEL
WITH FIXED 3D GAMING!
WORKS ON SENSE 3.5 LEAK (2.3.5 RUU)
ENJOY!
Default clocks: 1536Mhz max / 192Mhz min
OverClockable till 1890Mhz !NOT ALL DEVICES CAN HANDLE THIS!
GPU Overclock @ 300Mhz (maximum on most devices)
L2 Performance Boost only @ 1536Mhz (original by faux123)
(for stability reasons)
10000+ Downloads! I must be doing something right!
(not counted those who downloaded it with InsertCoin )
Features:
Code:
[B][U][SIZE="5"][COLOR="Red"] * FIXED 3D GAMING! YES, IT WORKS![/COLOR][/SIZE][/U][/B]
[U]*CM7 compatible version: [URL="http://forum.xda-developers.com/showthread.php?p=17697845#post17697845"]Click me[/URL][/U]
* 2.6.35.14
* based on HTCs-2.3.4-Sources
* Too many ARM optimizations to count ;)
* Built with highest Optimization Level (O3)
* Strongly improved UI-performance (Quote: "Smoother than butter")
* KGSL Early Suspend drivers (should save battery)
* KGSL Turbo Mode
* Increased 3D-Performance
* Reduced power usage, 5 stages GPU scaling!
* CIFS
* UTF8 encoding (included for CIFS)
* wifi pm=fast
* Tweaked ondemand governor (reacts a lot faster)
* Undervoltage
* Overclocking to 1536Mhz default (max. 1890Mhz)
* Min Clock @ 192Mhz default
* Synchronous Multicore Threading
* Boot time optimization. CPU will have max clocks during boot to ensure a fast bootup
* Blazing fast with InsertCoin
* added smartassv2 as optional governor
* tweaked smartassv2 to fit pyramid OC clocks
* 2D-Performance Boost
* Flashlight and Camera-Flash will now be useable until battery reaches 15%
* Tree-based preemptible RCU
* Fast scheduler for CPU hotplug
* improved 3D performance
* optimized preemptive settings
* basic NTFS support
* Userspace driven configuration filesystem
* Allow CPU-supported unaligned accesses (faster than doing it by software)
* sysfs interface for mfreq
* Scaling_Available_Frequencies in cpufreq sysfs interface
* Global CPU Voltage table used for adjusting voltage table for SnapDragon Dual Core. Inspired by Snq- modified by faux123 for SnapDragon fixed by show-p1984
* Up2date Wifi driver
* Improved Mobile Connection (fixed possible freezes introduced by HTC)
* Updated USB driver
* Let MMFPB drop to 27MHz when processor power-collapsed (by Matt Wagantall)
* hotplug notifications for CPU, L2, bus, voltage (by Matt Wagantall)
* ~8% Undervolted till 1536Mhz
* Increased Voltage for higher clocks to run stable @ 1536Mhz++
* L2 Performance Push @ 1536Mhz (Original by faux123)
* Adreno220 OC mode @ 300Mhz when max scaled (Scaling is still automatic)
* Overclock till 1890Mhz possible. ALL FREQUENCIES ABOVE 1782Mhz ARE CONSIDERED UNSTABLE!
--(I don't want to increase Voltage any further, this will increase the risk of burning your cpu. So if it is unstable, choose a lower clock!)
* Let cpu1 jump in faster. (shouldn't affect battery but decreases lag some users were experiencing)
* Tweaked ondemand to raise frequencies with higher load only (should contribute to battery life)
* removed redundant code, has led to slower performance
* Create private workqueue for cpu frequency changes, speeds up things
* Increased writing performance (lowers that annoying lag when updating 2 apps at the same time)
* added 1080p playback optimization
* Increased GPU memory
* increased overall L2 frequencies, were bottlenecking
* included call rec support, yeah that's right, you can record calls now!
* Improved WIFI - WLAN detection
* CPU temperature @ /sys/class/thermal/thermal_zone1/temp
* [url]http://stackoverflow.com/questions/4212206/about-sched-automated-per-tty-task-groups[/url]
* Lowered wifi-voltage (cayniarb)
* Updated firmware memory size (Leedroid)
* added lib: Improved the performance of memcpy and memmove of the general version (Arne Coucheron)
* USB: read/write performance & detection enhancement (Chiranjeevi, Velempati)
* cleaned code, improved performance
* Dropped debug code, was slowing things down
Changelog @ 2nd Posthttp://forum.xda-developers.com/showpost.php?p=17430308&postcount=2
How to install?
Just flash from recovery. Though it creates a boot.img out of the one on your phone while flashing, it should work with the majority of ROMs out there.
Where to complain about errors/bugs?
Please use the Issuetracker for bugs/errors/feature wishes!
Issuetracker @ https://code.google.com/p/bricked/issues/entry
[email protected]
IRC Chat: Freenode IRC #bricked
Download:
No Guarantees! If it kills your grandmother or your device, I am NOT responsible! If you understand this:
(If you download, please hit Thanks below my post! Thank you!)
*v1.0* [ondemand, smartassv2 optional, PREEMPTIBLE, recommended] Click me
EXPECT BUGS DUE TO MASSIVE CHANGES TO THE POWER MANAGEMENT!
The Camera on 2.3.5 + Sense 3.5 is currently not working, this seems to be due to missing drivers from HTC (msm cam ZLS)... Again. I am trying to bypass this.
*v.91* [ondemand, smartassv2 optional, PREEMPTIBLE, Fallback, 100% stable, not for Sense 3.5] Click me
Not all devices may run with GPU @ 320Mhz! Enthusiast version!
*v1.0* maxGPUOC [ondemand, smartassv2 optional, PREEMPTIBLE, [email protected]] Click me
*CM7 v0.1 ALPHA* [ondemand, PREEMPTIBLE] Click me calling fixed!
XDA Discussion for CM7: Click me
Current Downloads: Click Me
All Downloads: Click Me
Use System Tuner or SetCPU to overclock!
3D-Issue News:
#Fixed. By me. No-one else. Eat that.
------
Only @ gcode.
Code:
[CENTER][SIZE="6"][B][U]Donor List:[/U][/B][/SIZE]
[B][SIZE="4"][FONT="Verdana"][COLOR="Red"][U]stevejau[/U][/COLOR][/FONT][/SIZE][/B] tinky1 [B][FONT="Verdana"]ziggimon.x2 Sobat.x2[/FONT][/B] moskito-hd2 [B][FONT="Verdana"]VisedMonk.x2[/FONT][/B] smint86
[B][FONT="Verdana"][U]deagleone.x2[/U][/FONT][/B] [B][FONT="Verdana"]alhuang69.x2[/FONT][/B] thebarsteward madmarinero [U][B]Twister988[/B][/U] mwie [U][B]baadnewz[/B][/U]
auras76 vlad48 [B][COLOR="Red"][SIZE="4"][U][FONT="Verdana"]dingolino[/FONT][/U][/SIZE][/COLOR][/B] ChimeyJimmey artymarty rawrfische neuralboy
-Punisher- [U][B]Sym_Link[/B][/U] omerkisoss mweulink nbicho tinker2000 viking37
[/CENTER]
Thank you very much!
Gcode: https://code.google.com/p/bricked
Click to expand...
Click to collapse
Sent from my PG86100 using XDA App
show-p1984 said:
Changelog:
Code:
[B][U][SIZE="4"]***** v1.0 *****[/SIZE][/U][/B]
* Works with 2.3.5 (Sense 3.5 leak)
* KGSL Early Suspend drivers (saves battery & reduces heat)
* KGSL Turbo Mode
* KGSL: Turn the clocks on before the power.
* drivers: misc: pass miscdevice pointer via file private data (by Samu Onkalo
<[email protected]>)
* Fixed possible null pointer refference
* prepared for badass governor (he hasn't made it in this release :()
* Tweaked ondemand to reduce battery usage
* Tweaks for the new libs
[B][U][SIZE="4"]***** v0.91 *****[/SIZE][/U][/B]
* Changed ondemand to default again. Smartassv2 as default was not intended!
[B][U][SIZE="4"]***** v0.9 *****[/SIZE][/U][/B]
* CPU temperature @ /sys/class/thermal/thermal_zone1/temp
* http://stackoverflow.com/questions/4212206/about-sched-automated-per-tty-task-groups
* Lowered wifi-voltage (cayniarb)
* Fix scaling_cur_freq (mdeejay)
* Update firmware memory size (Leedroid)
* added cpufreq: address issue with second core forgetting min/max clock freq (Leedroid) & fixed
* added lib: Improve the performance of memcpy and memmove of the general version (Arne Coucheron)
* Lowered battery usage a bit. (Does not affect performance)
* USB: read/write performance & detection enhancement (Chiranjeevi, Velempati)
[B][U][SIZE="4"]***** v0.86 *****[/SIZE][/U][/B]
*******************************
**RC1 Release of v0.9 - If a newer version comes out, I recommend to upgrade immediately!
**This will wipe your /cache! You do not need to do it yourself!
*******************************
Changes from v0.8: (mostly improving my 3D Games Fix)
* this should finally fix these annoying sleep reboots some ppl were experiencing
* improved overall performance
* Highly optimized kernel build (O3), this should bring an additional performance boost
* cleaned code
* Combines the speed and stability of 0.7 with the 3D performance and 3D-fix from 0.8
* Fixed performance drops
* Fixed deep-sleep reboot
* Fixed 2 additional GPU scaling bugs that would have prevented the system from falling into deep-sleep mode
* Reenabled dynamic powercontrol (my fault -.-)
* Tweaked performance on one or two edges ;)
* improved stability (show, you should check pointer...)
* Fixed ioctl errors
* Fixed widget bugs (I couldn't reproduce them anymore)
* Fixed a GPU scaling bug, phone should stay cooler now
--caused the GPU to get stuck at maximum frequency
[B][U][SIZE="4"]***** v0.8 *****[/SIZE][/U][/B]
**********************************************************
***[B][U][COLOR="Red"]FIXED 3D BUG! FIRST 2.3.4 BASED KERNEL WITH FIXED 3D![/COLOR][/U][/B]***
**********************************************************
* rewrote GPU scaling
* overclock of Adreno220 reduced to 300Mhz
(was causing problems on some phones)
[B][U][SIZE="4"]***** v0.7 *****[/SIZE][/U][/B]
* Included a thermald.conf file in install.zip (fixes reboots)
* cleanups
* modified GPU scaling
* modified GPU pwr_levels
* increased Adreno220 OC mode to 320Mhz when max scaled (again, now it is working)
[B][U][SIZE="4"]***** v0.6 - HOTFIX1 *****[/SIZE][/U][/B]
* lowered Adreno220 OC mode to 300Mhz when max scaled (Scaling is still automatic)
[B][U][SIZE="4"]***** v0.6 *****[/SIZE][/U][/B]
* Adreno220 OC mode @ 320Mhz when max scaled (Scaling is still automatic)
* Overclock till 1890Mhz possible now. ALL FREQUENCIES ABOVE 1782Mhz ARE CONSIDERED UNSTABLE! (I don't want to increase Voltage any further, this will increase the risk of burning your cpu. So if it is unstable, choose a lower clock!)
* Tweaked ondemand yet again to let cpu1 jump in faster. (shouldn't affect battery but decreases lags some users were experiencing)
* Tweaked ondemand to raise frequencies with higher load only (should contribute to battery life)
* removed redundant code, has led to slower performance
* Create private workqueue for cpu frequency changes, should speed up things
* Increased writing performance (should lower that annoying lag when updating 2 apps at the same time)
* Changed Smartassv2 to compile as module. Makes it easier to offer different versions.
* added 1080p playback optimization
* Increased GPU memory
* increased overall L2 frequencies, were bottlenecking
* included call rec support, yeah that's right, you can record calls now!
* Improved WIFI - WLAN detection
* Allow CPU-supported unaligned accesses (faster than doing it by software)
* Add sysfs interface for mfreq
* Added Scaling_Available_Frequencies to cpufreq sysfs interface
* Added Global CPU Voltage table used for adjusting voltage table for SnapDragon Dual Core. Inspired by Snq- modified by faux123 for SnapDragon fixed by show-p1984
[B][U][SIZE="4"]***** v0.5 *****[/SIZE][/U][/B]
* [B]Updated Kernel base to 2.6.35.14[/B]
--( 247 changed files with 1,846 additions and 754 deletions )
* Tweaked preemptive settings
* Added NTFS support
* Added Userspace driven configuration filesystem
* Updated Wifi driver
* Improved Mobile Connection (fixed possible freezes)
* Updated USB driver
* Let MMFPB drop to 27MHz when processor power-collapsed (by Matt Wagantall)
* Use hotplug notifications for CPU, L2, bus, voltage (by Matt Wagantall)
* [B]8% Undervolted till 1536Mhz (again)[/B]
* [B]Increased Voltage for higher clocks to run stable @ 1536Mhz++[/B]
* [B] Added OC till 1782Mhz.[/B]
* [B]Added L2 Performance Push @ 1536Mhz (Original by faux123)[/B]
* Cleaned ACPU Table frequencies
[B][U][SIZE="4"]***** v0.4 *****[/SIZE][/U][/B]
* Tweaked ondemand to preserve battery
* Tweaked ondemand to react faster
* 2D-Performance Boost
* Flashlight and Camera-Flash should now be useable until battery reaches 15%
* Tree-based preemtible RCU
* Fast scheduler for CPU hotplug
* +84 Insertions regarding 3D performance
[B][U][SIZE="4"]***** v0.3 *****[/SIZE][/U][/B]
* more optimizations
* added smartassv2 as optional governor
* tweaked smartassv2 to fit pyramid OC clocks
* further ondemand governor tweaks (should be as fast as before with a little less power consumption)
* changed max clock to 1536Mhz (1538 was a typo -_-)
* cleaned ACPU table frequencies
* fixed an issue where CPU1 would fall back to userspace governor
[B][U][SIZE="4"]***** v0.2 *****[/SIZE][/U][/B]
* 2.6.35.13
* based on HTCs-2.3.4-Sources
* Too many ARM optimizations to count ;)
* CIFS
* UTF8 encoding (included for CIFS)
* wifi pm=fast
* Tweaked ondemand governor (should react a lot faster, but can't predict battery usage yet)
* Undervoltage
* Overclocking to 1538Mhz default (this makes more sense than 1512)
* Min Clock @ 192Mhz default
* Synchronous Multicore Threading
* Boot time optimization. CPU will have max clocks during boot to ensure a fast bootup
* Blazing fast with IC2.4.2/3
* Should work with every ROM since the boot.img is generated while flashing.
What does PREEMPTIBLE mean:
Preemptive built kernels are favoring the userinterface over everything else! That means: An app in the background is using 50% of you CPU to spy on you. You want to move fast through the user interface/watch a video, whatever. The kernel will now favor your action over the app in the background. That's all the magic that's happening
-------------
-----------------------------
-------------
Benchmarks:
Click Me for Benchmark
How to Overclock CPU1 (this is not supported by all OC apps):
Overclocking the second CPU is currently not supported by many apps. (They can't overclock what they can't see, aSMP)
To enforce this with Bricked:
Code:
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1782000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
CPU1 will shutdown after it is sure that it is not needed anymore. But you can also do:
Code:
echo 0 > /sys/devices/system/cpu/cpu1/online
Right after the both commands above. Then CPU1 will fall asleep.
Battery theme as seen in the screenshots, and some other stuff:
http://forum.xda-developers.com/showpost.php?p=17336120&postcount=5186
(still works with InsertCoin 2.4.3)
Click to expand...
Click to collapse
Sent from my PG86100 using XDA App
Sent from my PG86100 using XDA App
"Expect bugs due to massive changes in power management"?
No thanks, I'll pass.
The name doesn't inspire a lot of confidence either!
Sent from my PG86100 using XDA Premium App
we need BFS
Looks nice... Don't like name but interested either way... 320mhz gpu...(what is stock MHz)
Sent from my PG86100 using xda premium
There is a lot going on there, I'll read the original thread to see how they like it.
Tilde88 said:
we need BFS
Click to expand...
Click to collapse
Why? CFS runs better on the phone.
Tilde88 said:
we need BFS
Click to expand...
Click to collapse
No we don't.
Our gpu can be over clicked?! We need this! Haha
Sent from my HTC Evo 3D.
did it's work for evo 3d gsm
Tilde88 said:
we need BFS
Click to expand...
Click to collapse
CFS is so much more stable than BFS. We definitely do not need BFS.
OK, after looking over the last couple pages of the original thread.... I want this kernel.
Most these tweaks should be completely possible as both phones use the same CPU.
felacio said:
OK, after looking over the last couple pages of the original thread.... I want this kernel.
Most these tweaks should be completely possible as both phones use the same CPU.
Click to expand...
Click to collapse
Exactly! I would love to see our gpu overclocked
Sent from my PG86100 using XDA App
I ask CdTDroiD in the Pyramid3D thread (General Sec.), will the Bricked kernel be included in the rom, due to the fact it being the default kernel for that rom on the sensation. I guess the developer has to make a version for the 3D. It's still fairly early in development for this device so I could see it happening.
私の"DU4L C0R3 SH00T3Rは"³Dであなたを撃墜!トゥパックをねじ込みます 。
"AOSPのBACK!" ┌П┐[◣_◢]┌П┐
r0cky0790 said:
I ask CdTDroiD in the Pyramid3D thread (General Sec.), will the Bricked kernel be included in the rom, due to the fact it being the default kernel for that rom on the sensation. I guess the developer has to make a version for the 3D. It's still fairly early in development for this device so I could see it happening.
私の"DU4L C0R3 SH00T3Rは"³Dであなたを撃墜!トゥパックをねじ込みます 。
"AOSPのBACK!" ┌П┐[◣_◢]┌П┐
Click to expand...
Click to collapse
I asked the dev in the bricked thread and he seemed like he would but his only concern was testing since he does not have a 3d... that's why I was hoping someone with kernel experience with a 3d could work with him and maybe port it over here. Obviously if there was a kernel on our end willing to, we would need his concent. Who knows but I would imagine sooner or later we will see those features since out phones are so similar.
Sent from my PG86100 using XDA App
Dude this kernel sounds like pure awesomeness, i want it in my 3d.
We need to get every dev aware if this!!!
Kernels for the EVO3D have been a problem. It doesn't seem like anyone wants to help us out. They will make one then leave for months and never look back. I started looking into it and made some progress but by no means gonna be a master of it. Its kind of a shame.
If Net would come back he could likely knock this out for us since he got donated that evo3d.
And by come back I mean developing. Sad haven't seen anything new from him in a long time. Hope everything is alright.
Sent from my PG86100 using XDA App
did it work on gsm 3d evo on 2.3.4 sense 3.0 ?
photpix said:
did it work on gsm 3d evo on 2.3.4 sense 3.0 ?
Click to expand...
Click to collapse
No, its currently a kernel for the sensation.
Sent from my PG86100 using XDA App
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
*/
ABOUT:
BlackScreen is my custom kernel made for custom aosp/caf roms
This started as just being the kernel in my aicp builds, but as more and more users of other roms started using it I realized I should make a separate thread
====================================================================================================
BlackScreen is meant to give you great battery life and performance (depending on how you tune it , more on that later in the second post), essentially I tried to optimize it for everyday usage (gaming, media consumption. browsing the web, all that stuff), I'm not aiming to have the highest Antutu score (although it is very high, it's just not my focus), you see benchmarks don't really reflect actual everyday usage.
The main thing that I do is port good features and optimizations from the various OnePlus 3/3t kernels (they have many great kernel devs and a lot of their work can benefit us too), I also optimize the kernel settings and stuff like that
Currently BlackScreen is included in aicp, validus, tipsy, and tesla. It is based off of the lineage kernel with tons of improvements from @darkobas's amazing omni kernel, I do my best to keep it up to date with omni and lineage
Downloads
regular build (for every rom but omni)
regular build for omni
Note, I cannot support every ROM out there, doing that would take too much time, here are ROMs that are known to have issues with my kernel and thus are not supported
1. Paranoid Android
2. JUI
In order for these ROMs to work you will have to modify the ramdisk
Install instructions:
In twrp go to the install page, in the bottom right corner select "install image", select the desired kernel, then select "boot", then swipe to flash, then go back to the install screen and install magisk or SuperSU if you don't want to lose root, and then reboot
Here are some of the features
(check out the third, and fourth posts for more info)
f2fs is supported- majority credit to darkobas
eas, credit to lineage
CPU:
darkness governor
Lionfish governor
nebula governor
wheatley governor
lionheart governor
bioshock governor
impulse governor
Alucard governor
ConservativeX governor
Elementalx governor
Nightmare governor
Smartmax governor
Yankactive governor
Despair governor
sched governor
schedutil governor
Optional overclock
Voltage control
GPU:
Adreno boost
Adreno idler
Screen
kcal
Backlight dimmer
I/O:
Improved deadline
improved cfq
bfq
sio
fiops
tripndroid
sioplus
zen
maple
Virtual memory:
various optimizations
zram
zswap
ksm
entropy:
some optimizations
tcp-algorithms:
bic
westwood
htcp
hstcp
vegas
scalable
lp
veno
yeah
illinois
Misc:
dynamic fsync toggle
Many more optimizations
Several wakelocks have been blocked
Added the ability to tweak the thermal throttle settings for the CPU (be very careful with this)
USB fast charge
faster unlock
improved network performance
Option to enable the disabled gentle fair sleepers
Option to enable software crc control
Read the second, third, and fourth posts for more info on the kernel settings, and features, and how to get better performance and battery life and stuff like that
Some screenshots
Thanks to:
darkobas and lineage for the amazing base and continued work on it
Sultan
Franco
dabug123
GalaticStryder
The Flash
There are many more
Source:
Nougat builds:
https://github.com/AICP/kernel_leeco_msm8996/tree/n7.1
Oreo builds:
https://github.com/AICP/kernel_leeco_msm8996/tree/o8.0
This is a work in progress guide to getting great battery life
Note: This guide is meant to be used on my kernel, there's several optimizations that I've left out of this guide because I enabled them by default in my kernel
1. Underclock the big cores to 1900mhz
2. Set the GPU governor to simple_ondemand
3. Set the vibration strength to zero (or close to zero) in the misc section
4. Set the default I/O scheduler to noop
5. Go to developer options and turn off the logger buffer sizes (you will have to turn this back on in order to get a logcat for bug reports, and to pass safety net)
6. Use greenify to enable aggressive doze and doze on the go, and use it to limit background apps
7. If you underclock the big cores even more in kernel adiutor you'll get much better battery life, you'll also get much better battery life if you underclock the little cores to 1440MHz
8. Turn off all animations in developer options
9. In kernel adiutor set the low memory killer values to the aggressive setting
10. Disable fsync (risky, you could lose data if the system crashes)
==================================================================================================================================================================================================================
This is a work in progress guide to getting great performance at the expense of battery life
Note: This guide is meant to be used on my kernel, there's several optimizations that I've left out of this guide because I enabled them by default in my kernel
1. Go to developer options and turn off the logger buffer sizes (you will have to turn this back on in order to get a logcat for bug reports)
2. Use greenify to enable aggressive doze and doze on the go, and use it to limit background apps
3. Turn off all animations in developer options
4. Overclock the little cores to 2188mhz, and the big cores to 2342mhz
5. Disable fsync (risky, you could lose data if the system crashes)
6. Enable ksm, and use zram for more free ram, good for gaming
7. Set the CPU governor to wheatley
Kernel Info
Here is some info on my Kernel builds
Brief overview:
Regular builds (Included in some roms)- based on Lineage (with many improvements from Omni), This has eas, so don't use the interactive cpu governor.
the one for omni is the same except the ramdisk has been optimized for omni so it will boot on it
Info on kernel settings:
CPU governors (the recommended ones), source http://androidmodguide.blogspot.com/p/blog-page.html?m=1
OnDemand:
Ondemand is one of the original and oldest governors available on the linux kernel. When the load placed on your CPU reaches the set threshold, the governor will quickly ramp up to the maximum CPU frequency. It has excellent fluidity because of this high-frequency bias, but it can also have a relatively negative effect on battery life versus other governors. OnDemand was commonly chosen by smartphone manufacturers in the past because it is well-tested and reliable, but it is outdated now and is being replaced by Google's Interactive governor.
Interactive:
don't use this, terrible on eas
Alucard
A favorite choice and one of the original governors that Alucard_24 made. Alucard is based on ondemand but has been heavily tweaked to bring better battery life and performance. It has been known to be battery friendly without sacrificing much performance.
Bioshock
A mix of ConservativeX and Lionheart. Good balance between battery savings and performance.
ConservativeX:
Also developed by Imoseyon (feat. briefly in the Lean Kernel for Galaxy Nexus), the ConservativeX governor behaves like the Conservative governor with the added benefit of locking the CPU frequency to the lowest interval when the screen is off. This governor may additionally perform hotplugging on CPU1, but there is no documentation to confirm that suspicion at this time.
Conservative:
This governor biases the phone to prefer the lowest possible clockspeed as often as possible. In other words, a larger and more persistent load must be placed on the CPU before the conservative governor will be prompted to raise the CPU clockspeed. Depending on how the developer has implemented this governor, and the minimum clockspeed chosen by the user, the conservative governor can introduce choppy performance. On the other hand, it can be good for battery life
ConservativeX
Also developed by Imoseyon (feat. briefly in the Lean Kernel for Galaxy Nexus), the ConservativeX governor behaves like the Conservative governor with the added benefit of locking the CPU frequency to the lowest interval when the screen is off. This governor may additionally perform hotplugging on CPU1, but there is no documentation to confirm that suspicion at this time.
Darkness
It's based on nightmare but more simple and fast, basic configs but very complex structure. It is an updated version of the nightmare gov, so far it is quite stable in tests,
nightmare info:
A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery. In addition to the SoD is a prevention because it usually does not hotplug.
Pegasusq info:
The Pegasusq / d is a multi-core based on the Ondemand governor and governor with integrated hot-plugging. It is quite stable and has the same battery life as ondemand. Ongoing processes in the queue, we know that multiple processes can run simultaneously on. These processes are active in an array, which is a field called "Run Queue" queue that is ongoing, with their priority values arranged (priority will be used by the task scheduler, which then decides which process to run next).
To ensure that each process has its fair share of resources, each will run for a certain period and will eventually stop and then again placed in the queue until it is your turn again. If a program is terminated, so that others can run the program with the highest priority in the current queue is executed.
Despair
It is a tweaked conservative governor with a couple extra values exposed, it tends to be a bit more conservative with battery than the conservative governor by default. Developed by DespairFactor.
ElementalX
ElementalX is basically a multiphase Ondemand governor that aims to achieve the best balance between battery life and performance. By default, it is more conservative than Ondemand as it does not ramp up often for most phone activities. If there is a graphics load detected, the governor will switch to a two-phase Ondemand behaviour where different max frequencies are used depending on the load increase. ElementalX comes with input boost enabled by default lowering the sampling rate and increasing the frequency to improve responsiveness.
Impulse
An improved version of interactive modified by neobuddy89. Impulse aims to have a balance between battery and performance just like interactive but has some tweaks to save battery.
Lionheart
Lionheart is a conservative-based governor which is based on samsung's update3 source.
The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.
Lionfish
The Lionfish governor combines traits of the conservative, ondemand, and interactive governors. It is designed to maximize battery life without noticeably impacting performance. It responds quickly to heavy loads (similar to ondemand and interactive) while staying within the region of optimal CPU performance per watt. With moderate loads, it periodically votes to raise, maintain, or decrease the frequency. When there are enough votes to change the frequency, it is ramped up and down gradually. The voting mechanism reduces frequency jitter compared to ondemand and conservative. squid2's testing had found that this governor uses moderate frequencies (where efficiency is optimal) more effectively than interactive, ondemand, and conservative. This improved frequency distribution results in a moderate reduction in CPU power consumption while maintaining responsiveness comparable to the interactive governor.
Nebula
A port of the Interactive governor based on msm-4.4 sources with some mods for the HTC 10, preserving the excellent balance between performance and battery life found in many other Interactive based govs. It originated from Eliminater74's Nebula kernel and was a popular choice prior to the introduction of EAS scheduling to the kernel.
Smartmax
By default this is configured for battery saving, so this is NOT a gaming or benchmark governor! Additionally, to make it "snappy", smartmax has "touch poke". So input events from the touchscreen will boost the cpu for a specific time to a specific frequency. Developed by XDA user Maxwen.
Wheatley
This governor is build on “ondemand” but increases the C4 (the sleep state) state time of the CPU and doing so trying to save juice. So the results show that Wheatley works as intended and ensures that the C4 state is used whenever the task allows a proper efficient usage of the C4 state. For more demanding tasks which cause a large number of wakeups and prevent the efficient usage of the C4 state, the governor resorts to the next best power saving mechanism and scales down the frequency. So with the new highly-flexible Wheatley governor one can have the best of both worlds. Obviously, this governor is only available on multi-core devices.
Wheatley is a more performance orientated governor as it scales more aggressively than ondemand and sticks with higher frequencies.
Yankactive
A slightly modified interactive based governor by Yank555.lu. It has battery tweaks added onto it so expect better battery life! Based on user reports, this governor behaves more battery friendly than the original interactive governor without sacrificing performance.
I recommend using schedutil for everyday usage, wheatley for performance. and Impluse for battery life
GPU governors (the recommended ones) source http://androidmodguide.blogspot.com/p/blog-page.html?m=1
simple_ondemand: As the name implies, it is a simpler version of the CPU governor ondemand. simple_ondemand will ramp up the frequency when a load is detected. It has a good balance between performance and battery savings.
msm-adreno-tz: The default GPU governor used by Qualcomm for their adreno GPUs. It is based on the ondemand governor but is biased towards performance, therefore it should give better performance in games but less battery life.
I recommend using simple_ondemand for regular usage due to the battery savings
I/O schedulers: (the recommended ones)
source- http://androidmodguide.blogspot.com/p/io-schedulers.html?m=1
Deadline:
The goal of the Deadline scheduler is to attempt to guarantee a start service time for a request. It does that by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.
Before serving the next request, the Deadline scheduler decides which queue to use. Read queues are given a higher priority, because processes usually block on read operations. Next, the Deadline scheduler checks if the first request in the deadline queue has expired. Otherwise, the scheduler serves a batch of requests from the sorted queue. In both cases, the scheduler also serves a batch of requests following the chosen request in the sorted queue.
Benefits:
- Nearly a real-time scheduler.
- Excels in reducing latency of any given single I/O
- Best scheduler for database access and queries.
- Does quite well in benchmarks, most likely the best
- Like noop, a good scheduler for solid state/flash drives
Disadvantages:
- If the phone is overloaded, crashing or unexpected closure of processes can occur
The bottom line: A good all-round scheduler. If you want good performance, you should try deadline.
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 (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Benefits:
- Serves I/O requests with least number of CPU cycles.
- Best for flash drives since there is no seeking penalty.
- Good data throughput on db systems
- Does great in benchmarks
- Is very reliable
Disadvantages:
- Reducing the number of CPU cycles corresponds to a simultaneous decline in performance
- Not the most responsive I/O scheduler
- Not very good at multitasking (especially heavy workloads)
The bottom line: Modern smartphones now use Noop as the default scheduler due to the fact that it works quite well with flash based storage. However older devices may experience slower performance when selected. If you want a very simple I/O scheduler algorithm (because of battery life or latency reasons), you can select this.
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.
Benefits:
- Has a well balanced I/O performance
- Excellent on multiprocessor systems
- Regarded as a stable I/O scheduler
- Good for multitasking
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) can sometimes be very high because the number of competing with each other process tasks
- Under constant load, the phone will experience increased I/O latency due to the way how the scheduler tries to create 'fairness'
The bottom line: One of the best all-rounder I/O schedulers available. CFQ is better suited for traditional hard disks, however it may give better throughput under some situations.
BFQ:
Instead 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.
Benefits:
- Has a very good USB data transfer rate.
- The best scheduler for playback of HD video recording and video streaming (due to less jitter than CFQ Scheduler, and others)
- Regarded as a very precise working Scheduler
- Delivers 30% more throughput than CFQ
- Good for multitasking, more responsive than CFQ
Disadvantages:
- Not the best scheduler for benchmarks
- Higher budgets that were allocated to a process that can affect the interactivity and bring with it increased latency.
The bottom line: There are better schedulers out there that will perform better than BFQ. It is quite a complex scheduler that is better designed for traditional hard disks.
SIO (Simple):
Simple I/O aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority queue concepts, but only basic merging. SIO is a mix between noop & deadline. No reordering or sorting of requests.
Benefits:
- It is simple and stable.
- Minimized starvation for inquiries
Disadvantages:
- Slow random write speeds on flash drives as opposed to other schedulers.
- Sequential read speeds on flash drives are not as good as other IO schedulers
- Not the best scheduler for benchmarks
The bottom line:It is a good all-round scheduler. People who want better performance should avoid using this.
FIOPS (Fair IOPS):
This new I/O scheduler is designed around the following assumptions about Flash-based storage devices: no I/O seek time, read and write I/O cost is usually different from rotating media, time to make a request depends upon the request size, and high through-put and higher IOPS with low-latency. FIOPS (Fair IOPS) ioscheduler tries to fix the gaps in CFQ. It's IOPS based, so it only targets for drive without I/O seek. It's quite similar like CFQ, but the dispatch decision is made according to IOPS instead of slice.
Benefits:
- Achieves high read and write speeds in benchmarks
- Faster app launching time and overall UI experience
Disadvantages:
- Not the most responsive IO scheduler (Can make phone lag)
- Not good at heavy multitasking
The bottom line: Most people who use FIOPS will get a noticeable performance improvement. However, you may get issues with scrolling and general lags.
ZEN
ZEN is based on the Noop, Deadline and SIO I/O schedulers. It's an FCFS (First come, first serve) based algorithm, but it's not strictly FIFO. ZEN does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ones. Other than that, it's pretty much the same as Noop blended with VR features.
VR:
Unlike other scheduling software, synchronous and asynchronous requests are not handled separately, but it will impose a fair and balanced within this deadline requests, that the next request to be served is a function of distance from the last request.
Benefits:
- Well rounded IO Scheduler
- Very efficient IO Scheduler
- More stable than VR, more polished
Disadvantages:
- Performance variability can lead to different results (Only performs well sometimes)
The bottom line: It is pretty much a better version of VR, performs quite well and is stable. Overall this is a good choice for most smartphones.
SIOplus
Based on the original SIO scheduler with improvements. Functionality for specifying the starvation of async reads against sync reads; starved write requests counter only counts when there actually are write requests in the queue; fixed a bug).
Benefits:
- Better read and write speeds than previous SIO scheduler
Disadvantages:
- Fluctuations in performance may be observed
The bottom line: If you liked SIO, you will like SIOplus. It performs slightly better in some usage case scenarios, but performance seekers should look else where
Tripndroid
A new I/O scheduler based on Noop, deadline and vr and meant to have minimal overhead. Made by TripNRaVeR
Benefits:
- Great at IO performance and everyday multitasking
- Well rounded and efficient IO scheduler
- Very responsive I/O scheduler (Compared to FIOPS)
Disadvantages:
- Performance varies between different devices (Some devices perform really well, I haven't tested it much on zl1)
The bottom line: Tripndroid isn't really common, there are other schedulers you can choose which may perform similar or better
Maple
Maple is based on the Zen and Simple I/O schedulers. It uses ZEN's first-come-first-serve style algorithm with separate read/write requests and improved former/latter request handling from SIO. Maple is biased towards handling asynchronous requests before synchronous, and read requests before write. While this can have negative aspects on write intensive tasks like file copying, it slightly improves UI responsiveness. When the device is asleep, maple increases the expiry time of requests so that it can handle them more slowly, causing less overhead.
Benefits:
- Well rounded IO Scheduler
- Very efficient IO Scheduler
Disadvantages:
- Performance varies between different devices (Some devices perform really well)
The bottom line: This is still a very new I/O scheduler which should perform slightly better than ZEN. It will continue to improve with more development.
Summary:
Use noop or sioplus for battery life, bfq or Maple for multitasking, fiops for gaming, sioplus or cfq for stability, and deadline for all around performance
CONTINUED ON THE NEXT POST
More info on kernel settings:
Low Memory Killer
source- http://androidcentral.com/fine-tuning-minfree-settings-improving-androids-multi-tasking
FOREGROUND_APP: This is the application currently on the screen, and running
VISIBLE_APP: This is an application that is open, and running in the background because it's still doing something
SECONDARY_SERVER: This is a process (a service that an application needs) that is alive and ready in case it's needed to do something
HIDDEN_APP: This again is a process, that sits idle (but still alive) in case it's needed by an app that's alive and running
For the most part, we never want to adjust when these apps and processes are killed off. They are the things that the programs we use need to properly function. For the more bold and advanced users, changing settings for HIDDEN_APP settings is possible, albeit with a LOT of trial and error. There's two more settings, and these are the ones most interesting to us today:
CONTENT_PROVIDER: This is apps that provide data (content) to the system. Facebook Sync? That's a CONTENT_PROVIDER. So are things like the Google play store. If they are alive, they can refresh and provide the content they are supposed to at the set interval. If you kill them, they can't of course.
EMPTY_APP:They are apps that you have opened, but are done with them. Android uses a unique style of handling memory management. When an activity is ended, instead of killing it off Android keeps the application in memory so that opening them again is a faster process. Theses "ghost" apps use no battery or CPU time, they just fill RAM that would be otherwise empty. When this memory is needed by a different application or process, the RAM is flushed and made available for the new app. Android does this by keeping a list of recently used apps, with the oldest apps in the list given the lowest priority -- they are killed first if RAM is needed elsewhere. This is a perfect way to handle 'ghost' processes
Virtual Memory this is the really fun stuff
source- the Linux kernel documentation https://github.com/AICP/kernel_leeco_msm8996/blob/n7.1/Documentation/sysctl/vm.txt
dirty_background_ratio:
Contains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which the background kernel flusher threads will start writing out dirty data.
The total available memory is not equal to total system memory.
dirty_ratio:
Contains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which a process which is generating disk writes will itself start writing out dirty data.
The total available memory is not equal to total system memory.
dirty_expire_centisecs:
This tunable is used to define when dirty data is old enough to be eligible for write out by the kernel flusher threads. It is expressed in 100'ths of a second. Data which has been dirty in-memory for longer than this interval will be written out next time a flusher thread wakes up.
dirty_writeback_centisecs:
The kernel flusher threads will periodically wake up and write `old' data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second.
Setting this to zero disables periodic write back altogether.
extra_free_kbytes:
This parameter tells the VM to keep extra free memory between the threshold where background reclaim (kswapd) kicks in, and the threshold where direct reclaim (by allocating processes) kicks in.
This is useful for workloads that require low latency memory allocations and have a bounded burstiness in memory allocations, for example, a realtime application that receives and transmits network traffic (causing in-kernel memory allocations) with a maximum total message burst size of 200MB may need 200MB of extra free memory to avoid direct reclaim related latencies.
min_free_kbytes:
This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a watermark[WMARK_MIN] value for each lowmem zone in the system.
Each lowmem zone gets a number of reserved free pages based proportionally on its size.
Some minimal amount of memory is needed to satisfy PF_MEMALLOC allocations; if you set this to lower than 1024KB, your system will become subtly broken, and prone to deadlock under high loads.
Setting this too high will OOM your machine instantly.
oom_kill_allocating_task:
This enables or disables killing the OOM-triggering task in out-of-memory situations.
If this is set to zero, the OOM killer will scan through the entire tasklist and select a task based on heuristics to kill. This normally selects a rogue memory-hogging task that frees up a large amount of memory when killed.
If this is set to non-zero, the OOM killer simply kills the task that triggered the out-of-memory condition. This avoids the expensive tasklist scan.
If panic_on_oom is selected, it takes precedence over whatever value is used in oom_kill_allocating_task.
The default value is 0.
swappiness:
This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. A value of 0 instructs the kernel not to initiate swap until the amount of free and file-backed pages is less than the high water mark in a zone.
zRam
source- https://sites.google.com/site/easylinuxtipsproject/speed#TOC-Only-768-MB-RAM-or-less:-enable-zRam
zRam creates a compressed swap file in your RAM. The compression factor is the gain: with that, you "increase" your RAM.
The price you pay for this, is:
- Your processor (CPU) is being taxed more heavily, because it'll have to compress and decompress all the time;.
That's why, I advise zRam only for phones with very little RAM (Not zl1), and even then only in combination with a swappiness that has been decreased to 5.
Misc
Vibration strength:
Obviously this controls the strength of the vibrations, setting this to a lower value will increase battery life, setting it to zero will disable all vibrations (Kind of, you'll still get a very subtle vibration, but chances are you won't even notice it)
TCP CONGESTION ALGORITHMS:
source- http://androidmodguide.blogspot.com/p/tcp-algorithms.html?m=1
Tahoe:
Limits unknown packets being received. Limits the congestion window, and reset itself to a slow-start state.
Reno:
Basically the same as Tahoe, but if 3 of the same packets are received, it will halve the window, instead of reducing it to one. It changes the slow start threshold equal to that of the congestion window.
Cubic:
One of the best, most recommended TCP options available. Less aggressive, Inflects the windows prior to the event. Used in Linux.
Vegas:
One of the smoothest TCP algorithms(next to cubic), it increases the timeout delay for packets, which allows more to be received, but at a higher rate. It also has set timeouts, which helps with speed because it's constantly being refreshed.
Veno:
Veno is closely related to Vegas, it is a combination of Vegas and Reno in order to enhance TCP performance over Wireless networks.
Low Priority (LP):
A distributed algorithm whose goal is to utilize only the excess network bandwidth as compared to the "fair share" of bandwidth as targeted by TCP. The key mechanisms unique to TCP-LP congestion control are the use of one-way packet delays for early congestion indications and a TCP-transparent congestion avoidance policy.
Binary Increase Congestion control (BIC):
BIC is optimized for high speed networks with high latency: so-called "long fat networks". It has a unique congestion window (cwnd) algorithm. This algorithm tries to find the maximum where to keep the window at for a long period of time, by using a binary search algorithm.
Scalable:
Scalable calls for congestion window to be halved for each packet lost. Effectively, this process keeps halving the throughput until packet loss stops. Once the packet loss subsides, slow start kicks in to ramp the speed back up.
Hamilton TCP (HTCP):
HTCP is designed for high-speed, long distance networks that increases aggressiveness as the time since the previous loss increases. It is thought to be a more efficient TCP algorithm than BIC and HSTCP.
Illinois:
Illinois is designed for high-speed, long-distance networks. A sender side modification to the standard TCP congestion control algorithm, it achieves a higher average throughput than the standard TCP and allocates the network resource fairly as the standard TCP.
High speed (HSTCP):
High Speed TCP (HSTCP) is a new congestion control algorithm protocol for TCP. Standard TCP performs poorly in networks with a large bandwidth delay product. It is unable to fully utilize available bandwidth. HSTCP makes minor modifications to standard TCP's congestion control mechanism to overcome this limitation.
Yeah-TCP:
A high speed TCP congestion control algorithm which uses a mixed loss/delay approach to calculate congestion windows. Its purpose is to target high efficiency, fairness, and minimizing link loss while keeping network elements load as low as possible.
Westwood:
A newer version of Reno, and another commonly used one. It controls parameters better, helping out streaming and overall quality of browsing the internet. One of the most 'fair' algorithms out there, and is one of the most efficient algorithms to date.
I recommend using Westwood for everything, and only use cubic if all you care about is stability and don't mind losses in performance, and latency, and stuff like that
Good job ,
Now I'm on omni , work without any problem
If u can make one for eui this will be great
Thanks! This thread will be useful for all of us!
Good job? Thanks??
BlackScreen-eas_4-23-17 on RR f2fs OK
BlackScreen_4-23-17 on RR f2fs OK (liveDisplsy Ok)
Inviato dal mio LEX720 utilizzando Tapatalk
Very nice. Which one would you recommend for Ground Zero's Tipsy ROM, which is based on Slim?
benjmiester said:
Very nice. Which one would you recommend for Ground Zero's Tipsy ROM, which is based on Slim?
Click to expand...
Click to collapse
I used both and didn't work, but previous version, I have to try these new versions
Just flashed it with lineage actual release. Many many thanks. Its finally usable!
Great work. Please keep it up.
Performance/Battery is amazing
So Yesterday i flashed BlackScreen_4-23-17 (Los14.1), today i wanted to test Game performance = Battery usage
and i must say that the Result are Really nice so let me start off by saying thank you for this amazing kernel, it made it possible to play games on Los 14.1 without stuttering.
I roughly played 4 hours and still have 46% this includes Chrome,games,Youtube and benchmarks etc. but see it for yourself i did some screenshots of System monitor and BetterBatteryStats i dont know if you can read the BetterBatteryStats.txt but i figured i add it aswell.
I also followed your guide on Reaching better Performance if that helps.
benjmiester said:
Very nice. Which one would you recommend for Ground Zero's Tipsy ROM, which is based on Slim?
Click to expand...
Click to collapse
It's already included in tipsy...
hello, what is settings by default without root and no use Kernel auditor ?
thx thx
I made a mistake. I flash the image of the kernel onto the image twrp recovery. Now I have no recovery and no root. How do I put twrp in into recovery without a computer
Sent from my LEX727 using XDA-Developers Legacy app
toanau said:
I made a mistake. I flash the image of the kernel onto the image twrp recovery. Now I have no recovery and no root. How do I put twrp in into recovery without a computer
Click to expand...
Click to collapse
But into fastboot mode and then install the twrp Img again using adb tools on your computer
Hi mosimchah first of all congratulations for the great work you are carrying on. I'm currently testing the regular kernel and noticed the new up_threshold and down_thresold settings on the CPU board. I tried in op but did not find anything about it. If I understand that the use of these new parameters should serve to turn on and off the second small cluster core in relation to the load of the root core. right? I think with this new implementation you will have a good battery saver. You could better explain how this feature works and how to configure it best. Thanks for the great work??
Inviato dal mio LEX720 utilizzando Tapatalk
N1m0Y said:
Hi mosimchah first of all congratulations for the great work you are carrying on. I'm currently testing the regular kernel and noticed the new up_threshold and down_thresold settings on the CPU board. I tried in op but did not find anything about it. If I understand that the use of these new parameters should serve to turn on and off the second small cluster core in relation to the load of the root core. right? I think with this new implementation you will have a good battery saver. You could better explain how this feature works and how to configure it best. Thanks for the great work??
Inviato dal mio LEX720 utilizzando Tapatalk
Click to expand...
Click to collapse
Not sure what you're referring too, can you screenshot it
Thanks for sharing this! Do you have any idea if Double Tap to Wake can be added?
Overstew said:
Thanks for sharing this! Do you have any idea if Double Tap to Wake can be added?
Click to expand...
Click to collapse
Yes it will be added soon, the lineage team is working on an implementation of it.
mosimchah said:
Not sure what you're referring too, can you screenshot it
Click to expand...
Click to collapse
Up_threshold and down_thresold???
Inviato dal mio LEX720 utilizzando Tapatalk
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
*/
ABOUT:
BlackScreen is my custom kernel made for custom aosp/caf roms
This started as just being the kernel in my aicp builds, but as more and more users of other roms started using it I realized I should make a separate thread
====================================================================================================
BlackScreen is meant to give you great battery life and performance (depending on how you tune it), essentially I tried to optimize it for everyday usage (gaming, media consumption. browsing the web, all that stuff), I'm not aiming to have the highest Antutu score (although it is very high, it's just not my focus), you see benchmarks don't really reflect actual everyday usage.
The main thing that I do is port good features and optimizations from the various OnePlus 3/3t kernels (they have many great kernel devs and a lot of their work can benefit us too), I also optimize the kernel settings and stuff like that
Currently BlackScreen is included in AICP, and GZR. It is based off of the android linux stable kernel by @nathanchance (He takes caf and upstreams it to the latest from linux stable), with the bringup from @codeworkx, I do my best to keep it up to date with lineage, and Android Linux stable
Downloads
https://www.androidfilehost.com/?w=files&flid=227246
Note:
The -oc zip is simply an overclocked version of the regular build
Install instructions:
In twrp go to the install page, flash the zip, and reboot
Here are some of the features
CPU:
Interactive governor
Ondemand governor
Conservative governor
Powersave governor
Performance governor
darkness governor
Lionfish governor
nebula governor
wheatley governor
lionheart governor
bioshock governor
impulse governor
Alucard governor
ConservativeX governor
Elementalx governor
Nightmare governor
Smartmax governor
Yankactive governor
Despair governor
blu_active governor
Optional overclock
Voltage control
Screen
kcal
Backlight dimmer
I/O:
Improved deadline
improved cfq
bfq
sio
fiops
tripndroid
sioplus
zen
maple
Virtual memory:
various optimizations
zram
zswap
entropy:
some optimizations
tcp-algorithms:
bic
westwood
htcp
hstcp
vegas
scalable
lp
veno
yeah
illinois
hybla
Misc:
fsync toggle
Many more optimizations
Several wakelocks have been blocked
Added the ability to tweak the thermal throttle settings for the CPU (be very careful with this)
USB fast charge
faster unlock
improved network performance
Option to enable/disable gentle fair sleepers
Option to enable/disable software crc control
vibrator intensity control
arch power savings
Thanks to:
darkobas
codeworkx
Sultanxda
Franco
Flar2
dabug123
GalaticStryder
nathanchance
KuranKaname
DD3Boh
There are many more
Source:
Telegram group:
https://t.me/BlackScreenKernel
Regular build:
https://github.com/AICP/kernel_leeco_msm8996/tree/o8.1
Overclocked build:
https://github.com/mosimchah/kernel_leeco_msm8996/tree/o8.1-oc
This is a work in progress guide to getting great battery life
Note: This guide is meant to be used on my kernel, there's several optimizations that I've left out of this guide because I enabled them by default in my kernel
1. Set the CPU governor to lionfish, or impulse (these will cause lags, interactive is really good enough though)
2. Underclock the big cores to 1900mhz
3. Set the GPU governor to simple_ondemand
4. Set the vibration strength to zero (or close to zero) in the misc section
5. Set the I/O scheduler to noop
6. Go to developer options and turn off the logger buffer sizes (you will have to turn this back on in order to get a logcat for bug reports, and to pass safety net)
7. Use greenify to enable aggressive doze and doze on the go, and use it to limit background apps
8. If you underclock the big cores even more in kernel adiutor you'll get much better battery life, you'll also get much better battery life if you underclock the little cores to 1440MHz (will cause lags under heavy usage)
9. Set all animation durations to .1, or .5 (depending on the options in your ROM) in developer options, never set it to zero on Oreo, it will cause weird issues and fc's in some apps #BlameGoogle
10. In kernel adiutor set the low memory killer values to the aggressive setting
11. Enable dynamic fsync
==================================================================================================================================================================================================================
This is a work in progress guide to getting great performance at the expense of battery life
Note: This guide is meant to be used on my kernel, there's several optimizations that I've left out of this guide because I enabled them by default in my kernel
1. Go to developer options and turn off the logger buffer sizes (you will have to turn this back on in order to get a logcat for bug reports)
2. Use greenify to enable aggressive doze and doze on the go, and use it to limit background apps
3. Set all animation durations to .1, or .5 (depending on the options in your ROM) in developer options, never set it to zero on Oreo, it will cause weird issues and fc's in some apps #BlameGoogle
4. Flash BlackScreen overclocked, and use a kernel manager app to set the freqs to the max for the CPU and GPU
5. Enable dynamic fsync
6. Enable ksm, for more free ram, good for gaming
7. Set the CPU governor to wheatley
Kernel Info
Here is some info on my Kernel builds
Info on kernel settings:
######################
CPU governors
source- http://androidmodguide.blogspot.com/p/blog-page.html?m=1
OnDemand:
Ondemand is one of the original and oldest governors available on the linux kernel. When the load placed on your CPU reaches the set threshold, the governor will quickly ramp up to the maximum CPU frequency. It has excellent fluidity because of this high-frequency bias, but it can also have a relatively negative effect on battery life versus other governors. OnDemand was commonly chosen by smartphone manufacturers in the past because it is well-tested and reliable, but it is outdated now and is being replaced by Google's Interactive governor.
Interactive:
Interactive scales the clockspeed over the course of a timer set by the kernel developer (or user). In other words, if an application demands a ramp to maximum clockspeed (by placing 100% load on the CPU), a user can execute another task before the governor starts reducing CPU frequency. Because of this timer, Interactive is also better prepared to utilize intermediate clockspeeds that fall between the minimum and maximum CPU frequencies. It is significantly more responsive than OnDemand, because it's faster at scaling to maximum frequency.
Interactive also makes the assumption that a user turning the screen on will shortly be followed by the user interacting with some application on their device. Because of this, screen on triggers a ramp to maximum clockspeed, followed by the timer behavior described above.
Interactive is the default governor of choice for today's smartphone and tablet manufacturers.
Alucard
A favorite choice and one of the original governors that Alucard_24 made. Alucard is based on ondemand but has been heavily tweaked to bring better battery life and performance. It has been known to be battery friendly without sacrificing much performance.
Blu_active
A new cpu governor developed by eng.stk (featured in his Code_Blue kernels) based on interactive with upstream caf patches and ondemand governor bits too. This governor is mainly focused on performance like the other things the developer creates but it is also well balanced for gaming and general usage.
Bioshock
A mix of ConservativeX and Lionheart. Good balance between battery savings and performance.
ConservativeX:
Also developed by Imoseyon (feat. briefly in the Lean Kernel for Galaxy Nexus), the ConservativeX governor behaves like the Conservative governor with the added benefit of locking the CPU frequency to the lowest interval when the screen is off. This governor may additionally perform hotplugging on CPU1, but there is no documentation to confirm that suspicion at this time.
Conservative:
This governor biases the phone to prefer the lowest possible clockspeed as often as possible. In other words, a larger and more persistent load must be placed on the CPU before the conservative governor will be prompted to raise the CPU clockspeed. Depending on how the developer has implemented this governor, and the minimum clockspeed chosen by the user, the conservative governor can introduce choppy performance. On the other hand, it can be good for battery life
ConservativeX
Also developed by Imoseyon (feat. briefly in the Lean Kernel for Galaxy Nexus), the ConservativeX governor behaves like the Conservative governor with the added benefit of locking the CPU frequency to the lowest interval when the screen is off. This governor may additionally perform hotplugging on CPU1, but there is no documentation to confirm that suspicion at this time.
Darkness
It's based on nightmare but more simple and fast, basic configs but very complex structure. It is an updated version of the nightmare gov, so far it is quite stable in tests,
nightmare info:
A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery. In addition to the SoD is a prevention because it usually does not hotplug.
Pegasusq info:
The Pegasusq / d is a multi-core based on the Ondemand governor and governor with integrated hot-plugging. It is quite stable and has the same battery life as ondemand. Ongoing processes in the queue, we know that multiple processes can run simultaneously on. These processes are active in an array, which is a field called "Run Queue" queue that is ongoing, with their priority values arranged (priority will be used by the task scheduler, which then decides which process to run next).
To ensure that each process has its fair share of resources, each will run for a certain period and will eventually stop and then again placed in the queue until it is your turn again. If a program is terminated, so that others can run the program with the highest priority in the current queue is executed.
Despair
It is a tweaked conservative governor with a couple extra values exposed, it tends to be a bit more conservative with battery than the conservative governor by default. Developed by DespairFactor.
ElementalX
ElementalX is basically a multiphase Ondemand governor that aims to achieve the best balance between battery life and performance. By default, it is more conservative than Ondemand as it does not ramp up often for most phone activities. If there is a graphics load detected, the governor will switch to a two-phase Ondemand behaviour where different max frequencies are used depending on the load increase. ElementalX comes with input boost enabled by default lowering the sampling rate and increasing the frequency to improve responsiveness.
Impulse
An improved version of interactive modified by neobuddy89. Impulse aims to have a balance between battery and performance just like interactive but has some tweaks to save battery.
Lionheart
Lionheart is a conservative-based governor which is based on samsung's update3 source.
The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.
Lionfish
The Lionfish governor combines traits of the conservative, ondemand, and interactive governors. It is designed to maximize battery life without noticeably impacting performance. It responds quickly to heavy loads (similar to ondemand and interactive) while staying within the region of optimal CPU performance per watt. With moderate loads, it periodically votes to raise, maintain, or decrease the frequency. When there are enough votes to change the frequency, it is ramped up and down gradually. The voting mechanism reduces frequency jitter compared to ondemand and conservative. squid2's testing had found that this governor uses moderate frequencies (where efficiency is optimal) more effectively than interactive, ondemand, and conservative. This improved frequency distribution results in a moderate reduction in CPU power consumption while maintaining responsiveness comparable to the interactive governor.
Nebula
A port of the Interactive governor based on msm-4.4 sources with some mods for the HTC 10, preserving the excellent balance between performance and battery life found in many other Interactive based govs. It originated from Eliminater74's Nebula kernel and was a popular choice prior to the introduction of EAS scheduling to the kernel.
Performance
The performance governor locks the phone's CPU at maximum frequency.
Powersave
The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
Smartmax
By default this is configured for battery saving, so this is NOT a gaming or benchmark governor! Additionally, to make it "snappy", smartmax has "touch poke". So input events from the touchscreen will boost the cpu for a specific time to a specific frequency. Developed by XDA user Maxwen.
Wheatley
This governor is build on “ondemand” but increases the C4 (the sleep state) state time of the CPU and doing so trying to save juice. So the results show that Wheatley works as intended and ensures that the C4 state is used whenever the task allows a proper efficient usage of the C4 state. For more demanding tasks which cause a large number of wakeups and prevent the efficient usage of the C4 state, the governor resorts to the next best power saving mechanism and scales down the frequency. So with the new highly-flexible Wheatley governor one can have the best of both worlds. Obviously, this governor is only available on multi-core devices.
Wheatley is a more performance orientated governor as it scales more aggressively than ondemand and sticks with higher frequencies.
Yankactive
A slightly modified interactive based governor by Yank555.lu. It has battery tweaks added onto it so expect better battery life! Based on user reports, this governor behaves more battery friendly than the original interactive governor without sacrificing performance.
I recommend using bioshock for everyday usage, wheatley or interactive for performance. and Impluse or lionfish for battery life
GPU governors (the recommended ones) source http://androidmodguide.blogspot.com/p/blog-page.html?m=1
simple_ondemand: As the name implies, it is a simpler version of the CPU governor ondemand. simple_ondemand will ramp up the frequency when a load is detected. It has a good balance between performance and battery savings.
msm-adreno-tz: The default GPU governor used by Qualcomm for their adreno GPUs. It is based on the ondemand governor but is biased towards performance, therefore it should give better performance in games but less battery life.
I recommend using simple_ondemand for regular usage due to the battery savings
I/O schedulers: (the recommended ones)
source- http://androidmodguide.blogspot.com/p/io-schedulers.html?m=1
Deadline:
The goal of the Deadline scheduler is to attempt to guarantee a start service time for a request. It does that by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.
Before serving the next request, the Deadline scheduler decides which queue to use. Read queues are given a higher priority, because processes usually block on read operations. Next, the Deadline scheduler checks if the first request in the deadline queue has expired. Otherwise, the scheduler serves a batch of requests from the sorted queue. In both cases, the scheduler also serves a batch of requests following the chosen request in the sorted queue.
Benefits:
- Nearly a real-time scheduler.
- Excels in reducing latency of any given single I/O
- Best scheduler for database access and queries.
- Does quite well in benchmarks, most likely the best
- Like noop, a good scheduler for solid state/flash drives
Disadvantages:
- If the phone is overloaded, crashing or unexpected closure of processes can occur
The bottom line: A good all-round scheduler. If you want good performance, you should try deadline.
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 (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Benefits:
- Serves I/O requests with least number of CPU cycles.
- Best for flash drives since there is no seeking penalty.
- Good data throughput on db systems
- Does great in benchmarks
- Is very reliable
Disadvantages:
- Reducing the number of CPU cycles corresponds to a simultaneous decline in performance
- Not the most responsive I/O scheduler
- Not very good at multitasking (especially heavy workloads)
The bottom line: Modern smartphones now use Noop as the default scheduler due to the fact that it works quite well with flash based storage. However older devices may experience slower performance when selected. If you want a very simple I/O scheduler algorithm (because of battery life or latency reasons), you can select this.
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.
Benefits:
- Has a well balanced I/O performance
- Excellent on multiprocessor systems
- Regarded as a stable I/O scheduler
- Good for multitasking
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) can sometimes be very high because the number of competing with each other process tasks
- Under constant load, the phone will experience increased I/O latency due to the way how the scheduler tries to create 'fairness'
The bottom line: One of the best all-rounder I/O schedulers available. CFQ is better suited for traditional hard disks, however it may give better throughput under some situations.
BFQ:
Instead 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.
Benefits:
- Has a very good USB data transfer rate.
- The best scheduler for playback of HD video recording and video streaming (due to less jitter than CFQ Scheduler, and others)
- Regarded as a very precise working Scheduler
- Delivers 30% more throughput than CFQ
- Good for multitasking, more responsive than CFQ
Disadvantages:
- Not the best scheduler for benchmarks
- Higher budgets that were allocated to a process that can affect the interactivity and bring with it increased latency.
The bottom line: There are better schedulers out there that will perform better than BFQ. It is quite a complex scheduler that is better designed for traditional hard disks.
SIO (Simple):
Simple I/O aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority queue concepts, but only basic merging. SIO is a mix between noop & deadline. No reordering or sorting of requests.
Benefits:
- It is simple and stable.
- Minimized starvation for inquiries
Disadvantages:
- Slow random write speeds on flash drives as opposed to other schedulers.
- Sequential read speeds on flash drives are not as good as other IO schedulers
- Not the best scheduler for benchmarks
The bottom line:It is a good all-round scheduler. People who want better performance should avoid using this.
FIOPS (Fair IOPS):
This new I/O scheduler is designed around the following assumptions about Flash-based storage devices: no I/O seek time, read and write I/O cost is usually different from rotating media, time to make a request depends upon the request size, and high through-put and higher IOPS with low-latency. FIOPS (Fair IOPS) ioscheduler tries to fix the gaps in CFQ. It's IOPS based, so it only targets for drive without I/O seek. It's quite similar like CFQ, but the dispatch decision is made according to IOPS instead of slice.
Benefits:
- Achieves high read and write speeds in benchmarks
- Faster app launching time and overall UI experience
Disadvantages:
- Not the most responsive IO scheduler (Can make phone lag)
- Not good at heavy multitasking
The bottom line: Most people who use FIOPS will get a noticeable performance improvement. However, you may get issues with scrolling and general lags.
ZEN
ZEN is based on the Noop, Deadline and SIO I/O schedulers. It's an FCFS (First come, first serve) based algorithm, but it's not strictly FIFO. ZEN does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ones. Other than that, it's pretty much the same as Noop blended with VR features.
VR:
Unlike other scheduling software, synchronous and asynchronous requests are not handled separately, but it will impose a fair and balanced within this deadline requests, that the next request to be served is a function of distance from the last request.
Benefits:
- Well rounded IO Scheduler
- Very efficient IO Scheduler
- More stable than VR, more polished
Disadvantages:
- Performance variability can lead to different results (Only performs well sometimes)
The bottom line: It is pretty much a better version of VR, performs quite well and is stable. Overall this is a good choice for most smartphones.
SIOplus
Based on the original SIO scheduler with improvements. Functionality for specifying the starvation of async reads against sync reads; starved write requests counter only counts when there actually are write requests in the queue; fixed a bug).
Benefits:
- Better read and write speeds than previous SIO scheduler
Disadvantages:
- Fluctuations in performance may be observed
The bottom line: If you liked SIO, you will like SIOplus. It performs slightly better in some usage case scenarios, but performance seekers should look else where
Tripndroid
A new I/O scheduler based on Noop, deadline and vr and meant to have minimal overhead. Made by TripNRaVeR
Benefits:
- Great at IO performance and everyday multitasking
- Well rounded and efficient IO scheduler
- Very responsive I/O scheduler (Compared to FIOPS)
Disadvantages:
- Performance varies between different devices (Some devices perform really well, I haven't tested it much on zl1)
The bottom line: Tripndroid isn't really common, there are other schedulers you can choose which may perform similar or better
Maple
Maple is based on the Zen and Simple I/O schedulers. It uses ZEN's first-come-first-serve style algorithm with separate read/write requests and improved former/latter request handling from SIO. Maple is biased towards handling asynchronous requests before synchronous, and read requests before write. While this can have negative aspects on write intensive tasks like file copying, it slightly improves UI responsiveness. When the device is asleep, maple increases the expiry time of requests so that it can handle them more slowly, causing less overhead.
Benefits:
- Well rounded IO Scheduler
- Very efficient IO Scheduler
Disadvantages:
- Performance varies between different devices (Some devices perform really well)
The bottom line: This is still a very new I/O scheduler which should perform slightly better than ZEN. It will continue to improve with more development.
Summary:
Use noop or sioplus for battery life, bfq or Maple for multitasking, fiops for gaming, sioplus or cfq for stability, and deadline for all around performance
CONTINUED ON THE NEXT POST
More info on kernel settings:
Low Memory Killer
source- http://androidcentral.com/fine-tuning-minfree-settings-improving-androids-multi-tasking
FOREGROUND_APP: This is the application currently on the screen, and running
VISIBLE_APP: This is an application that is open, and running in the background because it's still doing something
SECONDARY_SERVER: This is a process (a service that an application needs) that is alive and ready in case it's needed to do something
HIDDEN_APP: This again is a process, that sits idle (but still alive) in case it's needed by an app that's alive and running
For the most part, we never want to adjust when these apps and processes are killed off. They are the things that the programs we use need to properly function. For the more bold and advanced users, changing settings for HIDDEN_APP settings is possible, albeit with a LOT of trial and error. There's two more settings, and these are the ones most interesting to us today:
CONTENT_PROVIDER: This is apps that provide data (content) to the system. Facebook Sync? That's a CONTENT_PROVIDER. So are things like the Google play store. If they are alive, they can refresh and provide the content they are supposed to at the set interval. If you kill them, they can't of course.
EMPTY_APP:They are apps that you have opened, but are done with them. Android uses a unique style of handling memory management. When an activity is ended, instead of killing it off Android keeps the application in memory so that opening them again is a faster process. Theses "ghost" apps use no battery or CPU time, they just fill RAM that would be otherwise empty. When this memory is needed by a different application or process, the RAM is flushed and made available for the new app. Android does this by keeping a list of recently used apps, with the oldest apps in the list given the lowest priority -- they are killed first if RAM is needed elsewhere. This is a perfect way to handle 'ghost' processes
Virtual Memory this is the really fun stuff
source- the Linux kernel documentation https://github.com/AICP/kernel_leeco_msm8996/blob/o8.0/Documentation/sysctl/vm.txt
dirty_background_ratio:
Contains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which the background kernel flusher threads will start writing out dirty data.
The total available memory is not equal to total system memory.
dirty_ratio:
Contains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which a process which is generating disk writes will itself start writing out dirty data.
The total available memory is not equal to total system memory.
dirty_expire_centisecs:
This tunable is used to define when dirty data is old enough to be eligible for write out by the kernel flusher threads. It is expressed in 100'ths of a second. Data which has been dirty in-memory for longer than this interval will be written out next time a flusher thread wakes up.
dirty_writeback_centisecs:
The kernel flusher threads will periodically wake up and write `old' data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second.
Setting this to zero disables periodic write back altogether.
extra_free_kbytes:
This parameter tells the VM to keep extra free memory between the threshold where background reclaim (kswapd) kicks in, and the threshold where direct reclaim (by allocating processes) kicks in.
This is useful for workloads that require low latency memory allocations and have a bounded burstiness in memory allocations, for example, a realtime application that receives and transmits network traffic (causing in-kernel memory allocations) with a maximum total message burst size of 200MB may need 200MB of extra free memory to avoid direct reclaim related latencies.
min_free_kbytes:
This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a watermark[WMARK_MIN] value for each lowmem zone in the system.
Each lowmem zone gets a number of reserved free pages based proportionally on its size.
Some minimal amount of memory is needed to satisfy PF_MEMALLOC allocations; if you set this to lower than 1024KB, your system will become subtly broken, and prone to deadlock under high loads.
Setting this too high will OOM your machine instantly.
oom_kill_allocating_task:
This enables or disables killing the OOM-triggering task in out-of-memory situations.
If this is set to zero, the OOM killer will scan through the entire tasklist and select a task based on heuristics to kill. This normally selects a rogue memory-hogging task that frees up a large amount of memory when killed.
If this is set to non-zero, the OOM killer simply kills the task that triggered the out-of-memory condition. This avoids the expensive tasklist scan.
If panic_on_oom is selected, it takes precedence over whatever value is used in oom_kill_allocating_task.
The default value is 0.
swappiness:
This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. A value of 0 instructs the kernel not to initiate swap until the amount of free and file-backed pages is less than the high water mark in a zone.
zRam
source- https://source.android.com/devices/tech/debug/jank_jitter#page-cache
zRam creates a compressed swap file in your RAM. The compression factor is the gain: with that, you "increase" your RAM. This improves performance, even on a device with 4/6GB of RAM
Misc
Vibration strength:
Obviously this controls the strength of the vibrations, setting this to a lower value will increase battery life, setting it to zero will disable all vibrations (Kind of, you'll still get a very subtle vibration, but chances are you won't even notice it)
TCP CONGESTION ALGORITHMS:
source- http://androidmodguide.blogspot.com/p/tcp-algorithms.html?m=1
Tahoe:
Limits unknown packets being received. Limits the congestion window, and reset itself to a slow-start state.
Reno:
Basically the same as Tahoe, but if 3 of the same packets are received, it will halve the window, instead of reducing it to one. It changes the slow start threshold equal to that of the congestion window.
Cubic:
One of the best, most recommended TCP options available. Less aggressive, Inflects the windows prior to the event. Used in Linux.
Vegas:
One of the smoothest TCP algorithms(next to cubic), it increases the timeout delay for packets, which allows more to be received, but at a higher rate. It also has set timeouts, which helps with speed because it's constantly being refreshed.
Veno:
Veno is closely related to Vegas, it is a combination of Vegas and Reno in order to enhance TCP performance over Wireless networks.
Low Priority (LP):
A distributed algorithm whose goal is to utilize only the excess network bandwidth as compared to the "fair share" of bandwidth as targeted by TCP. The key mechanisms unique to TCP-LP congestion control are the use of one-way packet delays for early congestion indications and a TCP-transparent congestion avoidance policy.
Binary Increase Congestion control (BIC):
BIC is optimized for high speed networks with high latency: so-called "long fat networks". It has a unique congestion window (cwnd) algorithm. This algorithm tries to find the maximum where to keep the window at for a long period of time, by using a binary search algorithm.
Scalable:
Scalable calls for congestion window to be halved for each packet lost. Effectively, this process keeps halving the throughput until packet loss stops. Once the packet loss subsides, slow start kicks in to ramp the speed back up.
Hamilton TCP (HTCP):
HTCP is designed for high-speed, long distance networks that increases aggressiveness as the time since the previous loss increases. It is thought to be a more efficient TCP algorithm than BIC and HSTCP.
Illinois:
Illinois is designed for high-speed, long-distance networks. A sender side modification to the standard TCP congestion control algorithm, it achieves a higher average throughput than the standard TCP and allocates the network resource fairly as the standard TCP.
High speed (HSTCP):
High Speed TCP (HSTCP) is a new congestion control algorithm protocol for TCP. Standard TCP performs poorly in networks with a large bandwidth delay product. It is unable to fully utilize available bandwidth. HSTCP makes minor modifications to standard TCP's congestion control mechanism to overcome this limitation.
Yeah-TCP:
A high speed TCP congestion control algorithm which uses a mixed loss/delay approach to calculate congestion windows. Its purpose is to target high efficiency, fairness, and minimizing link loss while keeping network elements load as low as possible.
Hybla:
Penalizes connections that use satellite radio. Not usually used with phones
Westwood:
A newer version of Reno, and another commonly used one. It controls parameters better, helping out streaming and overall quality of browsing the internet. One of the most 'fair' algorithms out there, and is one of the most efficient algorithms to date.
I recommend using Westwood for everything, and only use cubic if all you care about is maximum stability and don't mind losses in performance, and latency, and stuff like that
mosimchah said:
reserved.
Click to expand...
Click to collapse
Excelent newsssss!!!!
Enviado desde mi iPad utilizando Tapatalk
yeesssss!!!!
################################################################
BlackScreen 4.1################################################################
Changes:
1. Updated to Linux 3.18.80 (from 3.18.78)
2. Changed the default cpu governor to bioshock, this will improve battery life (compared to interactive)
3. re-enabled the ipa wakelock, disabling this creates another wakelock which is even worse (you can still disable it if you want)
Download: https://www.androidfilehost.com/?fid=817906626617945015
don't forget to flash supersu or magisk afterwords if you don't want to lose root
Sent from my LEX727 using XDA Labs
My favourite Nougat kernel now for the Oreo!! Thank you
Finally had some time to add my battery life/performance guide, and extra kernel info to my reserved posts
Battery life/performance guide:
https://forum.xda-developers.com/showpost.php?p=74363632&postcount=2
Kernel info:
https://forum.xda-developers.com/showpost.php?p=74363637&postcount=3
https://forum.xda-developers.com/showpost.php?p=74363641&postcount=4
Sent from my LEX727 using XDA Labs
################################################################
BlackScreen 4.2################################################################
Changes:
1. Updated the kernel to Linux 3.18.84 (from 3.18.80)
2. Merged the latest caf tag (tons and tons of changes in it)
3. Updated to the latest qcacld-2.0
As always there's more info on the kernel features (cpu, and gpu governors, hotplug driver, IO schedulers, tcp algorithms, and way more) in the third post, and fourth post, and I have a great battery life and performance guide in the second post
Download: https://www.androidfilehost.com/?fid=962021903579495149
don't forget to flash supersu or magisk afterwords if you don't want to lose root
Sent from my LEX727 using XDA Labs
@mosimchah Will u please make one caynogen based highly overclocked kernel for le x722 elite pro 3. so that x722's sd 820 can also match the speed of snapdragon821 . Thankuhh in advance!!!
Yugps said:
@mosimchah Will u please make one caynogen based highly overclocked kernel for le x722 elite pro 3. so that x722's sd 820 can also match the speed of snapdragon821 . Thankuhh in advance!!!
Click to expand...
Click to collapse
First get my Kernel, or the Lineage kernel working on your device, then I'll add the overclock
Sent from my LEX727 using XDA Labs
mosimchah said:
First get my Kernel, or the Lineage kernel working on your device, then I'll add the overclock
Sent from my LEX727 using XDA Labs
Click to expand...
Click to collapse
https://drive.google.com/file/d/1JgfAbcz4Gm32RTUTwOjiPhU-Fi6y10_2/view?usp=drivesdk
This is the link for the working caynogen based kernel on my device le x722 elite. So please add overclock frequencies of big cluster upto 2.35 or 2.4 ghz , litle clusters upto 1.9 or 2 ghz , gpu frequency upto 700 mhz. and thankuh so much for responding @mosimchah .
Yugps said:
https://drive.google.com/file/d/1JgfAbcz4Gm32RTUTwOjiPhU-Fi6y10_2/view?usp=drivesdk
This is the link for the working caynogen based kernel on my device le x722 elite. So please add overclock frequencies of big cluster upto 2.35 or 2.4 ghz , litle clusters upto 1.9 or 2 ghz , gpu frequency upto 700 mhz. and thankuh so much for responding @mosimchah .
Click to expand...
Click to collapse
I would need the Kernel source for one, and it needs to be this kernel or the official lineage Kernel, I'm not going to add the overclocks if the kernel won't even work with your device
Sent from my LEX727 using XDA Labs
mosimchah said:
I would need the Kernel source for one, and it needs to be this kernel or the official lineage Kernel, I'm not going to add the overclocks if the kernel won't even work with your device
Sent from my LEX727 using XDA Labs
Click to expand...
Click to collapse
So from where i will get the kernel source of this lineage one.
https://drive.google.com/file/d/100PA3BCfRZqgHv1TCRr8AopZm1v9PF6g/view?usp=drivesdk. (Screenshot)
And the rom which i am using is the ported ressurection remix x727 zl1 to Zl0 x722 even bugs are the same and the kernel which i have provided above is extracted from this rom. Edited
Yugps said:
So from where i will get the kernel source of this lineage one.
Click to expand...
Click to collapse
Ask the Kernel dev, and again it has to be this Kernel or the official Lineage one, so it doesn't matter if that other kernel works, I'm not going to maintain two completely different kernels
Sent from my LEX727 using XDA Labs
mosimchah said:
Ask the Kernel dev, and again it has to be this Kernel or the official Lineage one, so it doesn't matter if that other kernel works, I'm not going to maintain two completely different kernels
Sent from my LEX727 using XDA Labs
Click to expand...
Click to collapse
I edited my above post please read again thank you and i will ask @frantisheq for the source code of kernel
@mosimchah
I love your kernel builds, is there any reason I can put this on a 7.1 build? I'm still waiting on a Android 8...
BlocforLife said:
@mosimchah
I love your kernel builds, is there any reason I can put this on a 7.1 build? I'm still waiting on a Android 8...
Click to expand...
Click to collapse
You can't use this on nougat because it's an Oreo kernel, also, I have a separate thread for nougat, so use those builds
Sent from my LEX727 using XDA Labs
Yugps said:
I edited my above post please read again thank you and i will ask @frantisheq for the source code of kernel
Click to expand...
Click to collapse
That's not the kennel source, and again it doesn't matter if that kernel works, you need to get this Kernel working, or the official lineage Kernel
Sent from my LEX727 using XDA Labs
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
*/
ABOUT:
BlackScreen is my custom kernel made for custom aosp/caf roms
This started as just being the kernel in my aicp builds, but as more and more users of other roms started using it I realized I should make a separate thread
================================================== ==================================================
BlackScreen is meant to give you great battery life and performance (depending on how you tune it), essentially I tried to optimize it for everyday usage (gaming, media consumption. browsing the web, all that stuff), I'm not aiming to have the highest Antutu score (although it is very high, it's just not my focus), you see benchmarks don't really reflect actual everyday usage.
The main thing that I do is port good features and optimizations from the various OnePlus 3/3t kernels (they have many great kernel devs and a lot of their work can benefit us too), I also optimize the kernel settings and stuff like that
Currently BlackScreen is included in AICP, and GZR. It is based off of the android linux stable kernel by @nathanchance (He takes caf and upstreams it to the latest from linux stable), with the bringup from @codeworkx, I do my best to keep it up to date with lineage, and Android Linux stable
Downloads
Normal build
OC build
Note:
The -oc zip is simply an overclocked version of the regular build
Install instructions:
In twrp go to the install page, flash the zip, and reboot
Here are some of the features
CPU:
Interactive governor
Ondemand governor
Conservative governor
Powersave governor
Performance governor
darkness governor
Lionfish governor
nebula governor
wheatley governor
lionheart governor
bioshock governor
impulse governor
Alucard governor
ConservativeX governor
Elementalx governor
Nightmare governor
Smartmax governor
Yankactive governor
Despair governor
blu_active governor
Optional overclock
Voltage control
GPU:
Adreno boost
Adreno idler
Screen
kcal
Backlight dimmer
I/O:
Improved deadline
improved cfq
bfq
sio
fiops
tripndroid
sioplus
zen
maple
Virtual memory:
various optimizations
zram
zswap
ksm
entropy:
some optimizations
tcp-algorithms:
bic
westwood
htcp
hstcp
vegas
scalable
lp
veno
yeah
illinois
hybla
Misc:
dynamic fsync toggle
Many more optimizations
Several wakelocks have been blocked
Added the ability to tweak the thermal throttle settings for the CPU (be very careful with this)
USB fast charge
faster unlock
improved network performance
Option to enable the disabled gentle fair sleepers
Option to enable software crc control
vibrator intensity control
arch power savings
Thanks to:
darkobas
codeworkx
Sultanxda
Franco
Flar2
dabug123
GalaticStryder
nathanchance
mosimchah
DD3Boh
There are many more
Source:
Telegram group:
https://t.me/BlackScreenKernel
Regular build:
https://github.com/AICP/kernel_leeco_msm8996/tree/o8.1
Overclocked build:
https://github.com/mosimchah/kernel_leeco_msm8996/tree/o8.1-oc
XDA:DevDB Information
[KERNEL] [8.x] BlackScreen (for the Max2 aka x2, X820,X822,x829), Kernel for the LeEco Le Max 2
Contributors
KuranKaname
Kernel Special Features:
Version Information
Status: Stable
Created 2018-07-14
Last Updated 2018-08-08
This is a work in progress guide to getting great battery life
Note: This guide is meant to be used on my kernel, there's several optimizations that I've left out of this guide because I enabled them by default in my kernel
1. Set the CPU governor to lionfish, or impulse (these will cause lags, interactive is really good enough though)
2. Underclock the big cores to 1900mhz
3. Set the GPU governor to simple_ondemand
4. Set the vibration strength to zero (or close to zero) in the misc section
5. Set the I/O scheduler to noop
6. Go to developer options and turn off the logger buffer sizes (you will have to turn this back on in order to get a logcat for bug reports, and to pass safety net)
7. Use greenify to enable aggressive doze and doze on the go, and use it to limit background apps
8. If you underclock the big cores even more in kernel adiutor you'll get much better battery life, you'll also get much better battery life if you underclock the little cores to 1440MHz (will cause lags under heavy usage)
9. Set all animation durations to .1, or .5 (depending on the options in your ROM) in developer options, never set it to zero on Oreo, it will cause weird issues and fc's in some apps #BlameGoogle
10. In kernel adiutor set the low memory killer values to the aggressive setting
11. Enable dynamic fsync
================================================== ================================================== ================================================== ================================================== ==========
This is a work in progress guide to getting great performance at the expense of battery life
Note: This guide is meant to be used on my kernel, there's several optimizations that I've left out of this guide because I enabled them by default in my kernel
1. Go to developer options and turn off the logger buffer sizes (you will have to turn this back on in order to get a logcat for bug reports)
2. Use greenify to enable aggressive doze and doze on the go, and use it to limit background apps
3. Set all animation durations to .1, or .5 (depending on the options in your ROM) in developer options, never set it to zero on Oreo, it will cause weird issues and fc's in some apps #BlameGoogle
4. Flash BlackScreen overclocked, and use a kernel manager app to set the freqs to the max for the CPU and GPU
5. Enable dynamic fsync
6. Enable ksm, for more free ram, good for gaming
7. Set the CPU governor to wheatley
Kernel Info
Here is some info on my Kernel builds
Info on kernel settings:
######################
CPU governors
source- http://androidmodguide.blogspot.com/...-page.html?m=1
OnDemand:
Ondemand is one of the original and oldest governors available on the linux kernel. When the load placed on your CPU reaches the set threshold, the governor will quickly ramp up to the maximum CPU frequency. It has excellent fluidity because of this high-frequency bias, but it can also have a relatively negative effect on battery life versus other governors. OnDemand was commonly chosen by smartphone manufacturers in the past because it is well-tested and reliable, but it is outdated now and is being replaced by Google's Interactive governor.
Interactive:
Interactive scales the clockspeed over the course of a timer set by the kernel developer (or user). In other words, if an application demands a ramp to maximum clockspeed (by placing 100% load on the CPU), a user can execute another task before the governor starts reducing CPU frequency. Because of this timer, Interactive is also better prepared to utilize intermediate clockspeeds that fall between the minimum and maximum CPU frequencies. It is significantly more responsive than OnDemand, because it's faster at scaling to maximum frequency.
Interactive also makes the assumption that a user turning the screen on will shortly be followed by the user interacting with some application on their device. Because of this, screen on triggers a ramp to maximum clockspeed, followed by the timer behavior described above.
Interactive is the default governor of choice for today's smartphone and tablet manufacturers.
Alucard
A favorite choice and one of the original governors that Alucard_24 made. Alucard is based on ondemand but has been heavily tweaked to bring better battery life and performance. It has been known to be battery friendly without sacrificing much performance.
Blu_active
A new cpu governor developed by eng.stk (featured in his Code_Blue kernels) based on interactive with upstream caf patches and ondemand governor bits too. This governor is mainly focused on performance like the other things the developer creates but it is also well balanced for gaming and general usage.
Bioshock
A mix of ConservativeX and Lionheart. Good balance between battery savings and performance.
ConservativeX:
Also developed by Imoseyon (feat. briefly in the Lean Kernel for Galaxy Nexus), the ConservativeX governor behaves like the Conservative governor with the added benefit of locking the CPU frequency to the lowest interval when the screen is off. This governor may additionally perform hotplugging on CPU1, but there is no documentation to confirm that suspicion at this time.
Conservative:
This governor biases the phone to prefer the lowest possible clockspeed as often as possible. In other words, a larger and more persistent load must be placed on the CPU before the conservative governor will be prompted to raise the CPU clockspeed. Depending on how the developer has implemented this governor, and the minimum clockspeed chosen by the user, the conservative governor can introduce choppy performance. On the other hand, it can be good for battery life
ConservativeX
Also developed by Imoseyon (feat. briefly in the Lean Kernel for Galaxy Nexus), the ConservativeX governor behaves like the Conservative governor with the added benefit of locking the CPU frequency to the lowest interval when the screen is off. This governor may additionally perform hotplugging on CPU1, but there is no documentation to confirm that suspicion at this time.
Darkness
It's based on nightmare but more simple and fast, basic configs but very complex structure. It is an updated version of the nightmare gov, so far it is quite stable in tests,
nightmare info:
A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery. In addition to the SoD is a prevention because it usually does not hotplug.
Pegasusq info:
The Pegasusq / d is a multi-core based on the Ondemand governor and governor with integrated hot-plugging. It is quite stable and has the same battery life as ondemand. Ongoing processes in the queue, we know that multiple processes can run simultaneously on. These processes are active in an array, which is a field called "Run Queue" queue that is ongoing, with their priority values arranged (priority will be used by the task scheduler, which then decides which process to run next).
To ensure that each process has its fair share of resources, each will run for a certain period and will eventually stop and then again placed in the queue until it is your turn again. If a program is terminated, so that others can run the program with the highest priority in the current queue is executed.
Despair
It is a tweaked conservative governor with a couple extra values exposed, it tends to be a bit more conservative with battery than the conservative governor by default. Developed by DespairFactor.
ElementalX
ElementalX is basically a multiphase Ondemand governor that aims to achieve the best balance between battery life and performance. By default, it is more conservative than Ondemand as it does not ramp up often for most phone activities. If there is a graphics load detected, the governor will switch to a two-phase Ondemand behaviour where different max frequencies are used depending on the load increase. ElementalX comes with input boost enabled by default lowering the sampling rate and increasing the frequency to improve responsiveness.
Impulse
An improved version of interactive modified by neobuddy89. Impulse aims to have a balance between battery and performance just like interactive but has some tweaks to save battery.
Lionheart
Lionheart is a conservative-based governor which is based on samsung's update3 source.
The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.
Lionfish
The Lionfish governor combines traits of the conservative, ondemand, and interactive governors. It is designed to maximize battery life without noticeably impacting performance. It responds quickly to heavy loads (similar to ondemand and interactive) while staying within the region of optimal CPU performance per watt. With moderate loads, it periodically votes to raise, maintain, or decrease the frequency. When there are enough votes to change the frequency, it is ramped up and down gradually. The voting mechanism reduces frequency jitter compared to ondemand and conservative. squid2's testing had found that this governor uses moderate frequencies (where efficiency is optimal) more effectively than interactive, ondemand, and conservative. This improved frequency distribution results in a moderate reduction in CPU power consumption while maintaining responsiveness comparable to the interactive governor.
Nebula
A port of the Interactive governor based on msm-4.4 sources with some mods for the HTC 10, preserving the excellent balance between performance and battery life found in many other Interactive based govs. It originated from Eliminater74's Nebula kernel and was a popular choice prior to the introduction of EAS scheduling to the kernel.
Performance
The performance governor locks the phone's CPU at maximum frequency.
Powersave
The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
Smartmax
By default this is configured for battery saving, so this is NOT a gaming or benchmark governor! Additionally, to make it "snappy", smartmax has "touch poke". So input events from the touchscreen will boost the cpu for a specific time to a specific frequency. Developed by XDA user Maxwen.
Wheatley
This governor is build on “ondemand” but increases the C4 (the sleep state) state time of the CPU and doing so trying to save juice. So the results show that Wheatley works as intended and ensures that the C4 state is used whenever the task allows a proper efficient usage of the C4 state. For more demanding tasks which cause a large number of wakeups and prevent the efficient usage of the C4 state, the governor resorts to the next best power saving mechanism and scales down the frequency. So with the new highly-flexible Wheatley governor one can have the best of both worlds. Obviously, this governor is only available on multi-core devices.
Wheatley is a more performance orientated governor as it scales more aggressively than ondemand and sticks with higher frequencies.
Yankactive
A slightly modified interactive based governor by Yank555.lu. It has battery tweaks added onto it so expect better battery life! Based on user reports, this governor behaves more battery friendly than the original interactive governor without sacrificing performance.
I recommend using bioshock for everyday usage, wheatley or interactive for performance. and Impluse or lionfish for battery life
GPU governors (the recommended ones) source http://androidmodguide.blogspot.com/...-page.html?m=1
simple_ondemand: As the name implies, it is a simpler version of the CPU governor ondemand. simple_ondemand will ramp up the frequency when a load is detected. It has a good balance between performance and battery savings.
msm-adreno-tz: The default GPU governor used by Qualcomm for their adreno GPUs. It is based on the ondemand governor but is biased towards performance, therefore it should give better performance in games but less battery life.
I recommend using simple_ondemand for regular usage due to the battery savings
I/O schedulers: (the recommended ones)
source- http://androidmodguide.blogspot.com/...ulers.html?m=1
Deadline:
The goal of the Deadline scheduler is to attempt to guarantee a start service time for a request. It does that by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.
Before serving the next request, the Deadline scheduler decides which queue to use. Read queues are given a higher priority, because processes usually block on read operations. Next, the Deadline scheduler checks if the first request in the deadline queue has expired. Otherwise, the scheduler serves a batch of requests from the sorted queue. In both cases, the scheduler also serves a batch of requests following the chosen request in the sorted queue.
Benefits:
- Nearly a real-time scheduler.
- Excels in reducing latency of any given single I/O
- Best scheduler for database access and queries.
- Does quite well in benchmarks, most likely the best
- Like noop, a good scheduler for solid state/flash drives
Disadvantages:
- If the phone is overloaded, crashing or unexpected closure of processes can occur
The bottom line: A good all-round scheduler. If you want good performance, you should try deadline.
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 (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Benefits:
- Serves I/O requests with least number of CPU cycles.
- Best for flash drives since there is no seeking penalty.
- Good data throughput on db systems
- Does great in benchmarks
- Is very reliable
Disadvantages:
- Reducing the number of CPU cycles corresponds to a simultaneous decline in performance
- Not the most responsive I/O scheduler
- Not very good at multitasking (especially heavy workloads)
The bottom line: Modern smartphones now use Noop as the default scheduler due to the fact that it works quite well with flash based storage. However older devices may experience slower performance when selected. If you want a very simple I/O scheduler algorithm (because of battery life or latency reasons), you can select this.
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.
Benefits:
- Has a well balanced I/O performance
- Excellent on multiprocessor systems
- Regarded as a stable I/O scheduler
- Good for multitasking
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) can sometimes be very high because the number of competing with each other process tasks
- Under constant load, the phone will experience increased I/O latency due to the way how the scheduler tries to create 'fairness'
The bottom line: One of the best all-rounder I/O schedulers available. CFQ is better suited for traditional hard disks, however it may give better throughput under some situations.
BFQ:
Instead 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.
Benefits:
- Has a very good USB data transfer rate.
- The best scheduler for playback of HD video recording and video streaming (due to less jitter than CFQ Scheduler, and others)
- Regarded as a very precise working Scheduler
- Delivers 30% more throughput than CFQ
- Good for multitasking, more responsive than CFQ
Disadvantages:
- Not the best scheduler for benchmarks
- Higher budgets that were allocated to a process that can affect the interactivity and bring with it increased latency.
The bottom line: There are better schedulers out there that will perform better than BFQ. It is quite a complex scheduler that is better designed for traditional hard disks.
SIO (Simple):
Simple I/O aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority queue concepts, but only basic merging. SIO is a mix between noop & deadline. No reordering or sorting of requests.
Benefits:
- It is simple and stable.
- Minimized starvation for inquiries
Disadvantages:
- Slow random write speeds on flash drives as opposed to other schedulers.
- Sequential read speeds on flash drives are not as good as other IO schedulers
- Not the best scheduler for benchmarks
The bottom line:It is a good all-round scheduler. People who want better performance should avoid using this.
FIOPS (Fair IOPS):
This new I/O scheduler is designed around the following assumptions about Flash-based storage devices: no I/O seek time, read and write I/O cost is usually different from rotating media, time to make a request depends upon the request size, and high through-put and higher IOPS with low-latency. FIOPS (Fair IOPS) ioscheduler tries to fix the gaps in CFQ. It's IOPS based, so it only targets for drive without I/O seek. It's quite similar like CFQ, but the dispatch decision is made according to IOPS instead of slice.
Benefits:
- Achieves high read and write speeds in benchmarks
- Faster app launching time and overall UI experience
Disadvantages:
- Not the most responsive IO scheduler (Can make phone lag)
- Not good at heavy multitasking
The bottom line: Most people who use FIOPS will get a noticeable performance improvement. However, you may get issues with scrolling and general lags.
ZEN
ZEN is based on the Noop, Deadline and SIO I/O schedulers. It's an FCFS (First come, first serve) based algorithm, but it's not strictly FIFO. ZEN does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ones. Other than that, it's pretty much the same as Noop blended with VR features.
VR:
Unlike other scheduling software, synchronous and asynchronous requests are not handled separately, but it will impose a fair and balanced within this deadline requests, that the next request to be served is a function of distance from the last request.
Benefits:
- Well rounded IO Scheduler
- Very efficient IO Scheduler
- More stable than VR, more polished
Disadvantages:
- Performance variability can lead to different results (Only performs well sometimes)
The bottom line: It is pretty much a better version of VR, performs quite well and is stable. Overall this is a good choice for most smartphones.
SIOplus
Based on the original SIO scheduler with improvements. Functionality for specifying the starvation of async reads against sync reads; starved write requests counter only counts when there actually are write requests in the queue; fixed a bug).
Benefits:
- Better read and write speeds than previous SIO scheduler
Disadvantages:
- Fluctuations in performance may be observed
The bottom line: If you liked SIO, you will like SIOplus. It performs slightly better in some usage case scenarios, but performance seekers should look else where
Tripndroid
A new I/O scheduler based on Noop, deadline and vr and meant to have minimal overhead. Made by TripNRaVeR
Benefits:
- Great at IO performance and everyday multitasking
- Well rounded and efficient IO scheduler
- Very responsive I/O scheduler (Compared to FIOPS)
Disadvantages:
- Performance varies between different devices (Some devices perform really well, I haven't tested it much on zl1)
The bottom line: Tripndroid isn't really common, there are other schedulers you can choose which may perform similar or better
Maple
Maple is based on the Zen and Simple I/O schedulers. It uses ZEN's first-come-first-serve style algorithm with separate read/write requests and improved former/latter request handling from SIO. Maple is biased towards handling asynchronous requests before synchronous, and read requests before write. While this can have negative aspects on write intensive tasks like file copying, it slightly improves UI responsiveness. When the device is asleep, maple increases the expiry time of requests so that it can handle them more slowly, causing less overhead.
Benefits:
- Well rounded IO Scheduler
- Very efficient IO Scheduler
Disadvantages:
- Performance varies between different devices (Some devices perform really well)
The bottom line: This is still a very new I/O scheduler which should perform slightly better than ZEN. It will continue to improve with more development.
Summary:
Use noop or sioplus for battery life, bfq or Maple for multitasking, fiops for gaming, sioplus or cfq for stability, and deadline for all around performance
CONTINUED ON THE NEXT POST
More info on kernel settings:
Low Memory Killer
source- http://androidcentral.com/fine-tunin...-multi-tasking
FOREGROUND_APP: This is the application currently on the screen, and running
VISIBLE_APP: This is an application that is open, and running in the background because it's still doing something
SECONDARY_SERVER: This is a process (a service that an application needs) that is alive and ready in case it's needed to do something
HIDDEN_APP: This again is a process, that sits idle (but still alive) in case it's needed by an app that's alive and running
For the most part, we never want to adjust when these apps and processes are killed off. They are the things that the programs we use need to properly function. For the more bold and advanced users, changing settings for HIDDEN_APP settings is possible, albeit with a LOT of trial and error. There's two more settings, and these are the ones most interesting to us today:
CONTENT_PROVIDER: This is apps that provide data (content) to the system. Facebook Sync? That's a CONTENT_PROVIDER. So are things like the Google play store. If they are alive, they can refresh and provide the content they are supposed to at the set interval. If you kill them, they can't of course.
EMPTY_APP:They are apps that you have opened, but are done with them. Android uses a unique style of handling memory management. When an activity is ended, instead of killing it off Android keeps the application in memory so that opening them again is a faster process. Theses "ghost" apps use no battery or CPU time, they just fill RAM that would be otherwise empty. When this memory is needed by a different application or process, the RAM is flushed and made available for the new app. Android does this by keeping a list of recently used apps, with the oldest apps in the list given the lowest priority -- they are killed first if RAM is needed elsewhere. This is a perfect way to handle 'ghost' processes
Virtual Memory this is the really fun stuff
source- the Linux kernel documentation https://github.com/AICP/kernel_leeco.../sysctl/vm.txt
dirty_background_ratio:
Contains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which the background kernel flusher threads will start writing out dirty data.
The total available memory is not equal to total system memory.
dirty_ratio:
Contains, as a percentage of total available memory that contains free pages and reclaimable pages, the number of pages at which a process which is generating disk writes will itself start writing out dirty data.
The total available memory is not equal to total system memory.
dirty_expire_centisecs:
This tunable is used to define when dirty data is old enough to be eligible for write out by the kernel flusher threads. It is expressed in 100'ths of a second. Data which has been dirty in-memory for longer than this interval will be written out next time a flusher thread wakes up.
dirty_writeback_centisecs:
The kernel flusher threads will periodically wake up and write `old' data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second.
Setting this to zero disables periodic write back altogether.
extra_free_kbytes:
This parameter tells the VM to keep extra free memory between the threshold where background reclaim (kswapd) kicks in, and the threshold where direct reclaim (by allocating processes) kicks in.
This is useful for workloads that require low latency memory allocations and have a bounded burstiness in memory allocations, for example, a realtime application that receives and transmits network traffic (causing in-kernel memory allocations) with a maximum total message burst size of 200MB may need 200MB of extra free memory to avoid direct reclaim related latencies.
min_free_kbytes:
This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a watermark[WMARK_MIN] value for each lowmem zone in the system.
Each lowmem zone gets a number of reserved free pages based proportionally on its size.
Some minimal amount of memory is needed to satisfy PF_MEMALLOC allocations; if you set this to lower than 1024KB, your system will become subtly broken, and prone to deadlock under high loads.
Setting this too high will OOM your machine instantly.
oom_kill_allocating_task:
This enables or disables killing the OOM-triggering task in out-of-memory situations.
If this is set to zero, the OOM killer will scan through the entire tasklist and select a task based on heuristics to kill. This normally selects a rogue memory-hogging task that frees up a large amount of memory when killed.
If this is set to non-zero, the OOM killer simply kills the task that triggered the out-of-memory condition. This avoids the expensive tasklist scan.
If panic_on_oom is selected, it takes precedence over whatever value is used in oom_kill_allocating_task.
The default value is 0.
swappiness:
This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. A value of 0 instructs the kernel not to initiate swap until the amount of free and file-backed pages is less than the high water mark in a zone.
zRam
source- https://source.android.com/devices/t...ter#page-cache
zRam creates a compressed swap file in your RAM. The compression factor is the gain: with that, you "increase" your RAM. This improves performance, even on a device with 4/6GB of RAM
Misc
Vibration strength:
Obviously this controls the strength of the vibrations, setting this to a lower value will increase battery life, setting it to zero will disable all vibrations (Kind of, you'll still get a very subtle vibration, but chances are you won't even notice it)
TCP CONGESTION ALGORITHMS:
source- http://androidmodguide.blogspot.com/...ithms.html?m=1
Tahoe:
Limits unknown packets being received. Limits the congestion window, and reset itself to a slow-start state.
Reno:
Basically the same as Tahoe, but if 3 of the same packets are received, it will halve the window, instead of reducing it to one. It changes the slow start threshold equal to that of the congestion window.
Cubic:
One of the best, most recommended TCP options available. Less aggressive, Inflects the windows prior to the event. Used in Linux.
Vegas:
One of the smoothest TCP algorithms(next to cubic), it increases the timeout delay for packets, which allows more to be received, but at a higher rate. It also has set timeouts, which helps with speed because it's constantly being refreshed.
Veno:
Veno is closely related to Vegas, it is a combination of Vegas and Reno in order to enhance TCP performance over Wireless networks.
Low Priority (LP):
A distributed algorithm whose goal is to utilize only the excess network bandwidth as compared to the "fair share" of bandwidth as targeted by TCP. The key mechanisms unique to TCP-LP congestion control are the use of one-way packet delays for early congestion indications and a TCP-transparent congestion avoidance policy.
Binary Increase Congestion control (BIC):
BIC is optimized for high speed networks with high latency: so-called "long fat networks". It has a unique congestion window (cwnd) algorithm. This algorithm tries to find the maximum where to keep the window at for a long period of time, by using a binary search algorithm.
Scalable:
Scalable calls for congestion window to be halved for each packet lost. Effectively, this process keeps halving the throughput until packet loss stops. Once the packet loss subsides, slow start kicks in to ramp the speed back up.
Hamilton TCP (HTCP):
HTCP is designed for high-speed, long distance networks that increases aggressiveness as the time since the previous loss increases. It is thought to be a more efficient TCP algorithm than BIC and HSTCP.
Illinois:
Illinois is designed for high-speed, long-distance networks. A sender side modification to the standard TCP congestion control algorithm, it achieves a higher average throughput than the standard TCP and allocates the network resource fairly as the standard TCP.
High speed (HSTCP):
High Speed TCP (HSTCP) is a new congestion control algorithm protocol for TCP. Standard TCP performs poorly in networks with a large bandwidth delay product. It is unable to fully utilize available bandwidth. HSTCP makes minor modifications to standard TCP's congestion control mechanism to overcome this limitation.
Yeah-TCP:
A high speed TCP congestion control algorithm which uses a mixed loss/delay approach to calculate congestion windows. Its purpose is to target high efficiency, fairness, and minimizing link loss while keeping network elements load as low as possible.
Hybla:
Penalizes connections that use satellite radio. Not usually used with phones
Westwood:
A newer version of Reno, and another commonly used one. It controls parameters better, helping out streaming and overall quality of browsing the internet. One of the most 'fair' algorithms out there, and is one of the most efficient algorithms to date.
I recommend using Westwood for everything, and only use cubic if all you care about is maximum stability and don't mind losses in performance, and latency, and stuff like that
I Can say it is very good, and performance is really noticeable.
I tried so many ROMS, AICP was easily the best and now i know why.
keep it up.
I like new software thingies for our devices. Thank you... ?
I have installed it on MSM which is already having blackscreen . I didnt notice any improvement in performance .....battery drain i am testing it now.. will update soon
venky83 said:
I have installed it on MSM which is already having blackscreen . I didnt notice any improvement in performance .....battery drain i am testing it now.. will update soon
Click to expand...
Click to collapse
This release was a kernel clean up from all the crappy stuff and some things done a bit different
When will you upload a zip with oc kernel?
This might be a stupid question, but where do you find the options to follow your battery saving guide? Is it in the settings somewhere or via an app you have to install?
I'm on MSM.
Installed on Aosip the battery drops very quickly even without using the phone
The best described thread I have seen! Using with ACIP .Sot 3.30h but my battery is dead :/
immortal68 said:
this might be a stupid question, but where do you find the options to follow your battery saving guide? Is it in the settings somewhere or via an app you have to install?
I'm on msm.
Click to expand...
Click to collapse
ka, fku, ekm
https://drive.google.com/file/d/1n3MXmTCf9YX7VB5JaqOUvVA7xqe4DQUH/view?usp=sharing
OC build
KuranKaname said:
ka, fku, ekm
Click to expand...
Click to collapse
Sorry, what? I don't know what this is supposed to mean.
Immortal68 said:
Sorry, what? I don't know what this is supposed to mean.
Click to expand...
Click to collapse
Did you check page 1 completely?
rohit3192 said:
Did you check page 1 completely?
Click to expand...
Click to collapse
I skimmed over everything a few times already. There are a few dead links for me, but nothing I saw answered my question.
Maybe my wording was unclear? To reiterate: How do you change governors and the rest pointed out in #2? Do you need an app for that? Or is it embedded in android settings?
Immortal68 said:
Sorry, what? I don't know what this is supposed to mean.
Click to expand...
Click to collapse
Kernel Adiutor, franco kernel manager, EX Kernel Manager. All those are apps on the play store. Kernel adiutor is free. You also need root
Immortal68 said:
I skimmed over everything a few times already. There are a few dead links for me, but nothing I saw answered my question.
Maybe my wording was unclear? To reiterate: How do you change governors and the rest pointed out in #2? Do you need an app for that? Or is it embedded in android settings?
Click to expand...
Click to collapse
Yeah I know the links are dead. Didn't have time to fix those little ****ers
@KuranKaname
nAice MAN!!!
Long time...
Good to see you been following op3/t kernels
Could not see if OP mentions compatible ROMs...
few keywords EAS, kernel hardening from CopperheadOS, DTS eagle, any good features from Lambda kernel
Please comment if you are considering any of it/already included
If you include it(i know it's DAMN hard) will switch to lemax 2 from my 3T
@KuranKaname Is it possible to add dt2s?
This thread is all about kernel things. I will be trying to provide a brief explanation regarding most of the features & options available in custom kernels. There are two custom kernel which are maintained for our device.
Disclaimer: I in no way claiming that information available in this thread is 100% correct.
Brief History about these custom kernels.
1. Chimera Kernel by rupanshji
This is a custom kernel based on Nichcream & Team Reloaded’s kernel source code with features added by the developer. This kernel has spectrum support. Talking about updates, Chimera is not updated frequently.
Source Code | Thread
Download link: Google Drive | Older Builds
2. Jasper Kernel by Pawan.S 5277!
This is a custom kernel based on msm-3.18 kernel source code with features and patches added by the developer. Jasper is updated whenever a new CAF tag is available (as mentioned in OP & what I have noticed).
Source Code | Thread
Download link: AndroidFileHost | MediaFire
3. Spicy Kernel by DyWN
Temporarily discontinued.
Kernel Managers
EX Kernel Manager
Kernel Auditor
Features and Options available in at-least one of the custom kernels mentioned above are mentioned below along with a brief description about them.
GOVERNORS
1. Alucard: This govenor is based on ondemand but has been heavily tweaked to bring better battery life and performance. It has been known to be battery friendly without sacrificing much performance.
2. Blu_active: A governor developed by eng.stk (featured in his Code_Blue kernels) based on interactive with upstream caf patches and ondemand governor bits too. This governor is mainly focused on performance like the other things the developer creates but it is also well balanced for gaming and general usage.
3. Clarity: Basically this from interactive CAF with additional tunables and tweaks. such as: Remove boost functional - Limit max frequency when screen off. Using relation CPU frequency Current (C) (Low power as possible). - additional down load tunable.
4. Conservative: This governor biases the phone to prefer the lowest possible clock-speed as often as possible. In other words, a larger and more persistent load must be placed on the CPU before the conservative governor will be prompted to raise the CPU clockspeed. Depending on how the developer has implemented this governor, and the minimum clockspeed chosen by the user, the conservative governor can introduce choppy performance. On the other hand, it can be good for battery life.
The Conservative Governor is also frequently described as a "slow OnDemand". The original and unmodified conservative is slow and inefficient. Newer and modified versions of conservative (from some kernels) are much more responsive and are better all around for almost any use.
5. Darkness: It's based on nightmare but more simple and fast, basic configs but very complex structure. It is an updated nightmare gov and improved stability, so far it is quite stable in tests.
6. Electron: This is a governor based on interactive from the latest MSM8994 CAF branch with more upstream improvements, powersave bias, screen off max frequency, and some other tweaks to improve battery life without hindering performance.
7. Interactive: This governor scales the clockspeed over the course of a timer set by the kernel developer (or user). In other words, if an application demands a ramp to maximum clockspeed (by placing 100% load on the CPU), a user can execute another task before the governor starts reducing CPU frequency. Because of this timer, Interactive is also better prepared to utilize intermediate clockspeeds that fall between the minimum and maximum CPU frequencies. It is significantly more responsive than OnDemand, because it's faster at scaling to maximum frequency.
Interactive also makes the assumption that a user turning the screen on will shortly be followed by the user interacting with some application on their device. Because of this, screen on triggers a ramp to maximum clockspeed, followed by the timer behavior described above.
8. Lisi: This governor is less aggressive and works similar to Alessa. This driver adds a dynamic cpufreq policy governor & designed for latency-sensitive workloads. The governor does a periodic polling and changes frequency based on the CPU utilization.
9. Nightmare: A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery. In addition to the SoD is a prevention because it usually does not hotplug.
10. Ondemand: This is one of the original and oldest governors available on the linux kernel. When the load placed on your CPU reaches the set threshold, the governor will quickly ramp up to the maximum CPU frequency. It has excellent fluidity because of this high-frequency bias, but it can also have a relatively negative effect on battery life versus other governors. OnDemand was commonly chosen by smartphone manufacturers in the past because it is well-tested and reliable, but it is outdated now and is being replaced by Google's Interactive governor.
11. Performance: The performance governor locks the phone's CPU at maximum frequency.
12. Powersave: The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
13. Schedutil: This is a new EAS governor found in recent versions of the Linux Kernel (4.7+) that aims to integrate better with the Linux Kernel scheduler. It uses the kernel's scheduler to receive CPU utilisation information and make decisions from this input. As a direct result, schedutil can respond to CPU load faster and more accurate than normal governors such as Interactive that rely on timers.
14. Userspace: This governor, exceptionally rare for the world of mobile devices, allows any program executed by the user to set the CPU's operating frequency. This governor is more common amongst servers or desktop PCs where an application (like a power profile app) needs privileges to set the CPU clockspeed.
CPU Scheduler options... Search yourself.
THERMAL
1. Msm thermal is a kernel platform driver which regulates thermal conditions on the device during kernel boot. The goal of MSM_THERMAL is to prevent the temperature of the system from exceeding a thermal limit at which it cannot operate. Examples are CPU junction thermal limit, or POP memory thermal limit. The MSM_THERMAL driver polls the TSENS sensor hardware during boot, and reduces the maximum CPU frequency allowed in steps, to limit power/thermal output when a threshold temperature is crossed. It restores the maximum CPU frequency allowed in the same stepwise fashion when the threshold temperature (with hysteresis gap) is cleared.
2. Core Control Enable / disable throttling, this enables the thermal engine and enable VDD restriction and core throttle.
3. VDD Restriction Limits CPU voltage, limiting it will decrease temperature.
HOTPLUG OPTIONS
1. AiO_hotplug: An all in one HotPlug for Traditional Quad-Core and Hexa/Octa-Core big.LITTLE SoCs.
2. Autosmp: A highly-efficient hotplug driver, works in-sync with the CPU governor to enable off-line cpu cores when the the CPU frequency reaches a high threshold and still more compute power is needed. Therefore, touch boost bloat is removed.
GPU OPTIONS
Min GPU Freq: 216Mhz Max GPU Freq: 500 Mhz
GPU Governor:
1. msm-adreno-tz: The default GPU governor used by Qualcomm for their adreno GPUs. It is based on the ondemand governor but is biased towards performance, therefore it should give better performance in games but less battery life.
2. Performance: As the name suggests, this keeps your GPU running at the max frequency. This is a governor if you want the best possible experience in games but you don't care about your battery life.
3. Powersave: Like the CPU governor, this keeps your GPU running at the lowest possible frequency. Best battery life, extreme lag in games.
4. Simple_ondemand: As the name implies, it is a simpler version of the CPU governor ondemand. simple_ondemand will ramp up the frequency when a load is detected. It has a good balance between performance and battery savings.
Note: There are many other broken GPU Governors. Do not select them. If you are using Chimera, then your device will reboot if you try to select them.
GPU Boost: If you are using msm-adreno-tz governor, then you can configure GPU boost option also. Use ExKM to configure this additional option.
Adreno Idler: It is an idling algorithm, an efficient workaround for msm-adreno-tz's overheads. Main goal is to lower the power consumptions while maintaining high-performance. Since msm-adreno-tz tends to *not* use the lowest frequency even on idle, Adreno idler replaces msm-adreno-tz's algorithm when it comes to calculating idle frequency(mostly by ondemand's method). The higher frequencies are not touched with this algorithm, so high-demanding games will (most likely) not suffer from worsened performance.
COLOR CONTROL
Self-explanatory
SCREEN OPTIONS
Backlight Dimmer: Enable only at night times.
GESTURE OPTIONS
1. DoubleTap2Wake
2. Sweep2Wake
3. Sweep2Sleep
All of them are self-explanatory
Pro tip: Use KA if using chimera or ExKM if using Jasper to configure gesture options.
GESTURE VIBRATION
You can the intensity of vibration for the gestures.
VOLTAGE
You can decrease or increase the voltage globally or per core by adjusting the values.
Pro tip: Just don’t play with this unless you’re pro. AFAIK, both custom kernels have under-voltage values according to CPU cluster so doing further can for sure cause in-stability issues.
SOUND
You can decrease or increase the headphone digital gain, mic gain or speaker gain by configuring settings under sound tab.
MEMORY
Low Memory Killer: is a process killer, which is designed to work in cooperation with the Android Framework. Each process is assigned a special value by the Framework when started, the oom_adj value(oom_score_adj on newer kernels). This value defines how important the process is for the system(its priority), and thus how easily it can be killed. Values vary between -17 and +15(0 to 1000 for oom_score_adj). Higher values are given to less important processes which are killed first. Moreover, LMK defines 5 different categories for processes, each one containing processes with oom_adj/oom_score_adj in a specific range of values:
1. Foreground Applications: The application currently shown on the screen and running.
2. Visible Applications Applications that might not be shown on the screen currently, but are still running. They might be hidden behind an overlay or have a transparent window.
3. Secondary Server Services running in the background and needed for Apps to function properly. This category includes Google Play Services for example.
4. Hidden Applications Applications that are hidden from the user, but are running in the background.
5. Content Providers These are the services providing content to the system like contacts provider, location provider etc.
6. Empty Applications This category contains Applications that the user exited, but Android still keeps in RAM. They do not steal any CPU time or cause any power drain.
ZRAM OPTIONS
zRAM is just compressed RAM space. So you can store more in RAM by compressing the data you can fit more data inside your RAM.
Now obviously it is slower than actual normal RAM (since you have to encrypt and decrypt the data), but apparently it still is faster than using swap (which is in your internal memory rather than RAM). The principle works based on that Android prefers to keep data stored as much as possible in RAM to keep recently used apps running quickly. The more you use an app the more priority it has, therefore will stay in normal RAM, things you use sometimes but not very often are kept in zRAM (regardless of how full your actual RAM is), but since you don't use this very often you don't notice the performance hiccup of decrypting that data.
Then last case scenario things you barely use are kept in swap.
For you IT enthusiasts you should have realised already that "z" is the technology prefix for Compression. So it shouldn't come as a surprise that zRAM is compressed RAM.
zRAM Size: 1 GiB is a fairly balanced amount. According to Google, it is useful even on devices with 4 GB of ram because it helps reduce page cache
thrashing, or constant unloading and reloading of cached pages from disk.
zRAM Compression: lzo or lz4
VIRTUAL MEMORY OPTIONS
Dirty Ratio & Dirty Background Ratio: Most people say that these need to be high, so that more stuff is stored in Cache. This will make your phone quick. Because cache is quick. But in reality this is only good advice if all you need to load on your phone is the system UI. Because as soon as you start loading different apps this cache fills quickly, and whenever you want to open an app/file/webpage that is not in cache, your CPU is tasked with both emptying whatever is filling up cache memory and load your new app into cache. Thus making multitasking a nightmare within the first day. A simple reboot of the phone is not enough, nor is clearing RAM (Note: Cache is not RAM).
Overcommit Ratio: While increasing allows more multitasking, I recommend leaving this at 0. It keeps RAM from completely filling up, thus avoiding "app xxx not responding" issues.
I/O OPTIONS
I/O Scheduler:
1. BFQ: Instead 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.
2. CFQ: This 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.
3. Deadline: The goal of the Deadline scheduler is to attempt to guarantee a start service time for a request. It does that by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.
4. Fiops: This new I/O scheduler is designed around the following assumptions about Flash-based storage devices: no I/O seek time, read and write I/O cost is usually different from rotating media, time to make a request depends upon the request size, and high through-put and higher IOPS with low-latency. FIOPS (Fair IOPS) I/O scheduler tries to fix the gaps in CFQ. It's IOPS based, so it only targets for drive without I/O seek. It's quite similar like CFQ, but the dispatch decision is made according to IOPS instead of slice.
5. 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 (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
6. Maple: Maple is based on the Zen and Simple I/O schedulers. It uses ZEN's first-come-first-serve style algorithm with separate read/write requests and improved former/latter request handling from SIO. Maple is biased towards handling asynchronous requests before synchronous, and read requests before write. While this can have negative aspects on write intensive tasks like file copying, it slightly improves UI responsiveness. When the device is asleep, maple increases the expiry time of requests so that it can handle them more slowly, causing less overhead.
7. Sio: Simple I/O aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority queue concepts, but only basic merging. SIO is a mix between Noop & deadline. No reordering or sorting of requests.
8. Zen: It is based on the Noop, Deadline and SIO I/O schedulers. It's an FCFS (First come, first serve) based algorithm, but it's not strictly FIFO. ZEN does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ones. Other than that, it's pretty much the same as Noop blended with VR features.
More info can be found here.
MISCELLANEOUS
TCP Congestion algorithm: Available choices are bic, cubic, lp, reno & westwood.
More info can be found here.
My recommendation: Try both custom kernel for atleast two days and then decide which suits your need. And use ExKM to configure Jasper as some of the options available in that kernel are not available in KA.
References: Source 1 | Source 2 | Source 3
Reserved
Thnx its very usefull to know about the governers
Nois tutorial!
Just a correction. You can use exKernel manager with chimera. I recommend KA to prevent piracy. Most of the peeps pirate exkernel manager usually.
rupanshji said:
Nois tutorial!
Just a correction. You can use exKernel manager with chimera. I recommend KA to prevent piracy. Most of the peeps pirate exkernel manager usually.
Click to expand...
Click to collapse
I mentioned KA for Chimera because when i tried this kernel, Wake gestures were working better with KA and not EX Kernel Manager.
If you want, I can amend OP according to your preference.
Nice good topic, thanks