[GUIDE] Tweaking Interacting Gov

Search This thread

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Hey guys, Kyuubi10 back once again with another Guide.
I thought it might be useful to pop in a couple results of my trial and error for the HTC One M8.

Note: This is not scientifically, calculated accurate, but it's close enough, based on estimates.

After following these guides:
http://xdaforums.com/showthread.php?t=2769899
https://vjnaik.wordpress.com/2015/06/25/kernel-tweak-interactive-governor-paramaters-rooted-phone/

I decided to make a summary guide of the above but with specific HTC One M8 values.

Since I agree with the idea of "race to idle" embodied in the Wheatley governor, I tried emulating that on the Interactive governor while also keeping it as efficient as possible.

Here are the values (all others not mentioned, leave default):
Code:
[B]above_hispeed_delay [/B]- 80000 2265600:10000

[B]go_hispeed_load[/B] - 95

[B]hispeed_freq[/B] - 1728000

[B]io_is_busy[/B] - 1

[B]min_sample_time[/B] - 10000

[B]target_loads[/B] - 45 729000:80 883200:50 1267000:85 1497600:50 1728000:90 1958400:50

[B]timer_rate[/B] - 10000

[B]timer_slack[/B] - 5000

"above_hispeed_delay" makes sure that longer time is spent on the frequency step 1.72Ghz, before quickly raising higher into max freq.
1.72Ghz is the most energy efficient frequency with a good performance, e.g. it will not cause lag during casual usage, while it uses minimal voltage.
If the load is too high for this frequency to handle, I set the time short once it's gone over this freq step so that it will not waste time before reaching max freq. Thus dealing with the issue asap.

Another important parameter is "target_load", with this I have defined that at each efficient freq step the load needed to overcome it would be higher than normal. But it would up-scale quickly when using non-efficient frequencies.

The other parameters I have set so that the frequency is lowered as soon as CPU load is finished, so that it will rush back to idle as quickly as possible.

The interesting thing about this set-up is that for general, non heavy usage, it basecally functions as if I have underclocked to 1.72Ghz, but when the CPU is truly pushed it reaches up to 2.5Ghz which is my Overclocked max freq value.
Thus both saving battery and providing high performance.

I have felt no lag, and it's been quite a smooth experience while I used this :)
Combined with using GPU rendering (found in developer settings), and Seeder, the over all usage is pretty good.
Battery usage has been very efficient and I have managed to squeeze out an extra hour or two using this.

I highly recommend it!
Hope I helped you guys... don't forget to press the thanks button if you also feel that I did!:good::good:
 

SaskFellow

Senior Member
Feb 28, 2013
104
48
I noticed I have some governor settings left at 0 or blank. I did some quick googling, found some other tweaks for the M8 and the interactive governor. So I played around a bit, and I think the following would be useful to add to the above tweaks.

-----------------------

sampling_down_factor: 60000
sync_freq: 1036800
up_threshold_any_cpu_load: 65
up_threshold_any_cpu_freq: 1190400
boost: 0
boostpulse_duration: 80000

--------------------

Also of note there is not a entry for " io_is_busy " under the Interactive governor under ElementalX Sense kernel v6.03. I believe it's possible to modify the governor to add the function, if it's desired.

Hope this helps others. :)
 
Last edited:

lil_kujo

Senior Member
Oct 29, 2015
1,065
602
Nokia Lumia 920
Nokia Lumia 900
nice one i read the links that you posted and follow the guides there also to tweak the interactive governor on the first link that you posted is really interesting he has updated that post also, i followed his guide inspired by your guide and i have been getting good results on my phone with battery and performance i mean almost no battery drain at all while my phone is idle. thanks for the help mate!
 

munkyvirus

Senior Member
Dec 21, 2010
848
312
Minnesota
Plugged the settings into Yankactive on DU. Quick, freqs stay low when nothings going on, seems legit. I set my timer_rate higher tho, 10000 feels a little low, makes me think that the CPU will spend too much time polling loads.
 

Kyuubi10

Senior Member
Feb 21, 2014
726
544
I noticed I have some governor settings left at 0 or blank. I did some quick googling, found some other tweaks for the M8 and the interactive governor. So I played around a bit, and I think the following would be useful to add to the above tweaks.

-----------------------

