Im using it on the AOSP 2.0.1 rom for the CDMA Hero. I don't notice a whole lot of difference.
Did you have any improvement? Would be soooo cool if someone would include this into the ROMs.
BB.
Im using it on the AOSP 2.0.1 rom for the CDMA Hero. I don't notice a whole lot of difference.
# Step 1:
# On your computer in a command line window open a shell via adb:
#
[B]adb shell[/B]
# Step 2:
# View the current content of minfree (i.e. the current settings)
# ('cat' just prints the content of any file to the console)
#
[B]cat /sys/module/lowmemorykiller/parameters/minfree[/B]
# Step 3:
# Overwrite the 'file' with new values, using echo:
# (of course this is no real file, so the values don't get written,
# instead you simply adjust the kernel's current parameters)
#
[B]echo "1536,2048,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree[/B]
adb remount
adb pull /system/init.d/ramzswap.sh .
echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree
adb remount
adb push ramzswap.sh /system/init.d/
adb remount
adb pull adb pull /system/etc/init.d/99complete . <-- don't forget the dot :p
[I]added[/I]
echo "1536,2048,4096,5120,15360,23040" > /sys/module/lowmemorykiller/parameters/minfree
[I]to the end of 99complete[/I]
adb push 99complete /system/etc/init.d/.
adb shell chmod 755 /system/etc/init.d/99complete
adb reboot
Hy all.These values can be directly edited in your initrc
*APP_ADJ, *APP_MIN_ADJ, *ADJ, *PROVIDER_MEM, *SERVER_MEM and *APP_MEM
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 4096
setprop ro.HOME_APP_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 5632
setprop ro.EMPTY_APP_MEM 6144
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
Why do I have to disable Compcache? I thought this was ment to speed up the phone.
Why can't compcache and the oom killer work side-by-side?
...
I also found the following line :
So it seems that changing the numbers associated with every constant is not enough ...Code:write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
Thank you very much for this hint androcheck! . I "hijacked" one of the scripts in /system/init.d/ and added your tweak, now the changes survive reboots and the device is extremely snappier
# Make the /system/ filesystem read-/writeable:
#
[B]adb remount[/B]
# Download the identified script to your computer
#
[B]adb pull /system/init.d/ramzswap.sh .[/B] # <-- don't forget the dot
# Now the script file should be in your local working directory on your
# computer. Open it with an editor ([B]do not use notepad.exe[/B] under windows,
# as it cannot display linux-style linebreaks correctly). Under Windows
# I can recommend notepad++ or use Wordpad if you don't have anything
# else. Under Linux every text editor should be ok.
#
# [B]Insert[/B] the "echo" command [B]at the end of the file![/B]
# For example:
[B]echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree[/B]
# Save the file and copy it back to your device into the directory, where
# you pulled it from.
#
[B]adb push ramzswap.sh /system/init.d/[/B]
# Make it executable again:
#
[B]adb shell chmod a+x /system/init.d/ramzswap.sh[/B]
#
# Restart your phone.
# If you did everything right, and it boots normally, you can check
# if the script works by displaying the current settings:
#
[B]adb shell cat /sys/module/lowmemorykiller/parameters/minfree[/B]
# This should give you the 6 numbers you added in the echo command to
# the init-script.
FOREGROUND_APP:
// This is the process running the current foreground app. We'd really
// rather not kill it! Value set in system/rootdir/init.rc on startup.
VISIBLE_APP:
// This is a process only hosting activities that are visible to the
// user, so we'd prefer they don't disappear. Value set in
// system/rootdir/init.rc on startup.
SECONDARY_SERVER:
// This is a process holding a secondary server -- killing it will not
// have much of an impact as far as the user is concerned. Value set in
// system/rootdir/init.rc on startup.
HIDDEN_APP:
// This is a process only hosting activities that are not visible,
// so it can be killed without any disruption. Value set in
// system/rootdir/init.rc on startup.
CONTENT_PROVIDER:
// This is a process with a content provider that does not have any clients
// attached to it. If it did have any clients, its adjustment would be the
// one for the highest-priority of those processes.
EMPTY_APP:
// This is a process without anything currently running in it. Definitely
// the first to go! Value set in system/rootdir/init.rc on startup.
// This value is initalized in the constructor, careful when refering to
// this static variable externally.
# cat /sys/module/lowmemorykiller/parameters/minfree
1536,2048,4096,5120,5632,6144
# echo "1536,2048,4096,5120,15360,23040" > /sys/module/lowmemorykiller/parameters/minfree
echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree
These settings could apply to all Android builds, as Android has a built-in task killer for memory management. And no, its not a fallacy (I mean the built-in Android task killer is not a fallacy). It does speed up the phone. The *free* RAM is not unused. Rather it's used by Linux to cache the file system, which does speed things up.
This is a Hero thread and quite a few months old. Also FYI - taskillers are a fallacy. Increasing the amount of free ram will only serve to reduce the number of apps you can run simultaneously it will NOT speed up your phone.