[Galaxy S II Android Development] takkaros:
Here are some init.d tweaks i found interesting to try. They are supposed to help a bit on battery and performance. If you decide to use them, you must delete the two lines that Sale added in the /etc/sysctl.conf file, and delete the writecache file from the init.d folder because these values are here too:)

#!/system/bin/sh

su

echo "1053696" > /proc/sys/fs/nr_open

echo "32000" > /proc/sys/fs/inotify.max_queued_events

echo "256" > /proc/sys/fs/inotify.max_user_instances

echo "10240" > /proc/sys/fs/inotify.max_user_watches

echo "10" > /proc/sys/fs/lease-break-time

echo "165164" > /proc/sys/fs/file-max

echo "525810" > /proc/sys/kernel/threads-max

echo "256" > /proc/sys/kernel/random/write_wakeup_threshold

echo "128" > /proc/sys/kernel/random/read_wakeup_threshold

echo "5" > /proc/sys/kernel/panic

echo "1" > /proc/sys/kernel/sched_compat_yield

echo "1" > /proc/sys/kernel/panic_on_oops

echo "2048" > /proc/sys/kernel/msgmni

echo "64000" > /proc/sys/kernel/msgmax

echo "4096" > /proc/sys/kernel/shmmni

echo "2097152" > /proc/sys/kernel/shmall

echo "268435456" > /proc/sys/kernel/shmmax

echo "500 512000 64 2048" > /proc/sys/kernel/sem

echo "24189" > /proc/sys/kernel/sched_features

echo "30" > /proc/sys/kernel/hung_task_timeout_secs

echo "18000000" > /proc/sys/kernel/sched_latency_ns

echo "1500000" > /proc/sys/kernel/sched_min_granularity_ns

echo "3000000" > /proc/sys/kernel/sched_wakeup_granularity_ns

echo "256000" > /proc/sys/kernel/sched_shares_ratelimit

echo "0" > /proc/sys/kernel/sched_child_runs_first

echo "90" > /proc/sys/vm/dirty_ratio

echo "80" > /proc/sys/vm/dirty_background_ratio

echo "1" > /proc/sys/vm/oom_kill_allocating_task

echo "1" > /proc/sys/vm/overcommit_memory

echo "3" > /proc/sys/vm/page-cluster

echo "3" > /proc/sys/vm/drop_caches

echo "4096" > /proc/sys/vm/min_free_kbytes

echo "0" > /proc/sys/vm/panic_on_oom

echo "500" > /proc/sys/vm/dirty_expire_centisecs

echo "1000" > /proc/sys/vm/dirty_writeback_centisecs

echo "0" > /proc/sys/vm/oom_kill_allocating_task

echo "10" > /proc/sys/vm/vfs_cache_pressure

echo "4" > /proc/sys/vm/min_free_order_shift

echo "0" > /proc/sys/vm/laptop_mode

echo "0" > /proc/sys/vm/block_dump

Just paste them in a new file in rootexplorer and remove the extension as i cant find how to upload using the app.

Permissions should be rwxr-xr-x.

Perhaps you guys that keep talking about battery can test them tweaks too:)

edit: The most important tweaks here to be explained IMO are:

(a) drop_caches (clean caches, dentries andinodes from memory) (b) vm.vfs_cache_pressure (File system cache (dentry/inode) is more important than the block cache. The default value is 100, and you can lower this value down to 1 to tell the kernel to favor the file system cache and not drop them aggressively). This was already set at 10. (c) vm.dirty_ratio and vm.dirty_background_ratio (controlling how often kernel writes data to "disk". Delaying the data flush as much as we can there could be a slight savings in battery life and increase in performance) (d) dirty_writeback_centisecs (The pdflush writeback daemons will periodically wake up and write `old' data out to disk.) Could help with battery (e) dirty_expire_centisecs (used to define when dirty data is old enough to be eligible for writeout by the pdflush daemons. Data which has been dirty in-memory for longer than this interval will be written out next time a pdflush daemon wakes up.)

I haven't writen down all this info by myself, and I am not sure if all of these could make an actual difference. Some people say they've seen an increase in battery life as well.

It's quite easy to find more about the others if you just google them:)

Sent from my GT-I9100