As requested here, This is a short tutorial about setting and tweaking the cpu throttle and the memory settings in the gumbo.sh file.
Here's a copy of the file to help ask and answer questions:
A copy is attached to this post. READ THROUGH IT HERE SO YOU KNOW HOW TO OPEN IT. Simply pushing this file as is will set your Hero exactly like mine. That may work for you, but it may not. I recommend trying as is, then make small (1024 or so) adjustments.
The file is pretty well commented, but any questions just ask.
Here's a copy of the file to help ask and answer questions:
Code:
#
# gumbo.sh tweaker edition
# Lines marked with "#" are commented out and will not be read by the system
# Read through this entire file before you make any edits
# After editing, push this file to /system/init.d/ and reboot your phone
# Do not edit this file in any standard Windows text editor.
# Use Notepad++ if you don't understand why. It will automatically edit
# the file correctly and it is free.
# http://notepad-plus.sourceforge.net/uk/site.htm
# ---------------------------------------------------------------------------------
# This section will determine which CPU governor to use at boot
# Make sure only one line is active
#
# performance = whenever cpu is awake and active, it will be ramped up
# to the highest possible speed (528 Mhz in our case) This will give a great
# performance boost, but at the cost of battery life
#
# ondemand = when cpu is awake AND in use, it will ramp up to max. While not in use,
# the cpu is able to throttle down to save battery. While the screen is on,
# the cpu will be running 528 Mhz, while off and in use, it will run at 480 Mhz
#
# msm7k = when screen is on, the device will run at 480 Mhz normally. Under load,
# it will ramp to 528 Mhz. While the screen is off, it will run at 245 Mhz always.
# This is the default setting that the Hero shipped with, the custom kernel included with
# the ROM unlocks the other two governors
#echo "msm7k" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#-----------------------------------------------------------------------------------------
# The following lines pass values to configure the internal memory manager in
# your Android device. There are many different ways this can be configured.
# The first three entries are suggested settings, and should work well for most.
# The final line can be used for testing and tweaking. Once again, make sure only
# one line is uncommented
#Stock settings
#echo "1536,2048,4096,5120,5632,6144" > /sys/module/lowmemorykiller/parameters/minfree
#Semi-agressive settings
#echo "1536,2048,4096,5120,15360,23040" > /sys/module/lowmemorykiller/parameters/minfree
#Maximum free RAM settings. Not for use with SenseUI ROMS
#echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree
# ----------------------------------------------------------------------------------------
# Tweaker time.
# The first three values inside the quotes (1536, 2048, and 4096 should stay as they are
# You will see trouble keeping vital processes awake if you increase these values.
# The last three numbers are much more configurable.
#
# The fourth number in the list (10240) controls how much RAM "Hidden" processes are
# allowed to use. Hidden processes are called by the system at boot time, and are
# things that will not show up in a task manager app. In my testing, I have found
# that I can safely set the value to 10240. You may be able to go higher or lower,
# depending on how YOU are using your phone. Increase or decrease the number in
# multiples of FOUR. Example - DO NOT decrease the number by 1025. Decrease it by
# 1024 instead. 256 x 4 = 1024
#
# The fifth number (15360) controls RAM used by empty content providers. Empty
# is the key word. If you only use the Gmail app, the Android mail application is
# an empty content provider. The issue here is apps like Twitter and Facebook.
# If the app was coded correctly and sleeps properly when idle, it's associated
# content provider may be killed off. When the app needs that content, it will
# probably force close while waiting for it. If things like HTC's social network
# start force closing, decrease this number. Like above, use multiples of 4 when
# changing.
#
# The final number is "ghosts". Apps that were closed by the user remain in memory
# until the memory is needed elsewhere. This makes loading an app you've closed
# much quicker, at the cost of a little performance when opening new apps.
# Crank this one up to 25000 to increase the "snap" factor. Things like
# pulling down your notifications or opening a menu will stay very quick like they
# are right after a reboot. The offset is that when you close an app and need
# to jump back to it quickly, you have to load it again instead of it just redrawing
# Unless you're looking for it, you'll not notice it much. If you have to lower this,
# use multiples of 4 once again
#
# DO NOT UNCOMMENT THE FOLLOWING LINE. This is your baseline, in case you get things
# so screwed up you forget where you started. Trust me.
#
#echo "1536,2048,4096,10240,15360,25000" > /sys/module/lowmemorykiller/parameters/minfree
#
# EDIT THIS ONE INSTEAD.
echo "1536,2048,4096,10240,15360,25000" > /sys/module/lowmemorykiller/parameters/minfree
# This file is open source. It has absolutely no license whatsoever.
# As always, I am not responsible for anything, anywhere, at any time.
# Doing stuff like this is a good way to break your phone.
# You have been warned.
A copy is attached to this post. READ THROUGH IT HERE SO YOU KNOW HOW TO OPEN IT. Simply pushing this file as is will set your Hero exactly like mine. That may work for you, but it may not. I recommend trying as is, then make small (1024 or so) adjustments.
The file is pretty well commented, but any questions just ask.