[Motorola Milestone Android Development] alicheusz:
1.7.29 tweaks

this valuses are form Juwe11 memory optimization script

http://xdaforums.com/showthread.php?t=1111145

and they are designed for 512 MB phone

Freyo teke Juwe11 memory optimization script, make quick and dirty hack and copy paste it his 10overclock, this make nonsense 10overclock file which DanyDroid use in 1.7.29. If you look at it you will notice that this same values are rewritten three times

first time Juwe11 setting at begining 10overclock then below in this same file by some Freyo tweak form cornos1.4 and then in kickasstweak file third time. I am talking about swappiness for example. This clearly indicates that they are put without any consideration.

Phone fill smooth because setting are so aggressive that everything non essential are killed instantaneously, this make big free ram and lot of file cache space and this make starting ap faster. But I was unable to use google maps with this settings

In my opinion we need take different approach don't put extreme aggressive min free values but play with tweak setting a little

At this point I came up with

Set VM Heap to 36 MB – make more rom for app like web browser google maps. Setting VM to more than 24 make background content providers to start and be killed by min free values. For some reason on 24 lots apps are off unless are directly addressed

Don’t use hard to kill launcher or bulletproof – sometimes google maps freeze when out of free ram. It’s better to redraw launcher than to kill Google maps or make phone freeze

Make bigger cache by incresying vfs_cache_preasure and swappines kernel tweak (all tweaks that I see lately are made to fit as much program to memory as possible, it doesn’t work on phone that don’t have any reserve memory)

Make more responsive kernel by tweaking with kernel.sched* tweak using smaller governor samplerate

Reclaim memory by disabling JIT. This reduce also lag at start.

there are my setting what you think

10overclock

#!/system/bin/sh

echo "5 800000000 48" > /proc/overclock/mpu_opps
echo "4 600000000 42" > /proc/overclock/mpu_opps
echo "3 450000000 38" > /proc/overclock/mpu_opps
echo "2 250000000 27" > /proc/overclock/mpu_opps
echo "1 125000000 22" > /proc/overclock/mpu_opps

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

70tweaks file (I use as a base skadude tweak and combine some extra from various sources)

#!/system/bin/sh

sysctl -p
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
/system/xbin/echo "2048" > /proc/sys/kernel/msgmni
/system/xbin/echo "64000" > /proc/sys/kernel/msgmax
/system/xbin/echo "268435456" > /proc/sys/kernel/shmmax
/system/xbin/echo "500 512000 64 2048" > /proc/sys/kernel/sem
/system/xbin/echo "24319" > /proc/sys/kernel/sched_features
/system/xbin/sysctl -w net.core.wmem_max=524288
/system/xbin/sysctl -w net.core.rmem_max=524288
/system/xbin/sysctl -w net.ipv4.tcp_tw_recycle=1
/system/xbin/sysctl -w net.ipv4.tcp_rmem='4096 87380 404480'
/system/xbin/sysctl -w net.ipv4.tcp_wmem='4096 16384 404480'
/system/xbin/sysctl -w kernel.sched_min_granularity_ns=200000
/system/xbin/echo "70" > /proc/sys/vm/swappiness
STL=`ls -d /sys/block/stl*`
MTD=`ls -d /sys/block/mtd*`
BML=`ls -d /sys/block/bml*`
MMC=`ls -d /sys/block/mmc*`
for i in $STL $MTD $BML $MMC
do
echo 0 > $i/queue/rotational
echo cfq > $i/queue/scheduler
echo 1 > $i/queue/iosched/low_latency
echo 1 > $i/queue/iosched/back_seek_penalty
echo 1000000000 > $i/queue/iosched/back_seek_max
echo 3 > $i/queue/iosched/slice_idle
done
for i in $STL $BML
do
echo $IO_SCHEDULER > $i/queue/scheduler
case $IO_SCHEDULER in
"deadline")
echo 1 > $i/queue/iosched/fifo_batch
"cfq")
echo 1 > $i/queue/iosched/back_seek_penalty
echo 0 > $i/queue/iosched/slice_idle
"bfq")
echo 1 > $i/queue/iosched/back_seek_penalty
echo 0 > $i/queue/iosched/slice_idle
esac
done

# Remount all partitions with noatime
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done

/system/xbin/echo "500" > /proc/sys/vm/dirty_expire_centisecs
/system/xbin/echo "1500" > /proc/sys/vm/dirty_writeback_centisecs
/system/xbin/echo "90" > /proc/sys/vm/dirty_ratio
/system/xbin/echo "10" > /proc/sys/vm/dirty_background_ratio
/system/xbin/echo "40" > /proc/sys/vm/vfs_cache_pressure
/system/xbin/sysctl -w kernel.panic_on_oops=1
/system/xbin/sysctl -w kernel.hung_task_timeout_secs=0
/system/xbin/sysctl -w kernel.sched_latency_ns=100000
/system/xbin/sysctl -w kernel.sched_wakeup_granularity_ns=0
/system/xbin/sysctl -w kernel.sched_compat_yield=1
/system/xbin/sysctl -w vm.oom_kill_allocating_task=1;
/system/xbin/sysctl -w vm.overcommit_memory=1
/system/xbin/echo 0 > /proc/sys/vm/page-cluster;
/system/xbin/echo 0 > /proc/sys/vm/laptop_mode;
/system/xbin/echo 3072 > /proc/sys/vm/min_free_kbytes;

If you will test it please disable 98kickasstweak first, keep in mind that 10overclock has LUV vesel they may not work with every phone revision as with mine (use at your own risk)

disable JIT by adding line to end of the build.prop

dalvik.vm.execution-mode=int:fast

Unsuperharge phone and use stock OOM groupings and min free. This need more investigating. Stock give me good overall usability.

I don't test extensively battery with this tweaks but is should be much better due on demand governor LUV 800MHz