Another "kernel optimizer"?
No. Well, yes. However, a "kernel optimizer" is a poor way to put it. KTweak performs kernel adjustments based on facts and evidence, unlike other optimizers with poorly written or heavily obfuscated code. Unlike other "kernel optimizers", KTweak is:
- Entirely open source with no compiled components
- Concise, at less than 200 lines long
- Backed by benchmarks and evidence
- Designed by an experienced kernel developer
- Non-intrusive and completely systemless
KTweak is tested on countless devices and is benchmarked using hackbench and perf for scheduler throughput, schbench and cyclictest for scheduler latency, and iozone and fio for I/O latency and throughput.
KTweak works by applying various tunables to the Android kernel using exposed procfs nodes. Android Kernels require many userspace subsystems, such as CONFIG_SCHED_DEBUG, CONFIG_PROCFS, CONFIG_SYSFS, and others.
The performance gain from KTweak comes from reducing the scheduler latency, which translates in real-world usage to visual stutters and lag. Reducing scheduler latency reduces raw performance slightly but improves overall UI/UX.
KTweak also tunes both schedutil and interactive CPU governors to also be aware of the scheduler timeslices. Memory management is slightly adjusted to allow more cached information to stay available for longer, reducing jitter and improving cache locality.
NOTE:
Your logs may show warnings or errors. This is normal. Not all kernels are built the same, so KTweak warns that a certain tunable is unable to be changed.
The KTweak script and KTweak Android App source code can be found here:
https://github.com/tytydraco/ktweak
https://github.com/tytydraco/KTweak-Android-App