sampling_down_factor: 60000
sync_freq: 1036800
up_threshold_any_cpu_load: 65
up_threshold_any_cpu_freq: 1190400
boost: 0
boostpulse_duration: 80000

--------------------

Also of note there is not a entry for " io_is_busy " under the Interactive governor under ElementalX Sense kernel v6.03. I believe it's possible to modify the governor to add the function, if it's desired.

Hope this helps others. :)
Some of those actually make no difference. Since they are overruled by other perameters. E.g. up_threshold aren't used in interactive, since they follow target_load instead.
Sampling_down_factor on the other hand is overrulled by the timer features of interactive.
When you use ondemand, or conservative, sampling_down_factor is a fun parameter to play with, but not interactive.

While Sync_Freq I don't like using because it raises minimum frequency to its value...although temporarily, the timer features can already deal with CPU loads efficiently.

nice one i read the links that you posted and follow the guides there also to tweak the interactive governor on the first link that you posted is really interesting he has updated that post also, i followed his guide inspired by your guide and i have been getting good results on my phone with battery and performance i mean almost no battery drain at all while my phone is idle. thanks for the help mate!

Great :) The links are important!! They are my sources, and often contain much more detail than what I use in my guides. I attempt creating a well ordered summary, but my sources are better if you don't mind reading loads.
I'm glad I could help :)

Plugged the settings into Yankactive on DU. Quick, freqs stay low when nothings going on, seems legit. I set my timer_rate higher tho, 10000 feels a little low, makes me think that the CPU will spend too much time polling loads.

:) That's the idea. And never heard of Yankactive...but I'm gonna assume it's good lol.
And about time_rate, you are right, but you are also wrong.
There isn't a true right answer unless someone performs a scientific experiment in order to fully test which one is better.
But I'll explain why I put my one short... I want the frequencies returning to IDLE asap. While yes, you are right it's polling often, it also returns to idle much faster, rather than staying at higher frequency uselessly wasting battery.
I'll try to run some tests checking CPU load, if CPU load considerable lowers I'll come back and report.
 
  • Like
Reactions: SaskFellow

munkyvirus

Senior Member
Dec 21, 2010
848
312
Minnesota
Yankactive is Interactive with some under the hood tweaks, I believe, same tunables. I also looked at some documentation on Interactive and I think the target_loads have to be in ascending order based on load when paired with clock speeds, I'm gonna mess with them a bit and see what I get. Link
 

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Yankactive is Interactive with some under the hood tweaks, I believe, same tunables. I also looked at some documentation on Interactive and I think the target_loads have to be in ascending order based on load when paired with clock speeds, I'm gonna mess with them a bit and see what I get. Link

And no, target_loads has to be in ascending order based on FREQUENCY. You are applying load percentages to frequency ranges, therefore it is imperative that its the frequency defining the order.
e.g. 50 4:80 10:20 12: 50 means:
50% load before going to the next frequency step, until you reach frequency 4, then use 80% instead until frequency 10, then use 20% instead until 12, then use 50% until max frequency.

Feel free to play with them as much as you want, just make sure to keep the idea of using efficient frequency steps in mind.
 
  • Like
Reactions: munkyvirus

munkyvirus

Senior Member
Dec 21, 2010
848
312
Minnesota
And no, target_loads has to be in ascending order based on FREQUENCY. You are applying load percentages to frequency ranges, therefore it is imperative that its the frequency defining the order.
e.g. 50 4:80 10:20 12: 50 means:
50% load before going to the next frequency step, until you reach frequency 4, then use 80% instead until frequency 10, then use 20% instead until 12, then use 50% until max frequency.

Feel free to play with them as much as you want, just make sure to keep the idea of using efficient frequency steps in mind.

Thank you for the knowledge dump, been scraping the barrel for weeks trying to figure out tunables!
 

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Thank you for the knowledge dump, been scraping the barrel for weeks trying to figure out tunables!

Hehe it's a pleasure.
It's a way I find to give back to the community, since I learn so much through it. I can try help make life easier for those who follow the same path I did.
 

Anonaru

Senior Member
Feb 10, 2016
302
102
Wow, this is awesome! I had the performance gov on, which just destroyed my battery. Now, I have a question for you!

What is your take on "Multicore Power Savings" ? I'm using a flarport kernel which has it set to aggressive by default. Should this be changed to anything else while using your gov settings? Thanks for any assistance!
 

smeejaytee

