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

Which version gives better performance?

  • O2-klte.zip

    Votes: 1 11.1%
  • O3-klte.zip

    Votes: 2 22.2%
  • Can't notice

    Votes: 6 66.7%

  • Total voters
    9
  • Poll closed .
Search This thread

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
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, *****es
- 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
 
Last edited:

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
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
 

Attachments

  • com.ktoonsez.KTmonitor.1.apk
    185.4 KB · Views: 2,646
  • tuned-kernel-4.1-LOS14.x-build230418-klte.zip
    8.7 MB · Views: 2,623
  • tuned-kernel-4.1-LOS14.x-build230418-klteKDI.zip
    7.9 MB · Views: 289
  • tuned-kernel-4.1-LOS14.x-build230418-klteDUO.zip
    8.7 MB · Views: 339
  • tuned-kernel-4.1-220818-CM15.1-kltekor.recovery.zip
    8.2 MB · Views: 117
  • tuned-kernel-4.1-220818-CM15.1-kltekdi.recovery.zip
    8.4 MB · Views: 97
  • tuned-kernel-4.1-220818-CM15.1-kltedv.recovery.zip
    8.5 MB · Views: 296
  • tuned-kernel-4.1-220818-CM15.1-klteduos.recovery.zip
    8.5 MB · Views: 223
  • tuned-kernel-4.1-220818-CM15.1-klte.recovery.zip
    8.5 MB · Views: 2,762
Last edited:

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
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
 
Last edited:

The~Skater~187

Senior Member
Nov 4, 2011
1,663
1,967
Niantic
Nexus 7
Nexus 7 (2013)
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
165bb50c9958bbe9089aae70ea7342c3.jpg
 
Last edited:
  • Like
Reactions: godofsalt and fbs

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
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)
 

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
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..

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."
 
Last edited:

The~Skater~187

Senior Member
Nov 4, 2011
1,663
1,967
Niantic
Nexus 7
Nexus 7 (2013)
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
 

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
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... !!!
 

fipsy

Senior Member
Feb 6, 2013
806
301
Hannover, Germany
I have found that using kernel auditor to turn off ALMK off in my variant of boeffla kernel has helped tremendously with ram management.
VERY interesting! For me deactivating ALMK in Kernel Adiutor didn't help so far. But I didn't test this brand new kernel yet - just the older version based on boeffla kernel beta11. This new thread is one the most helpful of the last 3 month! Thank you so much, @fbs!
 
Last edited:
  • Like
Reactions: fbs

fipsy

Senior Member
Feb 6, 2013
806
301
Hannover, Germany
VERY good news! I have subjected your current kernel to a heavy stress test. Made a Nandroid backup triggered by SManager in the background. Half of the time (about 12 minutes) I chatted on WhatsApp and was surfing with Chrome while the backup was running in the background. This *never* had been working before without any issues. Afterwards I synchronized the 5 GB backup with my NAS via FolderSync in the background. This also worked perfect! In addition, there were no slowdowns or lags at work. Everything ran (and runs) absolutely fluently. At the first glance I'd say it's the far best kernel I ever used on my S5!
 

fbs

Senior Member
Jun 22, 2007
1,152
1,073
not in brazil
I've added another version, with ZCACHE disabled. It may speed up things when accessing files and may solve some bugs. (whispering: I think it was badly implemented, no one uses it anymore..). If anyone is interested in comparing the performance of both versions, including battery usage.. feel free to post!!
 

fipsy

Senior Member
Feb 6, 2013
806
301
Hannover, Germany
I've added another version, with ZCACHE disabled. It may speed up things when accessing files and may solve some bugs.
I will gladly give it a try. But I am truly more than satisfied with the current version! It runs smoothly and reliably. I couldn't detect any bugs. The most important thing is that we also get a beta13 and beta14 and so on... :D
 
  • Like
Reactions: Oh_ehi

PorchSong

Senior Member
Nov 28, 2007
533
315
Denver
The no zcache version seems pretty damn smooth so far. I haven't really stressed tested yet, but I'm not getting lockups and lag spikes as I was with normal one.

Please keep up the good work.

Battery life is outstanding but I did just drop a brand new battery from Anker this weekend. So. . . .

Sent from my SM-G900T using Tapatalk
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 72
    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, *****es
    - 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
    54
    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
    14
    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
    14
    new version is up (all variants)
    13
    new 15.1 build is up for all variants