governor strategy - T-Mobile, Samsung Galaxy SIII

I've been thinking a lot about governors lately.
I'm thinking now that you want the cpu to ramp up as fast as possible to complete the task as fast as possible and then go back to sleep, i.e. ondemand.
A given task takes a specific number of clock cycles to complete so your clock frequency simply dictates how long until the task completes.
A cpu has static losses, leakage currents and whatnot, that are there regardless of frequency.
So unless your energy per clock cycle goes up with frequency, it seems you'd want to run as fast as possible to minimize static losses.
I also would guess you want the second core to stay off as much as possible.
Any thoughts or opinions?

MrTallboy said:
I've been thinking a lot about governors lately.
I'm thinking now that you want the cpu to ramp up as fast as possible to complete the task as fast as possible and then go back to sleep, i.e. ondemand.
A given task takes a specific number of clock cycles to complete so your clock frequency simply dictates how long until the task completes.
A cpu has static losses, leakage currents and whatnot, that are there regardless of frequency.
So unless your energy per clock cycle goes up with frequency, it seems you'd want to run as fast as possible to minimize static losses.
I also would guess you want the second core to stay off as much as possible.
Any thoughts or opinions?
Click to expand...
Click to collapse
Sounds a lot like ktoonservative.

Aerowinder said:
Sounds a lot like ktoonservative.
Click to expand...
Click to collapse
Yeah, ktoonservative lets you configure pretty much everything. The thing I was struggling with was setting up_threshold and sampling rate. It seems like depending how fast it's evaluating load, processes could build up and force the second core on when it isn't really needed. It seemed like the 2nd core turned on less with a faster sampling rate.
I don't know the down side of sampling too fast.
Pegasusq seems pretty cool in that the 2nd core turns on based on frequency and queue rather than just load. You can pretty much control exactly when the 2nd core comes on.
I'm trying out msm-dcvs right now even though I don't really know what it does and it's apparently not configurable. I'm not on ktoonsez at the moment so I don't have many choices.

Related

[Q] SetCpu Advanced Tab Settings

