The Scheduler is an algorithm that, given a set of requests for access to a resource, establishing a temporal order for the execution of such requests, favoring those that meet certain criteria in order to optimize access to that resource.
The difference between the various scheduler is the focus on certain criteria rather than on others.
The choice of a given scheduler does not produce visible changes so as to the choice of the governor, but still provides some improvements.
As usual schedulers are personally tested to find one that best suits your needs.
DEADLINE
It aims to provide a deadline, a deadline for all requests in order to avoid undesirable phenomena such as the "starvation" or the eternal waiting for some requests that occurs when one or more background processes are left indefinitely in the queue the ready, because there is always at least one of the highest priority ready process.
VR
The next request is performed according to the distance from the last request. In the network running good opinions about this scheduler.
NOOP
Push all requests in a single queue simply by their arrival order, grouping together those contiguous.
SIO
E 'the scheduler simpler, does not make any type of sort, is intended only for the purpose of obtaining a low-latency, ie to reduce the amount of time that elapses between the instant at which the request is generated and that in which the request is satisfied.
CFQ
Order requests of different processes in queues for each queue type and assigns a specific interval of time whose duration depends on the priorities assigned to processes. Can be considered the Ondemand the scheduler, the scheduler is in fact more balanced, doing its job in an honest manner.
BFQ
It 's based on CFQ but, instead of the intervals of time, assigns a part of the bandwidth of the disc to each process running in a proportional manner.
Anticipatory
Order requests based on criteria predictive, that puts the demands paused for a short period of time in anticipation that more of this to come to aggregate them.
ADAPTIVE ANTICIPATORY SCHEDULER
For the anticipatory scheduler, we scale up the anticipation timeout (antic expire) using the latency scaling factor over time. When the virtual disk latencies are low a small scaling of the timeout is sucient to prevent deceptive idleness, whereas when the latencies are high a larger scaling of the timeout value may be required to achieve the same. Note that such dynamic setting of the timeout value ensures that we attain a good trade-o between throughput (lost due to idling) and deceptive idleness mitigation. Setting a high value for the scaling factor (increasing idling time) only happens when the disk service latencies themselves are higher. This may not necessarily cause a signicant loss in throughput, because submitting a request from another process instead of idling is not going to improve throughput if the virtual disk itself does not get any faster than it is at the current period. A higher anticipation timeout might also be capable of absorbing process scheduling eects inside the VM. The results for the adaptive anticipatory scheduler are shown in Figure 2. The read time with our modied implementation (third bar in the dierent scheduler combinations) shows that it is possible to mitigate the eects of deceptive idleness by adapting the timeout. An interesting related observation is that the level to which the improve- ment is possible varies for dierent Domain-0 schedulers; noop - 39%, anticipatory - 67% and cfq - 36%. This again points to the fact that the I/O scheduler used in Domain-0 is important for the VM's ability in enforcing I/O scheduling guarantees. Dierent Domain-0 I/O schedulers likely have a dierent service latency footprint inside the VMs, contributing to dierent levels of improvement.
FIOS
Flash-based solid-state drives (SSDs) have the potential to eliminate the I/O bottlenecks in data-intensive applications However the large performance discrepancy between Flash reads and writes introduces challenges for fair resource usage. Further, existing fair queuing and quanta-based I/O schedulers poorly manage the I/O anticipation for Flash I/O fairness and efficiency. Some also suppress the I/O parallelism which causes substantial performance degradation on Flash. This paper develops FIOS, a new Flash I/O scheduler that attains fairness and high efficiency at the same time. FIOS employs a fair I/O time-slice management with mechanisms for read preference, parallelism, and fairness-oriented I/O anticipation. Evaluation demonstrates that FIOS achieves substantially better fairness and efficiency compared to the Linux CFQ scheduler, the SFQ(D) fair queuing scheduler, and the Argon quanta-based scheduler on several Flash-based storage devices (including a CompactFlash card in a low-power wimpy node). In particular, FIOS reduces the worst-case slowdown bya factor of 2.3 or more when the read-only SPECweb workload runs together with the write-intensive TPC
ROW
Row stands for READ Over WRITE which is the main requests dispatch policy of this algorithm. The ROW IO scheduler was developed with the mobile devices needs in mind. In mobile devices we favor user experience upon everything else, thus we want to give READ IO requests as much priority as possible. In mobile devices we won't have as much parallel threads as on desktops. Usually it's a single thread or at most 2 simultaneous working threads for read & write. Favoring READ requests over WRITEs decreases the READ latency greatly.
The main idea of the ROW scheduling policy is: If there are READ requests in pipe - dispatch them but don't starve the WRITE requests too much. Bellow you'll find a small comparison of ROW to existing schedulers. The test that was run for these measurements is parallel read and write.
Which scheduler is the most stable with decent battery & performance with smartassv2?
danshuynh said:
Which scheduler is the most stable with decent battery & performance with smartassv2?
Click to expand...
Click to collapse
Hello, I am very happy with smartass v2, and CFQ scheduler.
good performance and excellent battery
Another great Stempox guide. Thanks :good:
jayjay3333 said:
Another great Stempox guide. Thanks :good:
Click to expand...
Click to collapse
yes friend, thank you
Thank you! Awesome guides btw, especially for noobs like me
danshuynh said:
Thank you! Awesome guides btw, especially for noobs like me
Click to expand...
Click to collapse
thanks, is a pleasure to help new guys if possible
all about I/O SCHEDULERS
http://forum.xda-developers.com/showpost.php?p=22134559&postcount=4
If you want you can post as governor-scheduler combination frequently used and why.
would be useful
goverrnor: lulzactive
IO: sio
for battery and performance..
kernel matrix ics.. oc 1300mhz,bus speed default..
I've almost always used On Demand / Deadline.
To be honest, I've tried other combos, but I've never really noticed much difference either way. On Demand / Deadline is the default for my current kernel.
Thanks
Thank you sir,
Thanks for the summary!
bedalus said:
Thanks for the summary!
Click to expand...
Click to collapse
I still use the default cfq
soon update the thread with description new i / o scheduler
Can someone shed more light on smartassv2 i/o scheduler ?
Btw I thank the threadstarter for this informative thread ..
snoopnoob said:
Can someone shed more light on smartassv2 i/o scheduler ?
Btw I thank the threadstarter for this informative thread ..
Click to expand...
Click to collapse
hi, smartassv2 is a governor, and the description you can find it here: http://forum.xda-developers.com/showthread.php?t=1767797
Found this about the ZEN scheduler,
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
stempox said:
hi, smartassv2 is a governor, and the description you can find it here: http://forum.xda-developers.com/showthread.php?t=1767797
Click to expand...
Click to collapse
Thank for the link dude ...
OP update.
Related
Hi
I have been looking for information on some of the terms used in Kernel descriptions, but I'm struggling to find any real answers.
I have added a Kernel section to the FAQ section on the WIKI, and I have started to add in a few terms as I understand them.
Could one of the knowledgeable Kernel guys add in their understandings of what the acronyms stand for please or post below and I will add them?
http://forum.xda-developers.com/wiki/index.php?title=FAQ
Kernel
CFS: Completely Fair Scheduler - The original process scheduler. CFS is better for multitasking, BFS is better for user interactions
BFS: Brain F**k Scheduler - The updated and improved process scheduler. CFS is better for multitasking, BFS is better for user interactions
SVS: Static Voltage Scaling will change the voltage based on a set table created by the kernel maker. Example: At a certain speed, say 245MHz, 925mV is feed into the CPU. At 998MHz, 1225mV is used.
AVS: Adaptive Voltage Scaling will change the voltage depending on temperature and CPU needs.
HAVS: Under volts and under clocks the processor when it's not being used.
BFQ: I/O scheduler - Schedules read and write operations to the SD? or Processor?
AXI: AXI (internal bus). Reduces speed when the apps CPU is running at lower clock speeds and increases it when at higher clock speeds.
UVOC: Undervolted Overclocked. Reduce the voltage supply to the processor for power saving at lower speeds, along with overclocking the processor at the save voltage as the previous max value. 1250mV @ 998MHz - 1250mV at 1190MHz, -or- 245MHz @ 1000mV - 245MHz @ 900mV.
SLAB: Slab allocation is a memory management mechanism intended for more efficient memory allocation and to eliminate memory fragmentation
SLUB: SLUB allocator, a drop-in replacement for the slab code. SLUB promises better performance and scalability by dropping most of the queues and related overhead and simplifying the slab structure in general.
SLQB: A slab allocator that focuses on per-CPU scaling, and good performance with order-0 allocations.
EXT2: The ext2 or second extended filesystem is a file system for the Linux kernel.
EXT3: The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux kernel.
EXT4: The ext4 or fourth extended filesystem is a journaling file system for Linux. Should offer improved performance over ext2/3.
CIFS: Common Internet File System (CIFS) operates as an application-layer network protocol, mainly used to provide shared access to files across a network.
TUN:
AUFS: AUFS is a complete rewriting of the earlier UnionFS file system. It aimed to improve reliability and performance.
ReiserFS: ReiserFS is a general-purpose, journaled computer file system. Performance is good, but performance can degrade with constant use.
Thanks
Danny
Bump
Sent from my HTC Desire using XDA App
hi everyone
I have been using this small aplication, but there is an option about the I/O and i dont know for what is that and if i should change it and why?
thanks
Hmm...I'd leave it be on default. Anyway, here's the explanation for each I/O scheduler.
Q: ... can you translate it into layman terms?
A: A-yup.
CFQ: good if you have a multi processor (we're not talking dual core... much many more cores...), multi "card" system. We don't. 'nuff said.
Deadline: fast, fast, fast, but maybe one of your services will "clog" all the writes while your gmail is waiting to open that email you want to read. And maybe not.
NOOP: who said Deadline was fast? NOOP is "the fast". (NOOP = NO OPeration = nuthin' to do... ). Good if the optimization is done at the hardware level. 99% of our devices do.
Anticipatory: surely our devices have small and slow "disk" subsystems, so maybe it's worth a shot.
Click to expand...
Click to collapse
Taken from XDA-No-Frills CPU thread
Introduction
"It takes few hours to make a thread but it doesn't even take few seconds to say Thanks"- arpith.fbi
Click to expand...
Click to collapse
Code:
Don't be afraid to ask me anything.
I won't bite, but I might lick you.
Just thank me for this super brief thread.
Give credits to this thread by linking it if you're using any of my info.
Thank you to you too
Have you unlocked your bootloader of your current device ? If so, read it ! If not, learn the benifits ! :victory:
What is this thread about ? It is a very brief explanation of every governors and schedulers to let you find the best combo for your device.
I've been searching a lot about informations about Kernels, Governors, I/O Schedulers and also Android Optimization Tips. No matter its Google or XDA or other android forums. I will go into it and try the best I can to find these infos. So I thought of sharing it to here for the XPlay users.
My main reason to share this is to benefit users for better knowledge about Kernels, Governors, I/O Schedulers and Tips on Android Optimization. I'm not aware of whether where this should be posted, its related to kernels, governors and schedulers so I think it would be best if I share it to here. Yes, I wrote it word by word with references.Happy learning. :angel:
After months on XDA, no matter its in a development forum or Off Topic forum. Users kept on asking what's this what's that. And I'm sure that not all members will understand what is it until they bump into my thread
FAQs regarding on :-
-I/O Schedulers
-Kernel Governers
-Better RAM
-Better Battery
-FAQs
*Will add more when I found something useful.
Click to expand...
Click to collapse
I do a lot of asking by PM, to learn, it doesn't matter whether its a stupid one. (People who know me understands)
With my experience and lots of asking. I managed to find a lot of infos that we can use to optimize our phone.
I will try to explain as clear as I can.
Governors :-
-Smoothass
-Smartass
-SmartassV2
-SavagedZen
-Interactivex
-Lagfree
-Minmax
-Ondemand
-Conservative
-Brazilianwax
-Userspacce
-Powersave
-Performance
-Scary
-Lulzactive *
-Intellidemand *
-Badass *
-Lionheart *
-Lionheartx *
-Virtuous *
* Haven't gathered much needed information. Will add it later.
Explanation
OnDemand
Brief
Available in most kernels, and the default governor in most kernels. When the CPU load reaches a certain point, OnDemand will rapidly scale the CPU up to meet the demand, then gradually scale the CPU down when it isn't needed.
Click to expand...
Click to collapse
Review
Brief says all. By a simple explantion, OnDemand scales up to the required frequency to undergo the action you are doing and rapidly scales down after use.
Conservative
Brief
It is similar to the OnDemand governor, but will scale the CPU up more gradually to better fit demand. Conservative governor provides a less responsive experience than OnDemand, but it does save batter
Click to expand...
Click to collapse
Review
Conservative is the opposite of Interactive; it will slowly ramp up the frequency, then quickly drops the frequency once the CPU is no longer under a certain usage.
Interactive
Brief
Available in latest kernels, it is the default scaling option in some stock kernels. Interactive governor is similar to the OnDemand governor with an even greater focus on responsiveness.
Click to expand...
Click to collapse
Review
Interactive is the opposite of Conservative; it quickly scales up to the maximum allowed frequency, then slowly drops the frequency once no longer in use.
Performance
Brief
Performance governer locks the phone's CPU at maximum frequency. While this may sound like an ugly idea, there is growing evidence to suggest that running a phone at its maximum frequency at all times will allow a faster race-to-idle. Race-to-idle is the process by which a phone completes a given task. After that it returns the CPU to extremely efficient low-power state.
Click to expand...
Click to collapse
Review
Good at gaming, Really good. Disadvantages are it may damage your phone if too much usage.
Powersave
Brief
The opposite of the Performance governor, the Powersave governor locks the CPU frequency at the lowest frequency set by the user.
Click to expand...
Click to collapse
Review
Set it to your desired minimum frequency and you won't have to look for your charger for once in a while.
Scary
Brief
A new governor wrote based on Conservative with some Smartass features, it scales accordingly to Conservative's way. It will start from the bottom. It spends most of its time at lower frequencies. The goal of this is to get the best battery life with decent performance. It will give the same performance as Conservative right now.
Click to expand...
Click to collapse
Review
Hmm.. Overall I don't see any difference. After I understand its main objective. I was very curious and decided to use it again. Results are the same.. No difference. Report to me if anyone has tested this.
Userspace
Brief
Userspace is not a governor pre-set, but instead allows for non-kernel daemons or apps with root permissions to control the frequency. Commonly seen as a redundant and not useful since SetCPU and NoFrills exist.
Click to expand...
Click to collapse
Review
Highly not recommended for use.
Smartass
Brief
It is based on the concept of the Interactive governor.
Smartass is a complete rewrite of the code of Interactive. Performance is on par with the “old” minmax and Smartass is a bit more responsive. Battery life is hard to quantify precisely but it does spend much more time at the lower frequencies.
Click to expand...
Click to collapse
Review
Smartass is rather the governer that will save your battery and make use of your processor for daily use. Like the brief explantion said " Smartass will spend much more time on lower frequencies." So logically you don't need for sleep profiles anymore.
SmartassV2
Brief
Theoretically a merge of the best properties of Interactive and OnDemand; automatically reduces the maximum CPU frequency when phone is idle or asleep, and attempts to balance performance with efficiency by focusing on an "ideal" frequency.
Click to expand...
Click to collapse
Review
This is a much favourite to everybody. I believe almost everyone here is using SmartassV2. Yes, it is better than Smartass because of its speed no scaling frequencies from min to max at a short period of time.
Smoothass
Brief
A much more aggressive version of Smartass that is very quick to ramp up and down, and keeps the idle/asleep maximum frequency even lower.
Click to expand...
Click to collapse
Review
In my personal experience, this is really useful for daily use. And yes, I'm using it all the time. It may decrease your battery life. I saw it OC itself to 1.4 gHz when I set it to 1.2. Good use. Recommended.
Brazilianwax
Brief
Similar to SmartassV2. More aggressive scaling, so more performance, but less battery.
Click to expand...
Click to collapse
Review
Based on SmartassV2. But its advantage is a much more performance wise governor.
SavagedZen
Brief
Another SmartassV2 based governor. Achieves good balance between performance & battery as compared to Brazilianwax.
Click to expand...
Click to collapse
Review
Not much difference compared to SmartassV2. But it is a optimized version of it.
Lagfree
Brief
Again, similar to Smartass but based on Conservative rather than Interactive, instantly jumps to a certain CPU frequency after the device wakes, then operates similar to Conservative. However, it has been noted as being very slow when down-scaling, taking up to a second to switch frequencies.
Click to expand...
Click to collapse
Review
Used it before. Like the name of the governor, I didn't experience any lag whatsoever. Another governor based on performance, but not battery efficient.
MinMax
Brief
MinMax is just a normal governor. No scaling intermediate frequency scaling is used.
Click to expand...
Click to collapse
Review
Well.. it's too normal that I can't really say anything about it..
Interactivex
Brief
InteractiveX governor is based heavily on the Interactive governor, enhanced with tuned timer parameters to optimize the balance of battery vs performance. InteractiveX governor's defining feature, however, is that it locks the CPU frequency to the user's lowest defined speed when the screen is off.
Click to expand...
Click to collapse
Review
A better understanding from the brief to you users, this is an Interactive governor with a wake profile. More battery friendly than Interactive.
Due to current kernels doesn't have these governors. I will be delaying the explanation, its very interesting. If you want it ASAP, post below
-Lulzactive *
-Intellidemand *
-Badass *
-Lionheart *
-Lionheartx *
-Virtuous *
**********************************************************************************************************************************************************************
I/O Schedulers(thanks to droidphile)
Deadline
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.
Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.
Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
Click to expand...
Click to collapse
Noop
Inserts all the incoming I/O requests to a First In First Out queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data. Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Advantages:
Serves I/O requests with least number of cpu cycles. (Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.
Disadvantages:
Reduction in number of cpu cycles used is proportional to drop in performance.
Click to expand...
Click to collapse
Anticipatory
Based on two facts
i) Disk seeks are really slow.
ii) Write operations can happen whenever, but there is always some process waiting for read operation.
So anticipatory prioritize read operations over write. It anticipates synchronous read operations.
Advantages:
Read requests from processes are never starved.
As good as noop for read-performance on flash drives.
Disadvantages:
'Guess works' might not be always reliable.
Reduced write-performance on high performance disks.
Click to expand...
Click to collapse
BFQ
nstead of time slices allocation by CFQ, BFQ assigns budgets. Disk is granted to an active process until it's budget (number of sectors) expires. BFQ assigns high budgets to non-read tasks. Budget assigned to a process varies over time as a function of it's behavior.
Advantages:
Believed to be very good for usb data transfer rate.
Believed to be the best scheduler for HD video recording and video streaming. (because of less jitter as compared to CFQ and others)
Considered an accurate i/o scheduler.
Achieves about 30% more throughput than CFQ on most workloads.
Disadvantages:
Not the best scheduler for benchmarking.
Higher budget assigned to a process can affect interactivity and increased latency.
Click to expand...
Click to collapse
CFQ
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process. V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.
Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.
Disadvantages:
Some users report media scanning takes longest to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
Click to expand...
Click to collapse
SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
Advantages:
Simple, so reliable.
Minimized starvation of requests.
Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
Click to expand...
Click to collapse
VR
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.
Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
Click to expand...
Click to collapse
Credits
-droidphile
-kokzhanjia
Reserved for kernel infos
Sent from my WT19i
Yes, we do have kernels with Lionheart, lulzactive and intellidemand.
Nice reference cheers.
Sent from Xperia Play (R800a) with Tapatalk
CosmicDan said:
Yes, we do have kernels with Lionheart, lulzactive and intellidemand.
Nice reference cheers.
Sent from Xperia Play (R800a) with Tapatalk
Click to expand...
Click to collapse
Really ? Okay will add it in later
Sent from my WT19i
kokzhanjia said:
Really ? Okay will add it in later
Sent from my WT19i
Click to expand...
Click to collapse
Yeah LuPuS has Lulzactive, Virtuous, Intellidemand, Lazy, Ondemandx, Lionheart and Badass added (but no mention of LionheartX).
Turbo kernel also has intellidemand but the parameters have been modified quite a bit (by me) to suit our snapdragon SOC's better. I think wedgess also put these changes into LuPuS too (at least one of the ICS/JB kernels he builds he said he did). The browser mode still has no effect AFAIK but in my experience it's more battery-friendly and better performance than on-demand (thanks mainly to dbus_input ramping). But many users have reported slightly better gaming experience with SmartAssv2.
Great reference, this will be of much help to new comers, thanks for the hard work you put into this.
CosmicDan said:
Yeah LuPuS has Lulzactive, Virtuous, Intellidemand, Lazy, Ondemandx, Lionheart and Badass added (but no mention of LionheartX).
Turbo kernel also has intellidemand but the parameters have been modified quite a bit (by me) to suit our snapdragon SOC's better. I think wedgess also put these changes into LuPuS too (at least one of the ICS/JB kernels he builds he said he did). The browser mode still has no effect AFAIK but in my experience it's more battery-friendly and better performance than on-demand (thanks mainly to dbus_input ramping). But many users have reported slightly better gaming experience with SmartAssv2.
Click to expand...
Click to collapse
Yeah. Saw your work Nice one.. anymore in depth infos about kernels at here ? I want to add a bonus one for this..
paragroth said:
Great reference, this will be of much help to new comers, thanks for the hard work you put into this.
Click to expand...
Click to collapse
Thanks
Coloured signatures are nice
Nah that's pretty much it
Sent from Xperia Play (R800a) with Tapatalk
Throughout my experience(mainly from observing CPU speeds during music playback), I found that:
Scary:
Ramps up to max after reaching a threshold (50/60% CPU load) then slow scales down to match as 50-80% CPU Load @ X MHz. After a while if load lowers (30-40%), it will clock down to match the 50-80% load. You will see a lot of 100% @ low MHz with this governor.
SavagedZen:
It maintains a 80-90% CPU Load @ X MHz for a fairly constant load. This one also scales based on the Max CPU Freq. settings. So the lower your Max CPU Freq, the better it is at maintaining the CPU Load/MHz balance (for music playback at least).
I didn't look at the source, so these are just from observations only. So I might be talking out of my ass.
Also, having good CPU Load at appropriate CPU Speeds may or may not contribute to battery life. No experiments showed that yet iirc.
Monitoring done via "Diagnosis - System Information" an app that generates an overlay with whatever information your want ie cpu load, speed, memory free, used, disk io, network io, etc.
Refresh rate kept at 5 seconds to keep CPU Load interference minimal (lower than ICS/JB CPU Info overlay from Development, Settings tab).
Great thread, this should be sticky!
jabberwocky_one said:
Throughout my experience(mainly from observing CPU speeds during music playback), I found that:
Scary:
Ramps up to max after reaching a threshold (50/60% CPU load) then slow scales down to match as 50-80% CPU Load @ X MHz. After a while if load lowers (30-40%), it will clock down to match the 50-80% load. You will see a lot of 100% @ low MHz with this governor.
SavagedZen:
It maintains a 80-90% CPU Load @ X MHz for a fairly constant load. This one also scales based on the Max CPU Freq. settings. So the lower your Max CPU Freq, the better it is at maintaining the CPU Load/MHz balance (for music playback at least).
I didn't look at the source, so these are just from observations only. So I might be talking out of my ass.
Also, having good CPU Load at appropriate CPU Speeds may or may not contribute to battery life. No experiments showed that yet iirc.
Monitoring done via "Diagnosis - System Information" an app that generates an overlay with whatever information your want ie cpu load, speed, memory free, used, disk io, network io, etc.
Refresh rate kept at 5 seconds to keep CPU Load interference minimal (lower than ICS/JB CPU Info overlay from Development, Settings tab).
Click to expand...
Click to collapse
Nono you are right. I read these before and your observation is just about it, thanks for the info
chabbe11 said:
Great thread, this should be sticky!
Click to expand...
Click to collapse
Thank you
Sent from my WT19i with Real Xperia r1
Am I setting it up the right way?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I prefer using that minimum and maximum.
And would this screen off profile work, even if I have configured the main minimum? The 100mhz for screen off really saves a lot of my battery.
Sent from my R800i using Tapatalk 2
Gr8 helped me a lot in understanding alll of this .....
bhavei said:
Am I setting it up the right way?
I prefer using that minimum and maximum.
And would this screen off profile work, even if I have configured the main minimum? The 100mhz for screen off really saves a lot of my battery.
Sent from my R800i using Tapatalk 2
Click to expand...
Click to collapse
Yes it is right. I didnt really tried the other way that you mentioned, because i have No-Frills pre-installed in my settings..but i see it worked. Of course it will save battery.. Nice
piku2008 said:
Gr8 helped me a lot in understanding alll of this .....
Click to expand...
Click to collapse
Will add more soon About kernels, Is there any BFS kernels around here ? Most kernels are CFS..
Sent from my WT19i with Real Xperia r1
kokzhanjia said:
About kernels, Is there any BFS kernels around here ? Most kernels are CFS..
Click to expand...
Click to collapse
There was, I ported it over a few months ago. But I removed it because it was causing priority issues. The latest BFS patch for our kernel has some critical bugs, so I ditched it. When I get ext# fixed in .60 kernel up and going I will probably take another crack at it, backporting one of the more recent 3.x BFS versions.
One of the LuPuS kernels might still have na laternative BFS version, but I think wedgess stopped building it for the same reason as me.
CosmicDan said:
There was, I ported it over a few months ago. But I removed it because it was causing priority issues. The latest BFS patch for our kernel has some critical bugs, so I ditched it. When I get ext# fixed in .60 kernel up and going I will probably take another crack at it, backporting one of the more recent 3.x BFS versions.
One of the LuPuS kernels might still have na laternative BFS version, but I think wedgess stopped building it for the same reason as me.
Click to expand...
Click to collapse
I see, there are really few BFS based kernels out there. BFS is better in my opinion so i would like to elaborate more about BFS to attract more users.
Btw, one guy in Xperia Mini, Mini Pro and Active forums had already successfully making it up and running for stock and CM ROMs. Its already hitted version 2.3
Maybe you could get some help from him ? Name is Mesa Kernel.
Sent from my WT19i with Real Xperia r1
kokzhanjia said:
I see, there are really few BFS based kernels out there. BFS is better in my opinion so i would like to elaborate more about BFS to attract more users.
Btw, one guy in Xperia Mini, Mini Pro and Active forums had already successfully making it up and running for stock and CM ROMs. Its already hitted version 2.3
Maybe you could get some help from him ? Name is Mesa Kernel.
Sent from my WT19i with Real Xperia r1
Click to expand...
Click to collapse
I was using v0.313 of BFS, it wasn't that hard - just had to adapt the patch for the Xperia's stupid kernel. That version is so unstable and buggy, in fact all 2.6.x BFS patches were so problematic that the official page has removed them.
I'll check it out, if he back-ported BFS for Linux kernel 3.0 and has them on GitHub, otherwise it would be easier just to do it myself. But I have other more important concerns for Zeus development right now, BFS doesn't really bring any significant performance boost (which is why it is continually rejected from AOSP inclusion).
CosmicDan said:
I was using v0.313 of BFS, it wasn't that hard - just had to adapt the patch for the Xperia's stupid kernel. That version is so unstable and buggy, in fact all 2.6.x BFS patches were so problematic that the official page has removed them.
I'll check it out, if he back-ported BFS for Linux kernel 3.0 and has them on GitHub, otherwise it would be easier just to do it myself. But I have other more important concerns for Zeus development right now, BFS doesn't really bring any significant performance boost (which is why it is continually rejected from AOSP inclusion).
Click to expand...
Click to collapse
Oh... i didnt know that.. anyway, I don't think he has his github set up. I didnt saw a link to his github on his thread. And isnt BFS aimed for forward looking(like only performing on a task that is given without any concerns) ? I read about it at google docs about it. And i don't really know how to explain it clearly..
Good luck in your development my frirend. And this thread has been moved to General section. Hope you can find it and Nice to have another friend
Sent from my WT19i with Real Xperia r1
This is nice info,
Thanks
Thanks man. This is awesome. Much appreciated
I don't know if the answer to my question is somewhere hidden between the thousands of threats but I did try to find it before(including Google and YouTube) and would be more than happy to get a reply.
I'm using custom Kernels since the Note 2 but was never able to put more time and afford in to understand how they actually work and always used the default settings.
Now I'm trying to get some knowledge on Kernel settings and what is safe to change and what not. I'm very interested on how a Kernel works and how I can boost both battery life and/or performance as well as the basic knowledge of the Kernel settings.
At the moment I'm trying to explore with trickster mod to kinda learn by doing but I always get really bad results in testing or no big changes when I change the governor. Also I'm a little afraid in messing up my phone and therefor don't change the settings much. What I know is that the same Kernel can have different outcomes on different Note 3's so please do not post just your Kernel and settings without explanation cause I would like to find the most suited Kernel and settings for my Note.
Sooo...Some help and explanations would be more than appreciated.
4aces said:
I don't know if the answer to my question is somewhere hidden between the thousands of threats but I did try to find it before(including Google and YouTube) and would be more than happy to get a reply.
I'm using custom Kernels since the Note 2 but was never able to put more time and afford in to understand how they actually work and always used the default settings.
Now I'm trying to get some knowledge on Kernel settings and what is safe to change and what not. I'm very interested on how a Kernel works and how I can boost both battery life and/or performance as well as the basic knowledge of the Kernel settings.
At the moment I'm trying to explore with trickster mod to kinda learn by doing but I always get really bad results in testing or no big changes when I change the governor. Also I'm a little afraid in messing up my phone and therefor don't change the settings much. What I know is that the same Kernel can have different outcomes on different Note 3's so please do not post just your Kernel and settings without explanation cause I would like to find the most suited Kernel and settings for my Note.
Sooo...Some help and explanations would be more than appreciated.
Click to expand...
Click to collapse
I can give you a brief (easy) explanation with comparisons to try to get you to understand what a kernel is.
A kernel is your phone's driver (like a car) where it adjusts settings of the hardware and controls how each individual part interacts with each other.
There is a reason you take a car to get tuned up, and that is because a car can go berserk as there is no "maintaining force" - YOU or the person who tunes your car makes changes to the car to make sure it does not overheat, use less power per mile travelled, control how much windshield fluid is being released or how much torque force required to ensure the car does not snap XXXXXX when going at a speed of YYYYYY.
These options are beyond the manufacturer's decisions, and therefore when people flash a kernel you immediately trip KNOX (N9005). You can give your phone less power to process, more power to process (not recommended), speed up the CPU/limit the CPU, control governors on how the disk I/O (input/output) is being handled and/or control how much the phone will swap to it's virtual memory when it reaches no memory.
People think use a custom kernel! It saves you a ton of battery life!. This statement is partially wrong. You have to understand how a kernel reacts to your phone. Even though I know that lite kernels like Wootever's Custom N3 has the best battery life, this is because it has less tweaks and features that may boggle the user, and may allow for subsequent battery life extension compared to CivZ's SneakyKat or Imoseyon's LeanKernel. By inserting new tweaks into the kernel, you allow to have more "useful" features that may add to the "driver's knowledge" - Color tweaking, Fast charge over USB, CIFS support, all are extras that the kernel supports. To save power, developers remove the junk that the manufacturers added and added their own settings to make sure they get the result they would like, then they would share it to the public. However, people recommend custom kernels as they get more options when they flash it, as well as ridding of a lot of the stock settings that manufacturers love setting (default governors, lowest CPU frequency, etc)
CPU governors work by controlling how much speed is used at a given time, a good description of what each governor does is listed here: http://forum.xda-developers.com/showthread.php?t=1736168
I/O governors (simply speaking) control how files and requests are being handled by the system, a good description of what each governors is listed here: http://forum.xda-developers.com/showpost.php?p=23616564&postcount=4. Good way to understand this is if you learnt programming and you learnt the Stack/Queue ADTs in a programming language, it describes things better when looking at the descriptions in the link above.
Adjusting Synapse/Trickster would not get you anywhere to getting the best battery/best performance out of the phone. You will have to experiment and check which kernel is best with your phone, according to your SOC_PVS value. SOC_PVS value is how Qualcomm decides your processor's manufacturing "rank" and if you compare a low rank to a high rank, you will see that you can use less power to operate a high ranked chip compared to a low ranked counterpart. As most governors rely heavily on how the code is handled by the system, you should always go for the kernel that fits your system, and setting configurations depending on your system's likings. By following other people's configurations you risk sporadic reboots and incompatibilities, as not all phones are built the same way.
Things you should not touch if you are afraid of destroying your phone: Overvolting and Overclocking, as these may fry your device if you don't know what you are doing.
Any questions - click reply to this, or else I won't see it!
nicholaschum said:
I can give you a brief (easy) explanation with comparisons to try to get you to understand what a kernel is.
A kernel is your phone's driver (like a car) where it adjusts settings of the hardware and controls how each individual part interacts with each other.
There is a reason you take a car to get tuned up, and that is because a car can go berserk as there is no "maintaining force" - YOU or the person who tunes your car makes changes to the car to make sure it does not overheat, use less power per mile travelled, control how much windshield fluid is being released or how much torque force required to ensure the car does not snap XXXXXX when going at a speed of YYYYYY.
These options are beyond the manufacturer's decisions, and therefore when people flash a kernel you immediately trip KNOX (N9005). You can give your phone less power to process, more power to process (not recommended), speed up the CPU/limit the CPU, control governors on how the disk I/O (input/output) is being handled and/or control how much the phone will swap to it's virtual memory when it reaches no memory.
People think use a custom kernel! It saves you a ton of battery life!. This statement is partially wrong. You have to understand how a kernel reacts to your phone. Even though I know that lite kernels like Wootever's Custom N3 has the best battery life, this is because it has less tweaks and features that may boggle the user, and may allow for subsequent battery life extension compared to CivZ's SneakyKat or Imoseyon's LeanKernel. By inserting new tweaks into the kernel, you allow to have more "useful" features that may add to the "driver's knowledge" - Color tweaking, Fast charge over USB, CIFS support, all are extras that the kernel supports. To save power, developers remove the junk that the manufacturers added and added their own settings to make sure they get the result they would like, then they would share it to the public. However, people recommend custom kernels as they get more options when they flash it, as well as ridding of a lot of the stock settings that manufacturers love setting (default governors, lowest CPU frequency, etc)
CPU governors work by controlling how much speed is used at a given time, a good description of what each governor does is listed here: http://forum.xda-developers.com/showthread.php?t=1736168
I/O governors (simply speaking) control how files and requests are being handled by the system, a good description of what each governors is listed here: http://forum.xda-developers.com/showpost.php?p=23616564&postcount=4. Good way to understand this is if you learnt programming and you learnt the Stack/Queue ADTs in a programming language, it describes things better when looking at the descriptions in the link above.
Adjusting Synapse/Trickster would not get you anywhere to getting the best battery/best performance out of the phone. You will have to experiment and check which kernel is best with your phone, according to your SOC_PVS value. SOC_PVS value is how Qualcomm decides your processor's manufacturing "rank" and if you compare a low rank to a high rank, you will see that you can use less power to operate a high ranked chip compared to a low ranked counterpart. As most governors rely heavily on how the code is handled by the system, you should always go for the kernel that fits your system, and setting configurations depending on your system's likings. By following other people's configurations you risk sporadic reboots and incompatibilities, as not all phones are built the same way.
Things you should not touch if you are afraid of destroying your phone: Overvolting and Overclocking, as these may fry your device if you don't know what you are doing.
Any questions - click reply to this, or else I won't see it!
Click to expand...
Click to collapse
First of all thank u very much for the detailed response. That was exactly what I was looking for. I will get back to you after going through the awesome links you were posting with some more knowledge
One thing which came straight in my mind was how do I know if I have a low or high rank from the soc_pvs_value and where do I find it?
Thanks again!
4aces said:
First of all thank u very much for the detailed response. That was exactly what I was looking for. I will get back to you after going through the awesome links you were posting with some more knowledge
One thing which came straight in my mind was how do I know if I have a low or high rank from the soc_pvs_value and where do I find it?
Thanks again!
Click to expand...
Click to collapse
Anytime
You can either install Synapse (If your Kernel supports it, and click on the button under CPU), or check here:
Code:
/sys/devices/system/soc/soc0/soc_pvs
The higher your number, the better.
nicholaschum said:
Anytime
You can either install Synapse (If your Kernel supports it, and click on the button under CPU), or check here:
Code:
/sys/devices/system/soc/soc0/soc_pvs
The higher your number, the better.
Click to expand...
Click to collapse
I ran out of "thanks" so u get it tomorrow. But thanks again. One more thing:
How do I know if I have a high number/between which numbers does the value wary? My soc_pvs is 3.
4aces said:
I ran out of "thanks" so u get it tomorrow. But thanks again. One more thing:
How do I know if I have a high number/between which numbers does the value wary? My soc_pvs is 3.
Click to expand...
Click to collapse
You got a rather good number.
The lowest is 0, and the highest is 6. I have 2 but I don't undervolt so this is not an issue
nicholaschum said:
You got a rather good number.
The lowest is 0, and the highest is 6. I have 2 but I don't undervolt so this is not an issue
Click to expand...
Click to collapse
Can't thank u enough!!! Now I will be off to some reading and testing
nicholaschum said:
You got a rather good number.
The lowest is 0, and the highest is 6. I have 2 but I don't undervolt so this is not an issue
Click to expand...
Click to collapse
Aaand one more question.
What is the difference in tcp congestion control (cubic/reno) and what does it change?
4aces said:
Aaand one more question.
What is the difference in tcp congestion control (cubic/reno) and what does it change?
Click to expand...
Click to collapse
That seems more of a Trickster Mod specific tweak.
It is more of a network speed tweak which you can read here: http://en.m.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm
In simple words, you have to understand what Network Congestion is, and how queues affect how much data is being transmitted. When too much data is being carried in a link or a node, the quality of service would deteriorate. To do Congestion control, it affects how much data is being transmitted through each node systematically. This is rather complicated to explain using simple terms as this is a mathematical formula which processes how much data is being transmitted.
Cubic is used by many default linux kernels. Like CPU governors, these are data transmission governors, and it is best if you use the one better for your TCP/IP connection (Carrier or Wifi)
nicholaschum said:
That seems more of a Trickster Mod specific tweak.
It is more of a network speed tweak which you can read here: http://en.m.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm
In simple words, you have to understand what Network Congestion is, and how queues affect how much data is being transmitted. When too much data is being carried in a link or a node, the quality of service would deteriorate. To do Congestion control, it affects how much data is being transmitted through each node systematically. This is rather complicated to explain using simple terms as this is a mathematical formula which processes how much data is being transmitted.
Cubic is used by many default linux kernels. Like CPU governors, these are data transmission governors, and it is best if you use the one better for your TCP/IP connection (Carrier or Wifi)
Click to expand...
Click to collapse
Just read the answer in the link u posted. Stupid me.
Sorry for taking up your time.
nicholaschum said:
That seems more of a Trickster Mod specific tweak.
It is more of a network speed tweak which you can read here: http://en.m.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm
In simple words, you have to understand what Network Congestion is, and how queues affect how much data is being transmitted. When too much data is being carried in a link or a node, the quality of service would deteriorate. To do Congestion control, it affects how much data is being transmitted through each node systematically. This is rather complicated to explain using simple terms as this is a mathematical formula which processes how much data is being transmitted.
Cubic is used by many default linux kernels. Like CPU governors, these are data transmission governors, and it is best if you use the one better for your TCP/IP connection (Carrier or Wifi)
Click to expand...
Click to collapse
I have another question. If I want to oc or uv is there any script I have to use or can I just apply/test right away?
4aces said:
I have another question. If I want to oc or uv is there any script I have to use or can I just apply/test right away?
Click to expand...
Click to collapse
Just use the main interface of either Trickster or Synapse. I use Synapse personally as my kernel provides the best interface on Synapse.
nicholaschum said:
Just use the main interface of either Trickster or Synapse. I use Synapse personally as my kernel provides the best interface on Synapse.
Click to expand...
Click to collapse
What I found out so far is that the device runs smoother on performance based governors with cfq or sio scheduler. The best results I had so far was on lean kernel and ael kernel. I'm using the last at the moment cause it has a lot of settings to play with
But it seems that I'm still miles away from finding the best settings.
4aces said:
What I found out so far is that my device reacts not good on performance based governors & schedulers. The best results I had so far was on lean kernel and ael kernel. I'm using the last at the moment cause it has a lot of settings to play with
But it seems that I'm still miles away from finding the best settings.
Click to expand...
Click to collapse
I could give you some recommendations that would work well decently with 2-3 PVS valued processors.
Interactive Governor
No OC, No UV.
I/O schedulers Internal: cfq 512kb
I/O schedulers External: cfq 512kb
Dynamic Fsync Enabled
PowerSuspend driver enabled
Mdnie enabled, 0.39%
FastCharge Enabled
GPU Governor: Simple Ondemand 450MHz
I use CivZ's SneakyKat but Wootever's Custom N3 has the best battery life. If you want features you should play with CivZ's, if you like 6h screen on then you should play with Wootever.
You don't have to follow these values, but I spent days restarting my phone finding the best "average" configuration for devices ranging in my state. I found that Intellidemand didn't do so well and Interactive prevented any sporadic reboots that I got while on Intellidemand. Also read aheads of above 512kb doesn't show much speed enhancements. Synapse is great as it tells you whether your boot is successful or not, and now all my boots get Completed.
Notice: Do not soft reboot when configuring Kernels, Kernels don't get loaded properly/doesn't get reset properly so use Full reboot when configuring
cpu lock
I tried gaming with different kernels and governors and encountered a strange issue. Especially in candy crush after playing for a while the cpu locks (sometimes on 14k sometimes 12k). Reboot fixes it but I'm still curious why it locks.
@nicholaschum any idea?
Btw. my favorite settings so far are intellidemand with deadline gr8 performance and battery life is OK.
4aces said:
I tried gaming with different kernels and governors and encountered a strange issue. Especially in candy crush after playing for a while the cpu locks (sometimes on 14k sometimes 12k). Reboot fixes it but I'm still curious why it locks.
@nicholaschum any idea?
Btw. my favorite settings so far are intellidemand with deadline gr8 performance and battery life is OK.
Click to expand...
Click to collapse
That's a bit weird, did you have powersaving turned on? But I assume it's off.
I think you should disable your kernel mod application in Application Manager and test it out, if it's a problem with Synapse/Trickster then one setting is a bit problematic.
nicholaschum said:
That's a bit weird, did you have powersaving turned on? But I assume it's off.
I think you should disable your kernel mod application in Application Manager and test it out, if it's a problem with Synapse/Trickster then one setting is a bit problematic.
Click to expand...
Click to collapse
Nope that's why it's strange. Even got it after clean flash without setting/installing any Kernel related apps.
Tested other games and they work fine so I deleted candy crush and so far no cpu lock. No idea why, that's why I was curious
4aces said:
Nope that's why it's strange. Even got it after clean flash without setting/installing any Kernel related apps.
Tested other games and they work fine so I deleted candy crush and so far no cpu lock. No idea why, that's why I was curious
Click to expand...
Click to collapse
I don't play Candy Crush so I wouldn't know..haha
nicholaschum said:
I don't play Candy Crush so I wouldn't know..haha
Click to expand...
Click to collapse
Lol. Me neither from now on... (my kids will be sad though) Still can't really belive the game caused it
Could someone explain me what is hotplug and how it works? I also would like to know which I/O Scheduler should I use to improve battery life and what gives Read Ahead Buffer.
Thanks to everyone who could teach me something new
dkownacki said:
Could someone explain me what is hotplug and how it works? I also would like to know which I/O Scheduler should I use to improve battery life and what gives Read Ahead Buffer.
Thanks to everyone who could teach me something new
Click to expand...
Click to collapse
Check AK Kernel thread.
The second post contains links that explain each option.
http://forum.xda-developers.com/nexus-4/orig-development/kernel-ak-t2473454
In regards to schedulers.. It depends on what you do with the phone (i.e. How much time you spend on it, if you multitask or use it for CPU-RAM hungry apps).
In any case the answer will probably revolve around SIO, FIOPS, DEADLINE and ROW (In no particular order).
Lastly, keep in mind that there are certain schedulers that do not play well with specific governors. If in doubt, leave the default kernel configuration as it is.
Happy reading.
-------------------
TheKang Build 24/5
AK Poseidon 320
UKM 2.5
Philz Touch 6.47.6
when your cpu hotplugs, its turning cores off and on, as it needs to use them.