Ubuntu benchmark & storage scheduler/buffer size - Galaxy S 4 Q&A, Help & Troubleshooting

Greetings fellow flashers… much as I´ve tried to UTFSE I haven’t found a clear answer/info to the question in object, so here goes
When I run the standard test on* Ubuntu I can get a quite varied range of results for my phone – from about 15.000 to a shave under 30.000. Unsurprisingly enough, most of the variations in these results come from the CPU governor, settings related hotplug mechanism and the GPU… one group of options I never previously touched were the I/O options (scheduler for internal storage was always on the standard “CFQ” and I also left the read ahead buffer size to its default settings)
Today I decided to give these options a go and here´s where the surprise came: pretty much any option I tried simply trounced my “optimal” results of approx.. 30´ 000 points… I tried a couple of I/O schedulers (I remember sioplus and zen for sure) and as far as the the increasing the to 1024 kb (instead of the standard 128kb for internal and 256 for external)… the effect of changing the scheduler was to reduce the ubuntu score to about 20´000 (best case) and sometimes quite a bit less than that…. So now for the questions:
1. What exactly is the effect of these scheduers & the buffer?
2. Why do these changes in scheduler/buffer size, which have no clear effect
3. Are there optimal settings for these schedulers & buffer size? Does changes in the settings have any consequence on battery life?
*
thanks in advance for all your feedback!
Platypus

Bump - can anyone help ?

The I/O scheduler has to do with reading and writing data, basically. I can't really explain it.
Having a different scheduler can give you better ui responsivness and app opening times. Results vary.
ZEN is said to be better for gaming. FIOPS seems to be the best all-round performer. And bfq is battery friendly.
Increasing the cache size should also benefit. A 2048kb size should be enough.
Don't expect wonders, though.

Related

CPU Tuner & VM Heap Size

hi all,
this is setting of mine at my Aria CM 7.1.0
CPU Tuner
On Battery, Screen Locked, Call in:
Freq: 245-600MHz
Governor: Conservative(Thresholds up:95 down:50)
On Power:
Freq: 245-845MHz
Governor: OnDemand(Thresholds up:50)
No Services Switch
CyangeMod Setting (setting>cyangenmod setting>performance)
VM Heap Size
48M
Disable Surface dithering
i feel after that battery usage feel a little bit better.
set VM heap size to max 48M, it let application run smoothly but less CPU usage. because phone like Aria CPU is low end so i think max VM heap size can share process work with CPU. after this setting my Aria RAM always around 30-40MB free. (i have 230 apps total, 2 game app only, 200MB App2ext4, dalvik-cache size 140MB, internal storage always lower than 33MB)
CPU set to conservative up95 down 50, is make cpu not rise up freq too early, and go down in resasonable value, in conservative mode cpu go down faster to save battery.
anyone like to try this setting to see is it good or bad?or make this more improve.
i very much love my Aria, small size, great out look, but sadly its not good in spec, but i still work to make it good and keep as long as i can.
btw, sorry for my poor english.
Interesting
Does disable surface dithering can make perfomance better?
Increase Internal Memory
Why dont you extend the internal memory by partition external memory and then use s2e, ungaze other apps or script or just by hack?

[GUIDE] [STARTER] Custom Kernel Features Explained! [5/20/2013]