Can someone tell me what ideal settings they have found for setcpu, particularly in the advanced tab? I would like to play around with the Sampling Rate, the Up threshold and Power Save Bias.
I know it is some what ROM and Kernel specific but a push in the right direction would be helpful.
I am running S3VO ROM by Deck and I am using NetArchy 3.7.8b.
Thank you very much!
I'm also interested in this!
Moto Droid running ChevyNo1's SS 4.6 Froyo ROM and his newest ULV 1.25ghz kernel. My battery life isn't bad but wondering if it could be better.
Also wondering if this would help fluidity on my homescreen scrolling. If i keep the min @ 250 the scrolling is choppy (presumably because the ondemand scaling doesn't increase from 250 fast enough to handle it) but if I keep the min @ 400 then it runs much smoother. Does anybody know if the Sampling Rate or Up Threshold would affect this?
I don't know a whole whole lot about it, but I'm pretty sure the Sampling Rate determines how often the cpu load is checked and the Up Threshold is the load required before it will clock up or down. I don't know too much about the other two and haven't played with them too much. Higher sampling rate and higher up threshold should conserve battery theoretically, but the 20 second upper limit is way too long without checking cpu load, so be careful there. I use 50000 (half a second) with a 90 up threshold personally to conserve a little battery but mainly so I don't lock up my phone when turning the screen on (245 frequency limit while screen is off). I'm no expert, but that's what I've seen from my experience. I'd like to know what others have to say as well.
axlebot said:
I don't know a whole whole lot about it, but I'm pretty sure the Sampling Rate determines how often the cpu load is checked and the Up Threshold is the load required before it will clock up or down. I don't know too much about the other two and haven't played with them too much. Higher sampling rate and higher up threshold should conserve battery theoretically, but the 20 second upper limit is way too long without checking cpu load, so be careful there. I use 50000 (half a second) with a 90 up threshold personally to conserve a little battery but mainly so I don't lock up my phone when turning the screen on (245 frequency limit while screen is off). I'm no expert, but that's what I've seen from my experience. I'd like to know what others have to say as well.
Click to expand...
Click to collapse
Very good advice ... I have seen slightly improvement on putting this into my settigns...
axlebot said:
I don't know a whole whole lot about it, but I'm pretty sure the Sampling Rate determines how often the cpu load is checked and the Up Threshold is the load required before it will clock up or down. I don't know too much about the other two and haven't played with them too much. Higher sampling rate and higher up threshold should conserve battery theoretically, but the 20 second upper limit is way too long without checking cpu load, so be careful there. I use 50000 (half a second) with a 90 up threshold personally to conserve a little battery but mainly so I don't lock up my phone when turning the screen on (245 frequency limit while screen is off). I'm no expert, but that's what I've seen from my experience. I'd like to know what others have to say as well.
Click to expand...
Click to collapse
Sampling Rate – An interval (in microseconds) at which the governor will poll for updates. When this happens, the governor will decide whether to scale the CPU up or down.
A microseconds is a milionth of a second .. => half a second is 500000 microseconds not 50000

Governor test, cpu speed vs. load, achieving better battery?

I am running Chad's 12-23 kernel on a mostly stock ROM, and have been testing between the on demand governor and the smartass governor, trying to determine which would give better battery life. I ran a log over a 1 minute period with the phone on/awake, but idle. I did NOT kill any background processes, and ran both tests back to back so running processes shouldn't have changed.
Over a one minute period, the governors averaged the following:
On demand
264 mhz
20% load
Smartass
371 mhz
14% load.
As a side note, the smartass governor scores slightly, yet consistently higher on quadrant, seems to run a much more stable framerate on the planet-and-moon graphics test.
so which should be better for batter, and why? lower speed, or lower load?
In general, smartass should provide better battery life than ondemand since it doesn't scale upwards as violently.
Sitting idle with the screen on isn't the best condition for comparing different governors. Since the governors affect the speed and level of scaling, you would want to test under conditions that have more dynamic processing needs.
While it doesn't answer all the questions you have, you might find this helpful:
Effects of CPU Frequency and Screen Brightness on Power Consumption
The funny thing is that even the On Demand governor on this kernel seems modified. On the stock kernel, on demand usually idles much higher, 600-700 mhz. So whatever changes Chad has made overall are causing on demand to be more conservative as well.
I don't really know a method to test under more dynamic circumstances. I'm simply observing in System Panel. But the logging feature it has doesn't get super detailed with CPU speed. Only the realtime monitor. About the only "test" I could do was to scroll the app list up and down on the system panel screen. This causes the mhz and load to jump up pretty much immediately to 800+ mhz. I did not see ANY difference in this between the two governors, they both seem to ramp up equally aggressively, and both would jump to about the same mhz.
bast525 said:
I don't really know a method to test under more dynamic circumstances.
Click to expand...
Click to collapse
You could set up scripts that run various commands/processes, with sleep times in-between.
Do you have Tasker? You could set up Tasks that not only would automate various processes, thereby exposing your CPU to dynamic (yet controlled) conditions, but Tasker now has %CPUFREQ which could record the current CPU frequency throughout the test.
There are also the Frequency Stats to the be found in SetCPU, Android System Info, or I'm sure a host of other apps. They show you how long your CPU has spent at any given frequency. The only catch is that I don't know how to reset those stats (as it's not really a function I use).
Since you are concerned with power use, you would also want part of your logging to include mA current being drawn from the battery.
Just brainstorming. There are a lot of ways you could set up more controlled tests.
OK, so digging a little bit, this should be even easier than I thought. The Frequency Stats are contained in /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
It looks like rebooting can reset them, but I haven't yet figured out a way to reset them without resetting the device. But it doesn't really matter Once you come up with a testing script, you can have it store a copy of time_in_state at the very beginning of the test, and then again at the end of the test. That way, you can simply compare the time_in_state at the end of the test to the one at the beginning to see just the influence of that test.

[Q] Power Consumption and Clock Speed...

Question: if the kernel will go into deep sleep whenever it has nothing to do, what is the benefit in regards to power consumption of pinning the clock speed real low when the screen is off?
I ask because common knowledge, at least from what I've seen around, is that the low-clock "screen off" profile is common sense. But today I tried not having that profile, and I see that the CPU goes into deep sleep a lot more time now, and my battery life is the same if not actually better than before.
True, ROMs and kernels are still changing so much that it's difficult to dedicate enough time to one configuration to actually determine it's efficiency over time, which is why I wanted to throw this out here, see if anyone with more knowledge can answer.
If the CPU is under a certain amount of load, I would imagine that, for instance, in an Ondemand governor with a very low Up Threshold, the CPU will spike to a high speed until it's done, then sleep the rest of the time until the next load. If constrained to a low clock speed, it'll work on it, slow but steady, until it's done.
Is the high voltage required for that spike offset by the voltage savings of going to sleep, and is the total voltage consumption at the end of the load lower than the alternative, that is, stick to a low clock cycle, consuming what I assume is lower voltage, but for a longer amount of time? Is voltage consumption as clock cycle speed increases linear, or exponential?
If the power consumption increases exponentially as clock speed increases linearly, then it might be better for power consumption to restrict the processor to lower speeds. But if power increase is linear, then it would be better, I believe, to let the CPU finish with it's load as fast as it can, so it can go to sleep faster.
Any thoughts, ideas?
To Quote from Wikipedia's Overclocking page:
Increasing the operation frequency of a component will usually increase its thermal output in a linear fashion, while an increase in voltage usually causes heat to
increase quadratically
Click to expand...
Click to collapse
I know nothing about the Galaxy S II specifically, but most Android phones scale both voltage and clock-speed together, leading to exponential power increases when clocking up. Thus, in theory, you should see better battery life with a lower CPU limit with screen-off.
If in your case you have constant voltages across the board, that would explain why you see no benefit from a screen-off profile.
Finally, if you do have constant voltages across clock-speeds, then you probably could lower your voltages at lower speeds and thus realize a benefit.
YMMV, of course
Yes but if you have processes running in the background like large file downloading then the phone won't be able to process any of them
Sent from my SGH-T989 using xda premium

Setcpu Profiles

Hey guys, I'm just wondering what settings do you have on your setcpu for the best performance and battery life? I'm totally new to this lol
Sanks
kazemagic said:
Hey guys, I'm just wondering what settings do you have on your setcpu for the best performance and battery life? I'm totally new to this lol
Sanks
Click to expand...
Click to collapse
i i think that ondemand is the best for daily using... i'm using cm10 rom and i have some music problem so i'm using interactive and it's ok. if you don't use games or heavy apps, you can underclock it to 1ghz or even less and put on powersave.. but you have to try and find the best for you
My setup is a little complicated. I use the ondemand governor, then for the profiles I make it use powersave and under 760mhz between 1am and 8:30am which seems to really help during the night. Also set it to use 760mhz max when the screen is off.
When charging or above 40% battery I allow it to run full speed, but only when the screen is on, therefore helping charge times. On charge or above 80% I set the governor to performance.
In call I set the clock to max 1000mhz and conservative to try and allow calls on low-battery to work properly without lag but also without killing the battery.
I have a couple of other options set for very low battery ( < 12% ) too, but those are only to extend the battery if it's dying.
I wouldn't say all this is necessary... but I need my phone to keep working at all times as I use it for receiving business calls.
It's just a matter of playing around really... depends what you use the phone for. For the most part tell it to use lower clock speeds when you don't need them so much (when phone is off, during the night, during call etc) but you will really notice the speed difference if it's underclocked while you use it, so I tend to allow it to use full whack when screen is on, unless the battery is low.
I also set up profiles to make things like Bloons TD4 run in performance mode and min of 1000mhz, to keep them smooth . Drains the battery though!
lol setcpu does a really good job at battery saving. When using ondemand, my phone can last more than 2 days (if it's on standby)
Have you guys tried under-vaulting? What does it rlly do?
kazemagic said:
lol setcpu does a really good job at battery saving. When using ondemand, my phone can last more than 2 days (if it's on standby)
Have you guys tried under-vaulting? What does it rlly do?
Click to expand...
Click to collapse
If you mean decreasing the voltage on the CPU, no I haven't. From my experience in desktop PCs however, if the CPU voltage is too low it can lead to hardware issues and instability.
If something needs a certain amount of power, and you give it less, it will either try and draw more amps which increases heat and can fry components, or won't work properly. You could probably "under-volt" the CPU at the same time as reducing the clock speed however, but your performance will suffer. When the processor is set to be ondemand it underclocks itself when not in use anyway
The biggest battery drain is screen and radios, concentrate on using them less. Underclocking the CPU will make the phone last longer when in use, but usability will suffer and turn your super fast smart phone into a sluggish one. I only make mine stay underclocked when the screen is off, during a call, or on low battery. During general use I let it do its thing .
UV(Under volt) is actually not to bad. Don't ever set those values at boot, else when they are too low, it will cause BOOTLOOPS. It just reduces the amount of power allowed for the cpu to use, thus it won't use more than required. You can't really ask a person for his/her uv values, as no 2 chips are created equal.
People stating that they UC(underclock) their device is not quite right. We don't have much control over our cpu's to be honest. If you run tegra stats whilst using you're phone, you'll see what I mean. It will sometimes(happens quite often) just bump up to higher frequencies to which you UC them. Also as soon as the screen is locked and unlocked the max cpu frequency set by the governor will just return(for example: say stock is 1500mhz, and you set it to 1400mhz, it will return to 1500mhz after an unlock). Ondemand is very very good for battery and performance. But remember you have to tweak those values individually in order to optain the best possible performace for the given task you want. Whether it is for battery or performance.
It's actually also a lot better to just tweak those values as to TRY and uc. Uv will stick, UC not!
Here is a small example as to battery saving and performance values for ondemand governor:
sampling rate:---------60 000 ----- 30 000
up threshold:--------------95 ----- 60
sampling down factor:-------2 ----- 8
powersave bios: ------------3 ----- 0
ignore nice load:------------0 ----- 0
io is busy:------------------0 ----- 0

[Q] Has anyone ever underclocked One X?

So I tried to underclock my One X to around 640 MHz and it was running VERY smoothly and stable with only 2 cores active. I was using the ViperX 2.2.1 ROM and the Kernel was the no OC NCX 0.99a. The battery life wasn't bad, but has anyone tried underclocking to 1 GHz or lower? If so, how is the battery life and what kernel and ROM did you use?
With SetCPU you can change the max. CPU, but why should you? When the phone doesn't need much processor power, it just scales down by itself.
So, it already has the best underclocker there is.
Mayby you could try undervolting to save even more battery, but that means the CPU can be somewhat less steady.
im trying to get my head around UVing / UCing my HOX. is there any guide around? im trying to search through the forum but still no luck.
ricopoetra said:
im trying to get my head around UVing / UCing my HOX. is there any guide around? im trying to search through the forum but still no luck.
Click to expand...
Click to collapse
underclocking means the CPU runs slower so should use less battery but slower CPU speeds also means to takes longer to preform tasks which could use more battery, check on google most places say its not worth it as that battery saved is tiny and not worth the drop in CPU performance.
undervolting however lowers the voltage that CPU uses while working this does save power and also lowers heat (less voltage less heat) but if you lower it to much then the CPU becomes unstable due to lack of power and well crashes and restarts the phone in most cases.
to get the best out of undervolting you need to lock the max CPU speed to each step (CPU speed, 300mhz, 600mhz and so on) and slower the voltage and then run a bench mark (like antutu) and see if its stable, if it is you lower the voltage again and repeat until it crashes at which point you have found the lowest voltage that the clock speed can handle so you jump up a voltage then more on to the next speed.
it takes along time but that would get you the best undervolt your phone and hardware could handle.
or you can just use the global to lower the voltage for every speed, this is much faster and much less time consuming but you don't get the most out of it.
for this you basically drop the voltage then use your phone for different things; browsing, games, benchmark and see if it crashes if not lower again till it does then go back up a step.
thanks for explaining. I'm getting some of the points that I missed Awhile ago. I guess I'm going to try the longer way of doing it.
Sent from my White HOX JB PA 2.10

Categories

Resources