First of all, I believe tweaking minfree is just as important, if not more, than sysctl. Android tends to behave badly when there's very little free memory. When you're running your device with say less than 20-30MB of free RAM, a misbehaving app or two could invoke kernel's OOM killer and cause the device to become unstable, then eventually reboot or freeze.
For that reason, I don't like the default value of 25MB minfree. (minfree, btw, is android's memory management system). From my experience, I think at least 80MB minfree is required for your device to run fast and stable. In general I recommend Rubix's minfree setting (20480 blocks x 4 will give you 80MB):
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
I personally run my Droid X with the following:
echo "256,512,1024,5120,13000,20000" > /sys/module/lowmemorykiller/parameters/minfree
Both should be fine. Be sure that the last two numbers are at least 13000 and 20000.
Now back to sysctl. Personally, I haven't had to manually drop caches at all. In fact, my phone will probably run fine indefinitely without having to purge (longest i've run it without rebooting was 5 days, but it's really hard not to reboot your phone when you tweak it as much as i do - the kernel will automatically drop caches when it think it needs more memory). But I'm not a heavy user (i don't play games), your mileage will vary of course, and you may need to purge every once in while. To purge page, dentry and inode caches, use this command:
sync; echo 3 > /proc/sys/vm/drop_cachesMy personal recommendation for most people (no manual flushing should be required):
vm.dirty_ratio = 90If you are willing to play around with manual or timed flushing I think you can squeeze a little more performance and battery life with:
vm.dirty_background_ratio = 55
vm.vfs_cache_pressure = 20
vm.dirty_ratio = 90Btw, you can schedule cache purge using Tasker/sl4a, or you can use cron.
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1