CPU settings [in CM9/CM10] (vsel, governor, io scheduler)

zakoo2

Senior Member
Mar 16, 2011
1,298
356
0
Budapest
Hey guys, as things started to get out of control in the CM10 development thread about CPU settings I thought I'd start a

thread for this purpose.
This is not a guide, it's just for general discussion, everyone can share their settings/experience, though I ask everybody
to share the ROM used for those settings!
I do not take any responsibility for any harm done by applying these settings/tweak, use them on your own
risk!


So, let's get to it:

Here are two things which everyone should read before asking questions:
Governors, modules, schedulers, tweaks: http://forum.xda-developers.com/showthread.php?t=1369817
Voltage, Vsel, MHz: http://androidunderground.blogspot.hu/2011/05/setvsel-overclock-and-undervolt-your.html

GOVERNORS:
Here's what I know about Quarx and Epsylon3 roms:
There has been a general fuzz about the smartassv2 governor, which turns out to already be implemented in both roms named
'boosted', although the preferences of the governor might differ from what the ported droidx governor has.
Just to avoid confusion: Quarx did NOT change anything in the 04/08 build, he only set the default governor to boosted and
i/o scheduler to 1, which is SIO (so far it was Noop).

Default boosted preferences:
Code:
bst_awake_ideal_freq: 800000
bst_debug_mask: 0
bst_down_rate_us: 97000
bst_max_cpu_load: 70
bst_min_cpu_load: 40
bst_ramp_down_step: 160000
bst_ramp_up_step: 160000
bst_sample_rate_jiffies: 2
bst_sleep_ideal_freq: 300000
bst_sleep_wakeup_freq: 300000
bst_up_rate_us: 52000
The difference between boosted and the ported smartassv2 is in the preferences.

Here are the settings I use: (it gives me smoother experience than the default ones, although it might drain the battery a
bit more)
Code:
bst_awake_ideal_freq: 800000
bst_debug_mask: 0
bst_down_rate_us: 99000
bst_max_cpu_load: 75
bst_min_cpu_load: 45
bst_ramp_down_step: 0
bst_ramp_up_step: 0
bst_sample_rate_jiffies: 2
bst_sleep_ideal_freq: 200000
bst_sleep_wakeup_freq: 800000
bst_up_rate_us: 24000
I/O SCHEDULERS:
There are three schedulers available on the defy by default: Noop, Cfq and SIO.
The default one can not be changed from bootmenu (at least not on the 30/07 Quarx MB526 build), but you can download Voltage Control from Play Store which enables you to change I/O schedulers and governors.
You can check which scheduler is the default one in /sys/block/mmcblk0/queue/scheduler (the default is the one in brackets).

VSEL/MHZ VALUES:

WARNING! Changing the default vsel values may harm your CPU or cause system lags, freezes, reboots! Use them with caution!
The settings one uses might not be good for others, everyone test their settings thoroughly before using it long term!

Here's the formula for calculating actual voltage from vsel:
V = 0.0125*VSel + 0.6

The default values for each frequency are the following:
[email protected]
[email protected]
[email protected]
[email protected]

These are without a doubt quite a bit higher than needed, probably to make sure all CPUs run stable.
This means that the Defy/Defy+ can be seriously undervolted without any harm (too much undervoolting does no harm to the cpu,
the device simply reboots).

Here is a formula for calculating the vsel from the frequency, which is proved to be stable for most (not all!): (MHz/20)+2
This gives the following settings:
[email protected]
[email protected]
[email protected]
[email protected]

I have been using these settings for almost a year now along with others, never had any trouble with it, but again,
this might not work for everyone.
You can test each value with an app called 'StabilityTest' from Play Store.
Run it for 15 minutes, and if the phone doesn't reboot, then it will most likely work.

For the lazy ones, here's an app that calculates the needed vsels with the formula above:
http://forum.xda-developers.com/showthread.php?t=1815142

Again, this is not a guide, and do not rely 100% on anything written here (I don't want to mislead anybody, I'm no expert,
just a regular user with a hunger for knowledge :p)
If I have missed something or have written false data, please PM me and I will correct/add it!
 
Last edited:

Sir Flashalot

Senior Member
Feb 5, 2011
541
257
0
Camelot
My settings:

17/300
26/600
38/800

Using SetVsel with SmartassV2 governor.

dm-0 sio
dm-1 sio
dm-2 sio
mmcblk0 sio
mmcblk1 sio