This is a simple STARTER GUIDE to kernel features/parameters and everything you need to know about custom kernel goodies before you consider flashing them. Now that there are a few custom kernels out there for our device, you may want to know about these.
I’d be glad if you could help me complete this guide.
First of all I’d like to thank all kernel guys who put countless hours into this to bring us the features which I am going to explain soon.
Overview:
Post 1:
A.: What you want to know about the CPU/GPU of your device
B.: Custom Kernel Features
Post 2:
Coming Soon!!!
A: What you may want to know about the CPU/GPU of your device:
Galaxy Note 10.1 features a 1.4GHz Quad Core CPU (Exynos 4412) and a 400MHz GPU (Mali-400).
More Data will be added soon.
B.1: CPU/GPU/IO Features which comes with Custom Kernels:
OC/UC (As for OverClock/UnderClock):
As you may know, CPU or any other processing unit features a clock frequency. Over/Under Clock simply means raising/decreasing the clock frequency of CPU.
Reason: Why would one need to overclock? Because one needs more processing power. For example if you want to experience smoother gameplay when playing high-graphic games.
Why would we need underclock? Higher processing power demands more battery. So underclocking helps us, reserve more battery. As for HOX, searching internet and texting don’t need much of processing power. So we can limit the processing power and save battery during low use of our device.
•Note1: OC/UC is not limited to CPU. GPU is also capable of OC/UC. And the interface for that is NOT available in the current custom kernels of Note 10.1.
•Note2: Gamers may not use GPU UC. Limiting GPU processing power impact significantly on your gaming experience.
UV (As for Undervolt):
Every frequency of a processing unit, demands a certain amount of power to be supplied. Undervolting to put it simple means decreasing the voltage of a certain frequency (or all of them).
Reason: The more voltage CPU/GPU gets, more heat will be generated. So mainly we UV to decrease the generated heat of CPU/GPU.
•Note1: One Frequency needs a certain minimum amount of voltage to perform correctly and the system be stable. Undervolting more than a certain amount of voltage will cause system instability.
•Note2: UV improves battery life by using less power. See this.
CPU Governors:
Frequency scaling is the means by which the Linux kernel dynamically adjusts the CPU frequency based on usage of the device. Governors refer to schemes which dictate to the kernel how it should do these adjustments. (From rootzwiki)
To put it simple, Governors are the way that CPU frequency is adjusted according to the demand of operating system.
Selecting a proper governor for your CPU is crucial to the performance and battery preserving of your device. For example if you are low using your device you may use a more battery friendly governor and if you want to play games you may use a more power consuming performance governor.
•Note: See Droidphile’s Great Guide about Governors to be familiar with each one of them and the ones that you should use in different situations here.
I/O Schedulers (As for Input/Output):
Input/output (I/O) scheduling is the method that computer operating systems use to decide which order block I/O operations will be submitted to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'. (From Wikipedia)
To put it simple, Schedulers are the way reading and writing to the SD card is managed.
The same things that is said in the Governors part is applied here, too.
•Note: See Droidphile’s Great Guide about Schedulers here.
ReadAhead buffer size:
In terms of reading data from SD card, there is a cache which is used as a buffer. The size of that cache is readAhead buffer size. The size has a direct impact on your reading speed of your SD. So giving it a right amount is crucial.
File System “X” R/W (As for Read/Write):
Android by default doesn’t support all the File Systems (What are file systems?! See here). So some kernels may add certain file system R/W. The most popular unsupported file system is NTFS.
B.2 Features of Custom Kernels (AKA Goodies!!!):
MultiCore PowerSaving:
This feature try to group up tasks in the least cores possible. To put it simple, it will focus in using least cores for your tasks to be done. This means less cores are active and so more battery life. Also this will decrease performance.
•Note: To enable use TricksterMod app. 0 for disable and 2 for the most aggressive.
CIFS:
In order to manage your cifs/nfs network shares on your Android device you need the proper and working modules. And so you can mount/unmount your network accessible file resources and access your data.
B.3 Other Features:
Init.d Support:
There are some scripts that run every time your device boot up which are located in /etc/init.d Those are called init.d scripts. One of the most popular init.d scirpts that is available for Note 10.1 is this.
Eco Mode - NEW:
Eco Mode is an optimized dual core solution for quad-core SOC (System on Chip) like the Qualcomm S4-pro. This should allow for Maximum battery life without sacrificing performance. - Paul Reioux
TCP Congestion Control:
The choices in this section, address how the operating system kernel manages flows of information in and out of the kernel, which is at some level the "switchboard operator" of your handset. More info here.
Better to leave this options as is. Cubic or Westwood as the default of your kernel.
Dynamic FSync - NEW:
fsync is a system call in Unix/Linux. "man fsync" says:
fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other permanent storage device) so that all changed information can be retrieved even after the system crashed or was rebooted. This includes writing through or flushing a disk cache if present. The call blocks until the device reports that the transfer has completed. It also flushes metadata information associated with the file (see stat(2)).
Click to expand...
Click to collapse
So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data. (From here).
Dynamic FSync, makes it possible for fsync operation to be asynchronous when the screen is on, and synchronous when the screen is off. And what does asynchronous mean? Means OS issues fsync call, but not necessarily immediately at commit time for each transaction. It delays the FSync call for a certain amount of time. In case of a crash, the transactions not yet sync'ed in the last delay time before the crash may be rolled back, but the state of the data is always consistent. (From here).
zRAM:
In order to explain zRAM more precisely first we need other terms defined clearly:
Swap can be compared with the swap file on Windows. If the memory (RAM) is almost complete, the data which is not used actively (ex. background applications) will be stored on hard drive so as to re-evacuate RAM free. If required, this data is then read back from there easily. This will preserve performance with no lose at multitasking (the main reason we use swap).
In zRAM unnecessary storage resources are compressed and then moved to a reserved area in the fixed RAM (zRAM). So in other words, zRAM is a kind of swap in memory. As the data is compressed not much memory needs to be preserved as zRAM. However, the CPU has to work more because compressed data has to be unpacked again when it is needed). The advantage clearly lies in the speed. Since the swap partition in RAM is much faster than this is a swap partition on a hard drive.
In itself a great thing. But Android does not have a swap partition, and therefore brings Android ZRAM under no performance gain as would be the case with a normal PC. (From here with some editing.)
Click to expand...
Click to collapse
What we need to know essentially lies here:
zRAM off = Low use data will be stored the way they are in the memory. This will cause no extra load on CPU, yet need more RAM.
zRAM on = Low use data will be stored compressed in the memory. This will cause extra load in CPU as to store or restore data, yet preserve more Free RAM.
The main use of zRAM is when you are using a heavy ROM that eats up all your RAM. This will allow multitasking to be more functional. On light ROMs, or for those who don't multitask much, this is not necessary.
Note: Also there are methods to use a part of internal memory as Swap space. This is not as fast as zRAM. But no RAM will be used at all and CPU load is less. Though I am not sure that this has been brought to our device yet. Will add more data soon on this part.
Work in progress, will add more info soon.
Reserved for OP
csec said:
•Note2: UV does not impact battery life (or it is not noticeable).
Click to expand...
Click to collapse
First of all, I would like to praise this guide for its information and depth, secondly I would like to help improve it;
emprize said:
the only different for me is temperature, for battery saving, always not noticeable for me, placebo effect most likely
Click to expand...
Click to collapse
AndreiLux said:
This is a nonsensical argument, temperature aka heat, is power. If you are getting a less heated phone, then your battery life is improving. If this wouldn't be the case then you are holding the solution to the world's energy problems in your hands.
Click to expand...
Click to collapse
just thought i would share some thoughts of a well respected and knowledgeable developer.
http://forum.xda-developers.com/showthread.php?p=36723175#post36723175
Regards
Jack
JSale said:
First of all, I would like to praise this guide for its information and depth, secondly I would like to help improve it;
just thought i would share some thoughts of a well respected and knowledgeable developer.
http://forum.xda-developers.com/showthread.php?p=36723175#post36723175
Regards
Jack
Click to expand...
Click to collapse
Wow, that was hell of an argument. Seems to be theoretically true. What I referred to in above is real life experience with my phone and according to kernel guys down at HOX forums.
However the information was really interesting. I will add it to the OP.
Thanks.
Sent from my GT-N8000 using Tapatalk HD
Recently Added to the OP:
- Eco Mode
- Dynamic FSync
zRAM added to the guide.

[Guide] I/O scheduler

If you don’t know what`s an I/O scheduler or want to know the working of each scheduler read this http://forum.xda-developers.com/showpost.php?p=23616564&postcount=4 Thanks to droidphile
Thanks to @KNIGHT97 for his tips and experience http://forum.xda-developers.com/showthread.php?t=2784750 he inspired me to do this
Introduction
Every Scheduler has its advantage and disadvantage, so its difficult to find what suits you. So I have come up with a guide to help those people decide the right I/O scheduler according to their usage.
This guide is from my observation, the information below may or may not be accurate. If the scheduler doesn’t work as well as mentioned below, then maybe your kernel has a different version of the scheduler.
People most often use benchmarking apps to find a good I/O scheduler, but that’s the wrong way to go. First off all the benchmarks results are similar for each scheduler.
Let me tell you how a scheduler can affect your performance
Some scheduler try handling multiple operations at one time (Uses more CPU and battery) while others do few or only one at a time (Use less CPU and saves battery)
Let’s take an example, copying few big files one at time is faster than copying all at once… So at situation like that I/O scheduler that does one at time is good
But when there is multiple small files, the speed is very slow when copying one at a time but copying many at once is faster… So here we can say I/O scheduler that handle multiple operation is better
When I mention light I/O operation, it means the file size is small or if its writing a big file it doesn’t need high speed(like a long non-HD video recording) and as for heavy I/O operation means it’s reading/writing a big file
If an app requests read/write one at a time or does requests multiple,its performance can be affected by the scheduler accordingly
I/O scheduler
CFQ (Completely Fair Queuing)
CFQ it is said to work well with multi core processor and balances both write a read. It handles multiple operations real well but can be slow if most of the operation is read and little write (maybe cause its reserving place for another write operation /?)
Many people say that the media scanning is really, and I agree to it. (I have like 300 apps on my 64GB sandisk microSD and it is overloaded with many big and small files, So… I can easy tell the difference cause it takes like 1:30 minutes before the externalSD apps icon to load while on other scheduler it takes around 30 sec to 1 min
Ideal if you download files a lot and use apps that mainly read files(like music/ videos) or you use apps that needs to read and write equally.
ROW (Read Over Write)
It is just like CFQ but just as the name implies, it gives priority for reading. It also handles multiple operations real well.
Its ideal when you run apps has more read operations and little write
So if you use more multiple reading operations(like gallery). Row is the best scheduler for you
I wanted to use scheduler that does one at time operation but some apps like tumblr does reading and little cache writing at the same time so I use ROW instead for internal storage
BFQ (Budget Fair Queueing)
BFQ is just like CFQ but you could say it’s better for heavy process or lots of multiple process and uses the CPU even more. Due to its high CPU usage when doing lots multiple I/O operations other non-I/O operations can become laggy.
Ideal for burst shots, HD recording and other multiple heavy read and write
Most computers uses BFQ
Noop
Noop is a rather simpler scheduler compared to those above. There is no priority for read or write, it does thing in a first in first out(FIFO) method. So it basically does things one at a time.
Ideal for those that have light usage of the storage and for people who wants to save battery or wants less CPU usage
Many apps don’t require to write and read at the same time so it’s ideal for those apps
Ideal for doing one at a time like only downloading, playing video, music and taking photo or video
Sometimes can be slower than deadline, SIO or zen
Not ideal for some games
Deadline
Its bit similar to noop but handles processes little differently, it creates a queue(FIFO) of around 5 and gives each queue a turn by giving the process a deadline. It handles multiple light I/O operations real well
Ideal for those that have medium usage of the storage
Might suit better than ROW/CFQ for those that who don’t have heavy and multiple I/O operation
It is said that when the CPU is overloaded, set of processes that may miss deadline is largely unpredictable.
SIO
It’s the mix of the Noop and deadline. It’s known for its simplicity of handling I/O request and handles operations one at a time
Ideal for those that have light-medium usage of the storage
Many apps don’t require to write and read at the same time so it’s ideal for those apps
Ideal for doing one at a time like only downloading, playing video, music and taking photo or video
I use SIO for the external storage cause that’s where I keep my Games, Photos, Videos and Music and I naturally cant play music when playing a game or watch a video while listing to music which is ideal for a scheduler that does one at a time operation
Zen
Zen is said to also be simply yet more close to noop. From my observation, It has notably more speed for I/O read and write (this is the one that has noticeable difference in benchmark only ) but uses the CPU a lot if the I/O operation is heavy which can cause more lag than BFQ. It does one at a time operation.
Might be good for games that reads a lot (like graphic data) since its fast. You don’t have to worry about the fact that zen uses a lot of CPU which could make the game lag cause most I/O operation is short and when done it won’t use the CPU until next operation (need to test more)
Ideal for burst shots and HD recording also
Many apps have short/light I/O operation so you wont face lag but an increase in speed compared to SIO or Noop (sometimes faster than others also)
Not ideal for multitasking like browsing and downloading at the same time
VR
It’s said to treat each process fairly by giving them a deadline and has performance fluctuation so sometimes it’s the most fastest scheduler or just plain slow.
Not sure if it handles multiple operations well or one at time operations.... I need to research more
Not sure what it’s ideal for hmm…. Maybe for those that dont have fixed usage
FAQ
When deciding an I/O for each storage, treat the usage separately.eg I listen to music(external with SIO) and use tumblr (internal with ROW) though SIO does things one at time, there won’t be music shuttering. But if my music was on internal with SIO there will be music shuttering
If you too many different uses and cant stay with one I/O scheduler. Use Perfomance profile by h0rn3t. It can change I/O scheduler and other settings depending on the app http://forum.xda-developers.com/xposed/modules/xposed-performance-profile-t2723739
Since most external SDcard has slow speed, I recommend a scheduler that does operations one at a time
As for the battery usage, it doesn’t make much of difference cause usually most I/O operations aren’t that long unless you are downloading or something. Battery usage depends on the CPU usage caused by the scheduler so….
SIO<Noop<Deadline<VR<ROW<=CFQ<Zen<=BFQ
SIO supposedly has least battery usage while Zen and BFQ has the most
And that’s the end of my guide
Do comment and share your opinions or preference
If you find any info incorrect or that I could add, do tell
Reserved
Reserved
Nice info mate,maybe u can add more info for governors,and which scheduler suits with xxx governor. Just a tip,?
Sent from my GT-N7100 using Tapatalk

[GUIDE] I/O Scheduler's Explained

I/O SCHEDULERS
Thnx to @droidphile for clearing the concepts.
Here each & every concept of I/O Sched. is very clearly explained.
After reading the post i can assure u that will have sufficient knowledge about I/O Schedulers & u will be able to choose I/O schedulers easily which suits ur needs & and the phone best depending upon the type of work load u put on ur Android Smartphone.
Q. "What purposes does an i/o scheduler serve?"
A. Minimize hard disk seek latency.
Prioritize I/O requests from processes.
Allocate disk bandwidth for running processes.
Guarantee that certain requests will be served before a deadline.
So in the simplest of simplest form: Kernel controls the disk access using I/O Scheduler.
Q. "What goals every I/O scheduler tries to balance?"
A. Fairness (let every process have its share of the access to disk)
Performance (try to serve requests close to current disk head position first, because seeking there is fastest)
Real-time (guarantee that a request is serviced in a given time)
Description, advantages, disadvantages of each I/O Scheduler?
List of I/O Schedulers:-
1) Noop
2) Deadline
3) CFQ
4) BFQ
5) SIO
6) V(R)
7) Anticipatory
1) 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.
Advantages:
Serves I/O requests with least number of cpu cycles.
(Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.
Disadvantages:
Reduction in number of cpu cycles used is proportional
to drop in performance.
2) Deadline
Goal is to minimize I/O latency or starvation of a request.
The same is achieved by round robin policy to be fair
among multiple I/O requests. Five queues are
aggressively used to reorder incoming requests.
Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of
CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.
Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
3) CFQ
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests.
Each per-process queue contains synchronous requests from processes.
Time slice allocated for each queue
depends on the priority of the 'parent' process.
V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.
Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.
Disadvantages:
Some users report media scanning takes longest to complete using CFQ.
This could be because of the property that since the bandwidth is equally distributed
to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
4) 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.
Advantages:
Believed to be very good for usb data transfer rate.
Believed to be the best scheduler for HD video recording and video streaming. (because of less jitter as compared to CFQ and others)
Considered an accurate i/o scheduler.
Achieves about 30% more throughput than CFQ on most workloads.
Disadvantages:
Not the best scheduler for benchmarking.
Higher budget assigned to a process can affect interactivity and increased latency.
5) SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests.
No priority queues concepts, but only basic merging.
Sio is a mix between noop & deadline. No reordering or sorting of requests.
Advantages:
Simple, so reliable.
Minimized starvation of requests.
Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
6) V(R)
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness.
The next request to be served is
based on it's distance from last request.
Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
7) Anticipatory
Based on two facts
i) Disk seeks are really slow.
ii) Write operations can happen whenever, but there is always some process waiting for read operation.
So anticipatory prioritize read operations over write.
It anticipates synchronous read operations.
Advantages:
Read requests from processes are never starved.
As good as noop for read-performance on flash drives.
Disadvantages:
'Guess works' might not be always reliable.
Reduced write-performance on high performance disks.
Frequently asked questions
Q. "Best I/O Scheduler?"
A. There is nothing called "best" i/o scheduler. Depending
on your usage environment and tasks/apps been run,
use different schedulers. That's the best i can suggest.
However, considering the overall performance, battery,
reliability and low latency, it is believed that
SIO > Noop > Deadline > VR > BFQ > CFQ, given all
schedulers are tweaked and the storage used is a flash
device.
Q. "How do i change I/O schedulers?"
A.Voltage Control or No Frills from market.
Or init.d script:
echo "scheduler-name" > /sys/block/mmcblk0/queue/
scheduler
------------------------------------++END++---------------------------------------
Press Thanks :thumbup: If I Helped U
Very useful information [emoji106]
u forgot the default scheduler of g2... Row..
Varun hellboy said:
u forgot the default scheduler of g2... Row..
Click to expand...
Click to collapse
Oops I m going to add it and Let u Know .
The inner intricacies and mechanics of digital systems never cease to amaze and excite me, as an engineer. This is what it's all about - beyond the gloss and the polished glass, under the hood, deep down at the transistor & gate level. What an amazing time we are living in
Thank you for posting this, God bless you. Happy Christmas.

[A6020] Kernel Tweaks [03/31/2017]

Kernel Tweaks Intended for balanced performance/battery life on actual usage.
Please provide feedback.
Changelog/FAQs
Attention! It assumes that you've already optimized your phone (background apps, idle drain, wakelocks...), which is up to you, and NOT covered on this post.
All sources and credits at the end.
Great thanks to @Dreamstar for the awesome Vegito Kernel!
NOT recommended for gaming, image processing or heavy loads.
Tweaks:
CPU
I/O scheduler
GPU
HMP scheduler (big.Little related)
Virtual Memory
perfd, sched_boost and sched_load disabled to use LITTLE as the main cluster in order to save power
Minimal overheat
Any ROM/Kernel:
http://www6.zippyshare.com/v/PGToHEyx/file.html
does NOT affect hotplug at all, may seem sluggish with incorrect profiles (due to lack of optimization)
does not apply Input Boost
disables Touch Boost (if present)
Kernels with Core Control (core_ctl) hotplug enabled (Lineage OS, AOKP, RR):
Option 1:
http://www103.zippyshare.com/v/WQlpK3en/file.html
Great SoT/Battery Life
May feel sluggish
May contain micro lag/stuttering
2 Little cores always online
big cluster offline most of the time
may have problems with audio crackling during music playback
Option 2:
http://www103.zippyshare.com/v/tz4IiM4n/file.html
Biased towards performance (in case the previous one was behaving bad)
Slightly less battery life
Smooth enough
Little cluster always online
big cluster offline most of the time
Vegito Kernel (RECOMMENDED):
http://www76.zippyshare.com/v/lSXeYI9b/file.html
New*: http://www19.zippyshare.com/v/n9CsRYYk/file.html
*if unstable (e.g. force close), set swappiness to a value between 10~60
Best balance between performance/battery
Snappy
Smooth
Above-average SoT
Thunderplug support
big.LITTLE always online (lower latency and no waste of CPU cycles)
Input boost set at 998Mhz on Little cluster, with duration of 1980ms. (not very battery friendly, try lower values)
Useful links:
The truth about kernels and battery life
Your battery gauge is lying to you (and it's not such a bad thing)
Diving into Doze Mode
Battery Calibration (myth)
Battery Drain Benchmarks
Sources/Credits:
Original GlassFish settings for interactive by @soniCron
Interactive governor battery save scripts by @Sickaxis79
Xiaomi Mi Max Kernel Guide by white778899
LSpeed by @Paget96
[AKT] Advanced Kernel Tweaks by @Asiier, @patalao, @Mostafa Wael and @Senthil360
Changelog 03/31:
Code:
Cleanup:
- Fixed useless loops and condition checks
- Added credits (developers of Project Zhana/Advanced Kernel Tweaks)
- Typos
Vegito only (unstable):
CPU:
- Timer slack cut in half (from 480000) on big Cluster
- Increased 'go_hispeed_load' (91 -> 400 on big, 91 -> 155 on LITTLE)
- Input Boost duration reduced to 120ms (from 1920ms); (drastically improves battery)
- Input Boost frequency increased to 1113MHz (from 998MHz); should not affect battery much, since it stays on the same voltage
GPU
- Revert 'underclock' (465MHz -> 550MHz) to minimize UI lags, trust Adreno Idler to reduce power consumption.
HMP Scheduler:
- Lower 'sched_upmigrate' (90 -> 85)
- 'sched_freq_dec_notify' decreased (410000 -> 400000)
Virtual Memory:
- Increased ZRam to 256MB (from 128MB)
Changelog 03/30:
Code:
HMP Scheduler:
- don't schedule background tasks on big cluster
Virtual Memory - reduce usage of CPU cycles:
- new values from Project X.A.N.A (high dirty_ratio and dirty_background_ratio, min_free at 4M and default vfs_cache_pressure)
IO Scheduler:
- New logic to apply I/O scheduler (from Project X.A.N.A)
- Try ZEN
- if zen is not available use noop (on Lineage OS), otherwise use BFQ.
- increased read-ahead to 512Kb (core_ctl scripts still use 128Kb)
- apply to internal and external memory (SDCard) if present
- changed zen tunables (thanks to [URL=https://forum.xda-developers.com/oneplus-3/how-to/advanced-interactive-governor-tweaks-t3476589][AKT] Advanced Kernel Tweaks[/URL] by [user=6187429]@Asiier[/user] - Project X.A.N.A
Cleanup:
- moved verbose descriptions (now at the end of this post)
- Mhz -> MHz
core_ctl only:
CPU:
- target load set to 499Mhz until 75% (from 70%)
Virtual Memory:
- 20 swappiness and 70 vfs_cache_pressure
- page-cluster set to 0 (read only 1 page from swap each attempt)
- Laptop Mode set to 1
Vegito only (unstable):
HMP Scheduler:
- try to use big cluster more, easing the load of the the LITTLE cluster (from [URL=https://forum.xda-developers.com/showpost.php?p=69417941&postcount=724]Project X.A.N.A[/URL]) (*trying different freq_notify values atm)
- big.LITTLE should not overload a single core or cluster.
CPU:
- align_windows set to 0 (both clusters)
- increased min_sample_time (from 0)
- revert 'fix erratic jump to 998Mhz while idle'
Virtual Memory:
- swap only to avoid out of memory conditions ( vm.swappiness = 0 ) # if unstable (e.g. force close), set to a value between 10~60
- lower ZRam (200MB -> 128MB)
- Laptop Mode disabled
Changelog 03/29:
Code:
Cleanup:
- add simple function to change permissions and apply settings
- typos
Vegito only:
CPU
- fix erratic jump to 998Mhz while idle
--------------------------
FAQs
How to apply (need root):
Apply every boot.
Using Terminal (RECOMMENDED):
Code:
su -c 'sh /script directory/script.sh'
or
su
cd 'script directory/'
sh script.sh
Can be found at Developer Options or you can download one from the Play Store: https://play.google.com/store/apps/details?id=com.termux
Using Kernel Adiutor:
Copy file to /etc/init.d/
Give permissions rwxr-xr-x (0755)
Go to init.d tab on Kernel Adiutor
Execute script.sh
Why do you leave all cores online??11 (vegito)
CertifiedBlyndGuy said:
Thought I would add more to this and make it useful for a few users.
The reason behind why Mpdecision is disabled by default is due to the fact that it is highly inefficient in the sense that hotplugging on Linux, put simply, sucks. Why? The hotplug acts as a front-end to the scheduler to provide a means of plugging and unplugging cores in exchange for a high amount of latency. This means that even though a core may be plugged, there is a delay of several milliseconds before this is actually processed causing microstutters that are hard to notice, but do disrupt performance. The same can be said for the thermal driver and how it Aries frequencies.
Click to expand...
Click to collapse
franciscofranco said:
Leaving all cores online is fine, they'll hit retention and power collapse pretty quickly if nothing is running on them. There's a lot of work when offlining and onlining cores.
Click to expand...
Click to collapse
franciscofranco said:
Hotplug is the action of onlining a core (after it has been unplugged) in a live system, which is present in any Kernel of any device with more than 1 core. You can offline it through sysfs. What you are asking is: if there's any automatic mechanism that onlines & offlines cpu cores based on some special heuristic. The answer is no.
They are online at all times unless there's the need for some thermal throttle. They'll follow the standard Linux resume->suspend mechanism just like any other "normal" phone when the OEM doesn't **** with the natural cycle. This is exactly how the Nexus 6P (same chip) works. I explain it in the changelog & in the feature list. Cores will go to idle in a "jiffy" if they don't have any runnable threads running.
Click to expand...
Click to collapse
From: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/index.html
Code:
15.1.3. Retention
The core state, including the debug settings, is preserved in low-power structures,
enabling the core to be at least partially turned off. Changing from low-power
retention to running operation does not require a reset of the core. The saved
core state is restored on changing from low-power retention state to running
operation. From an operating system point of view, there is no difference between
a retention state and standby state, other than method of entry, latency and use-related constraints.
Check if you Kernel supports the Core Control (core_ctl) hotplug driver:
These folders must be present:
Code:
/sys/devices/system/cpu/cpu0/core_ctl/
/sys/devices/system/cpu/cpu4/core_ctl/
Extreme Kernel (cluster-plug based -> version 12/30 and above)
Try GlassFishCP or FairyTale from https://forum.xda-developers.com/moto-x-play/general/interactive-governor-battery-save-t3443201
Disable Alucard hotplug (to prevent conflicts with cluster-plug)
Disable Simple GPU Algorithm and enable Adreno Idler (Why)
My battery's still crap:
Check if settings were applied correctly.
Try lower input_boost_ms value (at cost of snappiness, can introduce stutter while scrolling)
Check for wakelocks using BetterBatteryStats
Disable Keep Awake/Wi-Fi scan for Google Play Services (unknown side effects):
Settings -> Privacy -> Privacy Guard -> Advanced (dropdown) -> Google Play Services -> Keep Awake/Wi-Fi-Scan
Disable Keep Awake for apps that refuse to sleep, like Facebook and other battery hoggers.
Greenify
General Battery Tips
Disable location when not using
Remove extra widgets from the desktop
Disable live wallpapers
Settings -> Wi-Fi -> Configure -> Keep Wi-Fi on during sleep - Only when plugged in
Settings -> Wi-Fi -> Configure -> uncheck - "Network notification"
Disable unnecessary sync
Disable automatic updates and notifications for updates on Google Play.
Disable push and notification of social networks.
Do not use Task-killers
Do not use programs and widgets to monitor daily usage of the smartphone.
If the quality of the LTE network connection is poor, switch the "Network Type" to 3G or 2G
Source: https://4pda.ru/forum/index.php?showtopic=707426
Obvious:
Use lower brightness (try to keep it below 30%)
Prefer Wi-Fi networks and disable data connections when not using.
Settings explained:
Code:
Android Documentation
https://android.googlesource.com/kernel/common/+/android-4.4-n-release/Documentation/
Kernel - Virtual Memory
https://www.kernel.org/doc/Documentation/sysctl/vm.txt
Performance Testing with SSDs Pt. 2 by Toby Chappell Systems
https://devs.mailchimp.com/blog/performance-testing-with-ssds-pt-2/
How is Heterogeneous Multi-Processing (HMP) scheduling implemented in Linux Kernel (Samsung Exynos5422)?
http://stackoverflow.com/questions/25498215/how-is-heterogeneous-multi-processing-hmp-scheduling-implemented-in-linux-kern
Scheduler Documentation (from DTS Eagle Integration into [Code Aurora Forum] Android (kernel))
https://github.com/dtsinc/DTS-Eagle-Integration_CAF-Android-kernel/blob/master/Documentation/scheduler/sched-hmp.txt
# Read-ahead cache
# Typically, larger values increase sequential read speed and slightly reduce the random read speed. The larger the cache, the less growth
and the more compromises.
# Setting rq_affinity to 2 tells the kernel that the specific CPU core that requested the I/O must be the one that completes it.
# add_random with a setting of 0 avoids the overheard of I/O events contributing to the entropy pool in /dev/random.
# Standard I/O elevator operations include attempts to merge contiguous I/Os. For known random I/O loads these attempts will always fail
and result in extra cycles being spent in the kernel. This allows one to turn off this behavior on one of two ways: When set to 1,
complex merge checks are disabled, but the simple one-shot merges with the previous I/O request are enabled. When set to 2, all merge
tries are disabled. The default value is 0 - which enables all types of merge tries.
# https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-block
# Laptop mode is used to minimize the time that the hard disk needs to be spun up,
# to conserve battery power. It has been reported to cause significant power savings.
# When the knob is set, any physical disk I/O (that might
# have caused the hard disk to spin up) causes Linux to flush all dirty blocks. The
# result of this is that after a disk has spun down, it will not be spun up
# anymore to write dirty blocks, because those blocks had already been written
# immediately after the most recent read operation. The value of the laptop_mode
# knob determines the time between the occurrence of disk I/O and when the flush
# is triggered.
# A task whose nice value is greater than this tunable value will never be considered as a "big" task (it will not be allowed to run
on a high-performance CPU).
# android background processes are set to nice 10. Never schedule these on the big cluster.
# echo 9 > /proc/sys/kernel/sched_upmigrate_min_nice # 15 default, 9 to never schedule background tasks on big Cluster, and 7
on Project Zhana
Known bugs:
Kernel Adiutor seems to change minimum number of big cores to 2 on Core Control. Avoid checking 'Hotplug' tab when using scripts with core_ctl support (try Kernel Adiutor-Mod if problem persists).
Thanks for credits
What auto run booting???
cenelyanto said:
What auto run booting???
Click to expand...
Click to collapse
Copy file to /etc/init.d and set the right permissions (see FAQ).
Keep in mind these scripts are deprecated.
booting noot run otomatic step by step for on ...otomatis run booting

Categories

Resources