Inactive Recognized Contributor
Sep 29, 2013
7,820
4,106
43
kent
Xiaomi Mi 10T / 10T Pro
I have never heard of mpdecision having a battery saver mode XD
Would you please expand on that? Also tell me which tweaking app you are using?
It's in the ex app mate, it uses a less aggressive version of mpdecision to saver on battery power but I can't say that I noticed much improvement TBH.

Sent from my HTC One_M8 using Tapatalk
 
  • Like
Reactions: Kyuubi10

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Wow, this is awesome! I had the performance gov on, which just destroyed my battery. Now, I have a question for you!

What is your take on "Multicore Power Savings" ? I'm using a flarport kernel which has it set to aggressive by default. Should this be changed to anything else while using your gov settings? Thanks for any assistance!

You had performance on?? You do realise that the perf gov basically keeps your CPU cores running on max frequency all the time right?
No wonder your battery was dying XD
Anyhoo....good thing you found my guide :)

Now, about multicore power savings, as usually with most things you will be compromising something to gain something else...always keep that in mind.
With MPS you'll be giving up some multitasking, in order to gain some battery savings.
Why (you may ask)?

Well, think about a to-do list, and for each list you have one person completing the tasks within that list. Let's say you have four lists and 4 people completing those tasks.
What MPS does is it takes as many tasks as possible and places them within a single list, for one person to do. At the end of the day that one person will have done a lot of work, while the other 3 will have done very little work. The drawback? The work was completed much slower, because only one person was doing it.

Why can MPS be good? It is the way it chooses which CPU to use to add the tasks to, it chooses CPUs which are already turned on, rather than turning a new one on.
The frequency voltages on each core range from the lowest of 775mV, to the highest of 1075mV. That's a 300mV increase in battery consumption between lowest frequency and highest. (Mind you, 1075 for me is an overclocked value, if you are not OC then it will be even less)
When CPU cores have nothing to do they get turned off....they don't idle at 775mV....they are literally off. Therefore around 0mV usage XD
If you get tasks which would have run on 2 CPUs at minimum frequency, using only 775mV each, and put them to run on only 1 CPU at MAX frequency at 1075mV, you still have about 400mV battery savings. Now lets say its something which would have used 4 CPUs, but you end up using only two.... then the battery savings double to 800mV.

Final answer...it depends on your tastes, what do you prefer most? Multitasking or battery saving.
Personally I keep it enabled, but not aggressive.
But if you really don't care about multitasking, you may as well leave it as aggressive.
 

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Hello kyuubi10 thanks for your help, would it be ok to change mp decision to battery saver mode ? Whats your take on that?

It's in the ex app mate, it uses a less aggressive version of mpdecision to saver on battery power but I can't say that I noticed much improvement TBH.

Sent from my HTC One_M8 using Tapatalk

Well, I use adiutor, so I don't have that option.
I am happy with my phone how it is (if it wasn't for the damned plug issues XD)

But @lil_kujo, as @smeejaytee said....he hasn't noticed much improvement.
So I'd trust his advice :)
 

Anonaru

Senior Member
Feb 10, 2016
302
102
You had performance on?? You do realise that the perf gov basically keeps your CPU cores running on max frequency all the time right?
No wonder your battery was dying XD
Anyhoo....good thing you found my guide :)

Now, about multicore power savings, as usually with most things you will be compromising something to gain something else...always keep that in mind.
With MPS you'll be giving up some multitasking, in order to gain some battery savings.
Why (you may ask)?

Well, think about a to-do list, and for each list you have one person completing the tasks within that list. Let's say you have four lists and 4 people completing those tasks.
What MPS does is it takes as many tasks as possible and places them within a single list, for one person to do. At the end of the day that one person will have done a lot of work, while the other 3 will have done very little work. The drawback? The work was completed much slower, because only one person was doing it.

Why can MPS be good? It is the way it chooses which CPU to use to add the tasks to, it chooses CPUs which are already turned on, rather than turning a new one on.
The frequency voltages on each core range from the lowest of 775mV, to the highest of 1075mV. That's a 300mV increase in battery consumption between lowest frequency and highest. (Mind you, 1075 for me is an overclocked value, if you are not OC then it will be even less)
When CPU cores have nothing to do they get turned off....they don't idle at 775mV....they are literally off. Therefore around 0mV usage XD
If you get tasks which would have run on 2 CPUs at minimum frequency, using only 775mV each, and put them to run on only 1 CPU at MAX frequency at 1075mV, you still have about 400mV battery savings. Now lets say its something which would have used 4 CPUs, but you end up using only two.... then the battery savings double to 800mV.

Final answer...it depends on your tastes, what do you prefer most? Multitasking or battery saving.
Personally I keep it enabled, but not aggressive.
But if you really don't care about multitasking, you may as well leave it as aggressive.

Hah, thanks for the guide-- I am pretty well versed in task / resource allocation on multi-threaded systems, though

Main reason I was asking was because I haven't a clue what some of the values are on this interactive gov. Just wanted to make sure they didn't clash! I'll chance it to "Enabled" rather than "Aggressive," because a compromise between the two sounds the best

As for Performance gov-- default setting on this flarport kernel, didn't bother to check it until I noticed that any time a core was on, it was racing at 2.5ghz, even with nothing going on. Battery pretty much committed suicide :(
 
Last edited:

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Hah, thanks for the guide-- I am pretty well versed in task / resource allocation on multi-threaded systems, though

Main reason I was asking was because I haven't a clue what some of the values are on this interactive gov. Just wanted to make sure they didn't clash! I'll chance it to "Enabled" rather than "Aggressive," because a compromise between the two sounds the best

As for Performance gov-- default setting on this flarport kernel, didn't bother to check it until I noticed that any time a core was on, it was racing at 2.5ghz, even with nothing going on. Battery pretty much committed suicide :(

LOL I suggest you change kernel asap! If the dev uses uses Performcance gov as his default he doesn't know what he is doing XD

And no, as far as I know governor tunables won't ever clash with MPS.
 

smeejaytee

Inactive Recognized Contributor
Sep 29, 2013
7,820
4,106
43
kent
Xiaomi Mi 10T / 10T Pro
You're welcome! Pleasure to help.
But I'd appreciate if you press the thanks button on the relevant posts which helped you. That's the XDA way :D :good::good:
Hi mate, I wondered if I could ask your advice, I want to set interactive up on my maw Android TV box it's quad 1.5gb and I want maximum performance as its constantly plugged in, there is no battery so that's not an issue,
Sorry if you think this OT but I thought I'd ask you as you know the governor well, thank you in advance mate.

Sent from my HTC One_M8 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Hey guys, Kyuubi10 back once again with another Guide.
    I thought it might be useful to pop in a couple results of my trial and error for the HTC One M8.

    Note: This is not scientifically, calculated accurate, but it's close enough, based on estimates.

    After following these guides:
    http://xdaforums.com/showthread.php?t=2769899
    https://vjnaik.wordpress.com/2015/06/25/kernel-tweak-interactive-governor-paramaters-rooted-phone/

    I decided to make a summary guide of the above but with specific HTC One M8 values.

    Since I agree with the idea of "race to idle" embodied in the Wheatley governor, I tried emulating that on the Interactive governor while also keeping it as efficient as possible.

    Here are the values (all others not mentioned, leave default):
    Code:
    [B]above_hispeed_delay [/B]- 80000 2265600:10000
    
    [B]go_hispeed_load[/B] - 95
    
    [B]hispeed_freq[/B] - 1728000
    
    [B]io_is_busy[/B] - 1
    
    [B]min_sample_time[/B] - 10000
    
    [B]target_loads[/B] - 45 729000:80 883200:50 1267000:85 1497600:50 1728000:90 1958400:50
    
    [B]timer_rate[/B] - 10000
    
    [B]timer_slack[/B] - 5000

    "above_hispeed_delay" makes sure that longer time is spent on the frequency step 1.72Ghz, before quickly raising higher into max freq.
    1.72Ghz is the most energy efficient frequency with a good performance, e.g. it will not cause lag during casual usage, while it uses minimal voltage.
    If the load is too high for this frequency to handle, I set the time short once it's gone over this freq step so that it will not waste time before reaching max freq. Thus dealing with the issue asap.

    Another important parameter is "target_load", with this I have defined that at each efficient freq step the load needed to overcome it would be higher than normal. But it would up-scale quickly when using non-efficient frequencies.

    The other parameters I have set so that the frequency is lowered as soon as CPU load is finished, so that it will rush back to idle as quickly as possible.

    The interesting thing about this set-up is that for general, non heavy usage, it basecally functions as if I have underclocked to 1.72Ghz, but when the CPU is truly pushed it reaches up to 2.5Ghz which is my Overclocked max freq value.
    Thus both saving battery and providing high performance.

    I have felt no lag, and it's been quite a smooth experience while I used this :)
    Combined with using GPU rendering (found in developer settings), and Seeder, the over all usage is pretty good.
    Battery usage has been very efficient and I have managed to squeeze out an extra hour or two using this.

    I highly recommend it!
    Hope I helped you guys... don't forget to press the thanks button if you also feel that I did!:good::good:
    2
    I noticed I have some governor settings left at 0 or blank. I did some quick googling, found some other tweaks for the M8 and the interactive governor. So I played around a bit, and I think the following would be useful to add to the above tweaks.

    -----------------------

    sampling_down_factor: 60000
    sync_freq: 1036800
    up_threshold_any_cpu_load: 65
    up_threshold_any_cpu_freq: 1190400
    boost: 0
    boostpulse_duration: 80000

    --------------------

    Also of note there is not a entry for " io_is_busy " under the Interactive governor under ElementalX Sense kernel v6.03. I believe it's possible to modify the governor to add the function, if it's desired.

    Hope this helps others. :)
    2
    Does it affect gaming performance?

    Hey dude, next time quote me :) Otherwise I might have not seen your comment until 3 months from now, you are lucky I felt like reading through my guides today lol.

    Well, Interactive is great for gaming since it provides a low latency performance. Due to the timer system, the CPU is most of the time ready to go, without needing to raise the frequency too much.
    The tweaks I provided are more meant to give more battery savings with average daily use, but they won't affect game play much due to the high CPU load games cause anyways.

    Happy Gaming, remember to leave a like if I helped you!
    If you have anymore questions feel free to reply to this comment.
    2
    Hello kyuubi10 thanks for your help, would it be ok to change mp decision to battery saver mode ? Whats your take on that?

    It's in the ex app mate, it uses a less aggressive version of mpdecision to saver on battery power but I can't say that I noticed much improvement TBH.

    Sent from my HTC One_M8 using Tapatalk

    Well, I use adiutor, so I don't have that option.
    I am happy with my phone how it is (if it wasn't for the damned plug issues XD)

    But @lil_kujo, as @smeejaytee said....he hasn't noticed much improvement.
    So I'd trust his advice :)
    2
    Wow, this is awesome! I had the performance gov on, which just destroyed my battery. Now, I have a question for you!

    What is your take on "Multicore Power Savings" ? I'm using a flarport kernel which has it set to aggressive by default. Should this be changed to anything else while using your gov settings? Thanks for any assistance!

    You had performance on?? You do realise that the perf gov basically keeps your CPU cores running on max frequency all the time right?
    No wonder your battery was dying XD
    Anyhoo....good thing you found my guide :)

    Now, about multicore power savings, as usually with most things you will be compromising something to gain something else...always keep that in mind.
    With MPS you'll be giving up some multitasking, in order to gain some battery savings.
    Why (you may ask)?

    Well, think about a to-do list, and for each list you have one person completing the tasks within that list. Let's say you have four lists and 4 people completing those tasks.
    What MPS does is it takes as many tasks as possible and places them within a single list, for one person to do. At the end of the day that one person will have done a lot of work, while the other 3 will have done very little work. The drawback? The work was completed much slower, because only one person was doing it.

    Why can MPS be good? It is the way it chooses which CPU to use to add the tasks to, it chooses CPUs which are already turned on, rather than turning a new one on.
    The frequency voltages on each core range from the lowest of 775mV, to the highest of 1075mV. That's a 300mV increase in battery consumption between lowest frequency and highest. (Mind you, 1075 for me is an overclocked value, if you are not OC then it will be even less)
    When CPU cores have nothing to do they get turned off....they don't idle at 775mV....they are literally off. Therefore around 0mV usage XD
    If you get tasks which would have run on 2 CPUs at minimum frequency, using only 775mV each, and put them to run on only 1 CPU at MAX frequency at 1075mV, you still have about 400mV battery savings. Now lets say its something which would have used 4 CPUs, but you end up using only two.... then the battery savings double to 800mV.

    Final answer...it depends on your tastes, what do you prefer most? Multitasking or battery saving.
    Personally I keep it enabled, but not aggressive.
    But if you really don't care about multitasking, you may as well leave it as aggressive.