Pages

Subscribe:

Ads 468x60px

Sunday, July 24, 2011

[SCRIPT] The Best RAM Optimization

MORE SMOOTHNESS, MORE SPEED, LESS LAGS
AND
ENOUGH FREE MEMORY


Requirements: Root, Kernel which supports init.d


Hi guys,
after long time of testing I found the best balance for RAM, this script will make your RAM in the best optimization, the best optimization means the best balance between free memory, multitask, speed of launching apps and system speed. It means that you'll still have enough free memory (you'll have free memory as much as you need, because it is not good if you have really a lot of free memory, because Android's work with memory is different from other OS) and you can fully use your multitask, my script doesn't kill your app automatically when you minimize it. Your system and switching between apps or launching apps will be very fast.

Now you don't have to use Task Killer!



CHANGES

Lowmemorykiller values
-Values which mainly affect your multitask and free memory. Values of my script were made for combination of using multitask and still have enough free memory.

VM values
-Very important values which affect your battery consumption, system speed and speed of launching apps.



Video by totallydubbed - Thanks to him




Here is the script:
Code:
#!/system/bin/sh
# Copyright© 2011 Juwe11

if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
 echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree
fi

if [ -e /proc/sys/vm/swappiness ]; then
 echo "50" > /proc/sys/vm/swappiness
fi

if [ -e /proc/sys/vm/vfs_cache_pressure ]; then
 echo "10" > /proc/sys/vm/vfs_cache_pressure
fi

if [ -e /proc/sys/vm/dirty_expire_centisecs ]; then
 echo "500" > /proc/sys/vm/dirty_expire_centisecs
fi

if [ -e /proc/sys/vm/dirty_writeback_centisecs ]; then
 echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
fi

if [ -e /proc/sys/vm/dirty_ratio ]; then
 echo "90" > /proc/sys/vm/dirty_ratio
fi

if [ -e /proc/sys/vm/dirty_background_ratio ]; then
 echo "5" > /proc/sys/vm/dirty_background_ratio
fi

INSTALLATION

1. Method for creating

1) Make file and add this code to it, if you make this script on Windows, set EOL to UNIX, then save file and name it for example "S97ramscript", if you have in your init.d other file with "S97" in name so use "S98" or "S96", etc., the name of file must be without extension

2) Then put your file to /system/etc/init.d with Root Explorer and set perm to 777 (rwxrwxrwx), if you have in your init.d other script for RAM management for example Darky's rambooster, so delete it

3) Reboot your phone


2. Method for creating

1) Download attached file (Juwe_RAM_Script.zip) unzip it and put it to /system/etc/init.d with Root Explorer and set perm to 777 (rwxrwxrwx), if you have in your init.d other script for RAM management for example Darky's rambooster, so delete it

2) Reboot your phone


3. Method for creating

1) Download attached file (Juwe_RAM_Script-CWM.zip) and install it with CWM



HOW TO CHECK IF SCRIPT WORKS

Download app Galaxy Tuner or AutoKiller Memory Optimizer and check values:
LMK values
10MB, 16MB, 24MB, 48MB, 56MB, 72MB
VM values
50, 10, 5, 10, 90, 5



ROM devs can use my script in their ROMs, but give the proper credit.




!!!WARNING!!!
INSTALL IT ON YOUR OWN RISK.

No comments:

Post a Comment