Above sio settings can be attained by running the KickAssKernelizer script from zeppelinrox and select KAK option.

And 100% V6 superCharged of course from RC11 test 4 script.
 
Last edited:

Sir Flashalot

Senior Member
Feb 5, 2011
541
257
0
Camelot
An overview from the KAK script to tweak I/O schedulers. Ther're all sio now. Before running the script, some were cfg.

-edit already set iosched_sio to 1 before in CWM cpu settings but the KAK script does the real trick.
 
Last edited:

zakoo2

Senior Member
Mar 16, 2011
1,298
356
0
Budapest
kickasskernelizer is already included in zeppelinrocks new supercharger rc (update9-rc11), at least while running the .sh it wrote that kickasskernelizer is being installed or something like that...
 

on&off

Member
Sep 3, 2012
21
25
0
undervolting values for battery time

hardware: motorola mb525 jordan, green lense soc;

governer = ondemand;
clock/vsel = 300/18; 550/30; 800/42;
up_threshold = 99;
sampling_rate = 100000;

has served me well, for almost a year on miui (gb from miuiandroid.com)
and since then on cm10 (jb from quarx)
with stable performance and great battery time

though i must admit it might disappoint some
on the interaction smoothness front

now that i have four values to deal with in the new kernel
i have to rise from slumber and try find new values to sleep with
will (probably) report back when i have them

hope this helps, good luck
 

on&off

Member
Sep 3, 2012
21
25
0
Boosted Governor Tunable Parameters

Thought this info from the Repo might help some:

Code:
/******************** Tunable parameters: ********************/

/*
 * The "ideal" frequency to use when awake. The governor will ramp up faster
 * towards the ideal frequency and slower after it has passed it. Similarly,
 * lowering the frequency towards the ideal frequency is faster than below it.
 */
#define DEFAULT_AWAKE_IDEAL_FREQ 500000
static unsigned int awake_ideal_freq;

/*
 * The "ideal" frequency to use when suspended.
 * When set to 0, the governor will not track the suspended state (meaning
 * that practically when sleep_ideal_freq==0 the awake_ideal_freq is used
 * also when suspended).
 */
#define DEFAULT_SLEEP_IDEAL_FREQ 200000
static unsigned int sleep_ideal_freq;

/*
 * Frequency delta when ramping up above the ideal frequency.
 * Zero disables and causes to always jump straight to max frequency.
 * When below the ideal frequency we always ramp up to the ideal freq.
 */
#define DEFAULT_RAMP_UP_STEP 160000
static unsigned int ramp_up_step;

/*
 * Frequency delta when ramping down below the ideal frequency.
 * Zero disables and will calculate ramp down according to load heuristic.
 * When above the ideal frequency we always ramp down to the ideal freq.
 */
#define DEFAULT_RAMP_DOWN_STEP 160000
static unsigned int ramp_down_step;

/*
 * CPU freq will be increased if measured load > max_cpu_load;
 */
#define DEFAULT_MAX_CPU_LOAD 70
static unsigned long max_cpu_load;

/*
 * CPU freq will be decreased if measured load < min_cpu_load;
 */
#define DEFAULT_MIN_CPU_LOAD 40
static unsigned long min_cpu_load;

/*
 * The minimum amount of time to spend at a frequency before we can ramp up.
 * Notice we ignore this when we are below the ideal frequency.
 */
#define DEFAULT_UP_RATE_US 52000;
static unsigned long up_rate_us;

/*
 * The minimum amount of time to spend at a frequency before we can ramp down.
 * Notice we ignore this when we are above the ideal frequency.
 */
#define DEFAULT_DOWN_RATE_US 97000;
static unsigned long down_rate_us;

/*
 * The frequency to set when waking up from sleep.
 * When sleep_ideal_freq=0 this will have no effect.
 */
#define DEFAULT_SLEEP_WAKEUP_FREQ 300000
static unsigned int sleep_wakeup_freq;

/*
 * Sampling rate, I highly recommend to leave it at 2.
 */
#define DEFAULT_SAMPLE_RATE_JIFFIES 2
static unsigned int sample_rate_jiffies;
 
  • Like
Reactions: mikrom.cz

nitin55

Member
Apr 10, 2012
26
15
0
Mumbai
i have the following settings
Clock/vsel
300-17
600-32
800-42
1100-57
Governor-Boosted
Scheduler-sio
and this has been very good for me. Getting good performance as well as Battery life with these values on my Cm10(18-10-2012) build.:)
 
Last edited: