FORUMS
Remove All Ads from XDA

 View Poll Results: Which version gives better performance?

O2-klte.zip
 
1 Vote(s)
11.11%
O3-klte.zip
 
2 Vote(s)
22.22%
Can't notice
 
6 Vote(s)
66.67%

[KERNEL] TUNED, LOS14/15/16(Android7/8/9) for S5 [22/ago/18] faster and lighter

1,003 posts
Thanks Meter: 869
 
By fbs, Senior Member on 8th October 2017, 03:17 PM
Post Reply Email Thread
This is a Kernel, based on Lord Boeffla's Kernel, "boeffla-kernel-4.1-CM14.1-g900f", which is based on LineageOS Kernel, which is based on AOSP (google) Kernel, which is based on Linux Kernel.

It should be installed via Recovery (TWRP or CWM) over any other LOS 14/15 ROM/kernel, just like boeffla kernel. It doesn't need any tweaking with any app. Install it and use it.
BUT you can use "boeffla config app" if you like tweaking. You will receive a Warning about "mpdecision", just ignore it.

It has:
- a different "low memory killer" algorithm
- zcache is disabled for really freeing memory that was used for caching files (when needed) instead of compressing it
- a different default cpu hotplugger. Every other kernel (even LOS/stock) relies on Qualcomm's MPDecision, I wrote my own, bitches
- Tuned governor (it's the default). It's basically the Interactive but with a lot of tuning.

- many compiler optimizations not found on boeffla or LOS
- many unused code simply REMOVED to free memory and CPU. People just add more stuff, I like to remove
- TV tuners removed from code. wtf...
- many unstable governors and i/o schedulers removed

Note that even though 2GB of RAM isn't too little, if you have too many memory-hungry apps, performance will always suffer; Most apps are started(loaded up to RAM) right after booting; There are ways to prevent this auto-start but I can't remember now..


Overall your phone will be snappier, and less battery hungry

XDA:DevDB Information
tuned, Kernel for the Samsung Galaxy S5

Contributors
fbs, lord boeffla, haggertk
Source Code: https://github.com/bemerguy/tuned-kernel-LOS-s5

Kernel Special Features: lighter, optimization-focused

Version Information
Status: Stable
Stable Release Date: 2018-08-22

Created 2017-10-08
Last Updated 2018-11-01
The Following 72 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
 
 
8th October 2017, 03:17 PM |#2  
fbs's Avatar
OP Senior Member
Flag not in brazil
Thanks Meter: 869
 
Donate to Me
More
DOWNLOADS:
KTMonitor = an app that will show your cpus clocks in real time, in a overlay window. simple, fast, no ads.
If you only see the first cpu (CPU0), you'll have to change kernel selinux mode to Permissive instead of Strict. Boeffla config app can do it.

"tuned kernel" builds will show up here, from older to newer

klte - SM-G900F, SM-G900M, SM-G900R4, SM-G900R7, SM-G900T, SM-G900V, SM-G900W8, SM-S902L
klteduos - SM-G900FD, SM-G900MD
kltedv - SM-G900I, SM-G900P
kltekor - SM-G900K, SM-G900L, SM-G900S

los14 = cm14 = android 7
los15 = cm15 = android 8
The Following 54 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
8th October 2017, 03:17 PM |#3  
fbs's Avatar
OP Senior Member
Flag not in brazil
Thanks Meter: 869
 
Donate to Me
More
Reserved
220818:
-hstcp as tcp congestion control

090818:
-and zram disabled again
-compiled with the leanest toolchain type
-undervolt back on, I guess
-lowmemorykiller from xiaomi's stock kernel
-read ahead disabled completely
-more unused kernel parts removed
-more compiler optimization

280618:
-zram enabled again, now with lz4 that should have been used since forever but wasn't
-some kernel fixes from around the net. should be even faster
"tuned" governor tweaked a bit, and it's profiles too (for those who still uses boeffla app to tweak things)

210618:
-LOS 15.x build
-268mhz as default min speed and 2.6ghz as default max speed
-can't figure out why swap is being used A LOT even with swappiness=5, making battery life miserable, so zram disabled again
-"tuned" governor as default. It's a "interactive" with bugs fixed and tweaked
-"zen" scheduler as default, with some bugs fixed. it's fast, simple, almost like noop+deadline+row mixed

230418:
-latest boeffla-based
-wifi tweaked
-zram (swap) is back
-other compiler flags not enabled before

280218:
-beta22 based
-lmk faster than before while screen is on. slower than before when screen is off
-interactuned governor will save some cpu while screen is off

160218:
-now compiling with linaro 8.0
-"interactive" governor renamed to "interactuned" to get rid of conflicting values
-"interactuned" profiles updated on boeffla app (standard, performance, battery, battery extreme)
-tuned hotplugger tweaked a bit

110218:
-lmk will search, compare apps' scores, and kill them in groups. the stock lmk and the "less aggressive" lmk from build 020218 were killing one app at a time
-put tuned hotplugger to run more often when display is on. the cpu cost is minimal as it is extremely simple
-tweaked compiler flags again to not make code large

020218:
-boeffla's beta21 based
-less aggressive lmk again
-tweaked compiler flags
-tweaked interactive governor
-tweaked tuned hotplugger

301217:
-more aggressive lmk
-less aggressive tuned hotplugger
-tweaked the default interactive values in ramdisk (via anykernel), as they are modified by it on boot
-tweaked also the boeffla app interactive profiles
-performance governor will really drain your battery now, but it will be even faster (max cpu clock, all cpus on if using tuned hotplugger)
-compiling with O2 but with some O3 flags. it seems to be faster than 211217

211217:
-beta20 from boeffla

201217:
-tweaked some filesystem stuff
-it seems tuned hotplug was being ramdonly disabled, fixed
-changed how tuned hotplug enables/disables cpus:
it was based on the number of processes needing cpu. But the system itself didn't count as "processes", so I changed it to look at the cores frequencies instead. The cpu governors itself has a lot of code just to measure how busy the cpus are before raising or lowering frequencies, I think it's faster/lighter to just use that info instead of calculating again or in another way.. In practice: cpu0 at max frequency will turn on cpu1 and so on. Any cpu on lowest frequency for some time will turn it off. I don't really know if this will be better or worse than the code before(151217)
151217:
-beta19 from boeffla

071217:
-beta18 from boeffla kernel
-zram/swap fully disabled. The slowdowns are unacceptable. It seems we will always get a huge performance/battery hit with any kind of swap. For now I think it's better to let the "low memory killer" do its thing than swapping. Remember: Killing an app will instantly free RAM with zero CPU usage. Swapping means a lot of CPU usage, and (as swapping occurs in RAM), only 40-50% of ram will be freed.

011217:
-beta17 from boeffla kernel
-tweaked tuned hotplugger a bit. changing from mpdecision to tuned on config won't bug the lower frequency
-swapping should be faster

271117:
-hotplugers "mpdecision" and "optimized mpd" working again. zzmoove hotplugers removed (the governor itself was removed long ago)
"interactive" profiles changed a bit: "performance" will have more performance, and "battery" will really save more battery
-zram compression (swap) may be even faster now
-compiler toolchain updated to gcc-linaro-7.2.1-2017.11
-processor scheduler using logarithmic scaling
-"tuned" hotplugger logic was changed a bit. it will turn on/off cpus based only on average load, but will obey the "order" and may turn all on if the load is suddenly high. it may also use less cpu to compute
-"interactive" governor may also use less cpu
The Following 14 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
8th October 2017, 03:54 PM |#4  
KazuDante's Avatar
Senior Member
Flag Port-Au-Prince
Thanks Meter: 1,042
 
Donate to Me
More
So it's safe to say that this kernel could just be flashed over beta12 , i would like to test it and see the difference at work .

Also , Thank you for the work you put into this.
The Following 2 Users Say Thank You to KazuDante For This Useful Post: [ View ] Gift KazuDante Ad-Free
8th October 2017, 04:17 PM |#5  
The~Skater~187's Avatar
Senior Member
Flag Niantic
Thanks Meter: 1,788
 
More
I have found that using kernel auditor to turn off ALMK off in my variant of boeffla kernel has helped tremendously with ram management. I'm curious if what you have done here will work even better. Keep up the good work.

Sent from my kltespr using Tapatalk
The Following 2 Users Say Thank You to The~Skater~187 For This Useful Post: [ View ] Gift The~Skater~187 Ad-Free
8th October 2017, 04:26 PM |#6  
fbs's Avatar
OP Senior Member
Flag not in brazil
Thanks Meter: 869
 
Donate to Me
More
Quote:
Originally Posted by KazuDante

So it's safe to say that this kernel could just be flashed over beta12 , i would like to test it and see the difference at work .

Also , Thank you for the work you put into this.

yes
The Following 2 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
8th October 2017, 04:47 PM |#7  
fbs's Avatar
OP Senior Member
Flag not in brazil
Thanks Meter: 869
 
Donate to Me
More
Quote:
Originally Posted by The~Skater~187

I have found that using kernel auditor to turn off ALMK off in my variant of boeffla kernel has helped tremendously with ram management. I'm curious if what you have done here will work even better. Keep up the good work.

Thanks. I think it would. This "ALMK" is a new feature that only made more obvious what was already broken. I was already trying to get rid or modify LMK when it was integrated to our LOS kernel.

You could, *at least*, drain less battery by installing this mod. If you have time, please compare before and after.. I think it does use less cpu and the phone won't "gag" when it needs more memory (like when opening a new app)
The Following 3 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
8th October 2017, 04:50 PM |#8  
fbs's Avatar
OP Senior Member
Flag not in brazil
Thanks Meter: 869
 
Donate to Me
More
64MB for empty applications? That is TOO low. The default is 180MB. This way, lmk would/should only kill anything when all the system has only ~64MB to cache files.

The memory lmk really counts is not the real "free" ram, it's the "cached" ram. Our "free" ram is almost always ~44MB..

Quote:

the Linux kernel will use available memory for disk caching, unless it's required by a running program.

This is considered good; say you have 4 GB RAM, and your programs are using only 1 GB. The other 3 GB are going to waste. Despite the "feel-good" impression from knowing you're only using 25% of your memory, the counterpart is that the other 75% is going unused. So the kernel uses that for caching files which significantly improves performance. It's automatic; unlike older operating systems you don't need to decide how much to devote to disk cache, or manually configure it.

"The Linux disk cache is very unobtrusive. It uses spare memory to greatly increase disk access speeds, and without taking any memory away from applications. A fully used store of ram on Linux is efficient hardware use, not a warning sign."

The Following 3 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
8th October 2017, 05:11 PM |#9  
The~Skater~187's Avatar
Senior Member
Flag Niantic
Thanks Meter: 1,788
 
More
Quote:
Originally Posted by fbs

Thanks. I think it would. This "ALMK" is a new feature that only made more obvious what was already broken. I was already trying to get rid or modify LMK when it was integrated to our LOS kernel.

You could, *at least*, drain less battery by installing this mod. If you have time, please compare before and after.. I think it does use less cpu and the phone won't "gag" when it needs more memory (like when opening a new app)

From what I'm seeing this is working great. Free Ram seems to be holding steady between 700 and 800 MB.
Would you mind if I implement this into a test version of my kernel? I would like to see if it has any ill effects with the added features I have in mine.

Sent from my kltespr using Tapatalk
The Following 5 Users Say Thank You to The~Skater~187 For This Useful Post: [ View ] Gift The~Skater~187 Ad-Free
8th October 2017, 05:27 PM |#10  
fbs's Avatar
OP Senior Member
Flag not in brazil
Thanks Meter: 869
 
Donate to Me
More
Quote:
Originally Posted by The~Skater~187

From what I'm seeing this is working great. Free Ram seems to be holding steady between 700 and 800 MB.
Would you mind if I implement this into a test version of my kernel? I would like to see if it has any ill effects with the added features I have in mine.

Sent from my kltespr using Tapatalk

Of course! Let's try to make things better for our S5... !!!
The Following 8 Users Say Thank You to fbs For This Useful Post: [ View ] Gift fbs Ad-Free
8th October 2017, 05:38 PM |#11  
The~Skater~187's Avatar
Senior Member
Flag Niantic
Thanks Meter: 1,788
 
More
Quote:
Originally Posted by fbs

Of course! Let's try to make things better for our S5... !!!

Awesome. I added you modified lmk.c to my source, compiling now. I will keep you posted on my findings. Thank you again!

Sent from my kltespr using Tapatalk
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes