[TWEAK] Kernel tuning script -- UPDATED!
since I've said goodbye to my Milestone, in these days, prior to selling it, my good behavior said to me "okay, no customkernel, you can't help with RSA...so Milestone owners are ****ed...ouh, no, wait!"
...and then prior to selling it I've tested some things and I've found that sysctl is working!
Since sysctl is working and I'm on Linux from about 10 years, I've been played with our kernel in Milestone and tested some parameters.. and I've had a speedup in my daily operations: browse the net with Dolphin Browser HD, play some games, sync email, make calls, sms etc... and I've found that my Milestone is way more responsive and feels smoother!
Sysctls tested on the great CyanogenMod port by nadlabak.
So, well, here's the script. Feel free to execute it at boot (if you execute it at boot, your phone will boot slightly faster) and/or to integrate in your custom nandroid ROMs
EDIT: UPDATE N.3
#Disable normalized sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
# Memory management
echo 2048 > /proc/sys/kernel/msgmni
echo 64000 > /proc/sys/kernel/msgmax
echo 268435456 > /proc/sys/kernel/shmmax
echo "500 512000 64 2048" > /proc/sys/kernel/sem
sysctl -w net.core.wmem_max=524288
sysctl -w net.core.rmem_max=524288
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_rmem='6144 87380 524288'
sysctl -w net.ipv4.tcp_wmem='6144 87380 524288'
sysctl -w kernel.sched_latency_ns=600000
sysctl -w kernel.sched_min_granularity_ns=400000
sysctl -w kernel.sched_wakeup_granularity_ns=400000
This script makes the Linux kernel to take a little more RAM, so I don't recommend to use it in HTC Sense builds, since Sense is already crashing because of heavy RAM usage, but with CM and LauncherPro, with a lot of progs open in background I've never went out of RAM!
NOTE: Make sure that you've got echo and sysctl in /system/xbin/ otherwise this won't have any effect!
Even if I'm returning to HTC I'm sad for my old Milestone, I like its shell so much...it's a really beautiful device!
Hoping for the best for u, Milestone users