Kernel Tweaking - governors, io, hotplugs, etc.
I'm not a dev nor a hacker by any means. I guess I'd call myself an advanced power user. I've been playing with kernel settings, doing research, reading all I can, and have been trying to come up with a good "profile" for this kernel on this device that makes me happy. I am currently using version 1.7 of the kernel on the latest AICP weekly ROM.
My Goal: Snappy performance, minimal lag, decent SoT, all day battery life.
There is a ton of info on the intarwebz about this subject but I've been concentrating my efforts using this thread:
https://xdaforums.com/nexus-5x/general/guide-advanced-interactive-governor-t3269557
This method uses the Interactive governor and requires some modification of the governor tunables, mainly, hispeed_freq, above_hispeed_delay, timer_rate, and target_loads. The main idea of the above linked thread is trying to find a few processor clock speeds that will cover the majority of the things you do with your phone, and then relate those speeds to the most efficient speeds for your device. The author claims that most devices have a few efficient clock speeds which can be found by relating the jumps in clock speeds to the jumps in voltages. I compiled a spreadsheet of the clock speeds and voltages offered by this kernel, and then also computed the minimal and maximal loads for each speed using the formulas outlined in the thread.
I grabbed speed and voltage info from Kernel Adiutor, but there was a discrepancy with the voltages section, it doesn't include the 2457 MHz speed. So, I made an educated guess on the voltage for that speed and set it at 1075.
From the spreadsheet it's obvious that 833 Mhz is a very efficient speed, then 1497, and 1958. So, I took this information and tried to make adjustments according to the instructions in the thread, but following those instructions implicitly didn't result in the greatest results. The CPU would idle at 300000, then during any sort of load it would mostly ramp to 1497600 or full speed (2649600). I also experienced a lot of lag at certain times. So, after doing some more studying and looking at some of the other profiles linked at the bottom (namely, Ghostpepper, Fairpark, and HawkTail), I have come up with these as my current settings.
hispeed_freq : 833200
above_hispeed_delay : 60000 1497000:100000 1958000:100000
go_hispeed_load : 99
timer_rate : 30000
timer_slack : 480000
target_loads : 80 950000:83 1036000:78 1190000:85 1267000:76 1497000:99 1574000:82 1727000:79 1958000:99 2265000:83 2457000:89 2495000:87 2572000:87 2649000:99
min_sample_time : 10000
I've also changed the input boost frequency on all 4 cores from 1497600 to "disabled" to disable touchboost.
Current io scheduler: sioplus
The hotplug I'm currently trying is mako-hotplug with default settings, except the Frequency Unplug limit changed to 1497MHz. It switches between 2 cores and 4 cores depending on load. There is debate on this, because many say that if your governor settings are good, you should just keep all 4 cores running at all times because the additional computing required to determine whether to unplug two cores or not isn't worth the battery savings of running on 2 cores. I guess it's like a diminishing returns thing, but I'm having good performance with mako right now, so I'm going to keep using it for a bit to determine if there are any battery savings.
So, I've just setup these latest settings today. I'm posting this in the hopes that other more intelligent and more motivated folks can help out by trying these and maybe doing some further tweaking of their own and testing of various settings. So far these settings seem pretty decent, but time will tell. It always does...
Phrank