[Streak 5 General] tazzz811:
combination of my script & nitro lag nullifier

Any idea why minfree file doesn't exist on every Dell Streak 5 CUSTOM ROM? This is basically used by Android system for lowmemorykiller... However, V6 Supercharger Update9 Beta6.1 is working partly except for manipulating the minfree values.

I used Nitro Lag Nullifier and it works perfectly on my Dell Streak 5.

My Baseband: 354

My CustomRom: SimpleStreak 1.3 Beta4

My AddOn: PerfUpdate -> OC Max: 1190 / Min: 245 Smartass governor

Since i have my previous script that i used on my LG P500 & Samsung Galaxy ACE, I combined my scripts and Nitro Lag Nullifier from V6 Supercharger Update9 Beta6.1. (Big thanks to zeppelinrox). I just disregard the lowmemorykiller part since the minfree file doesn't exist.

As a result, here is the combination of my script & nitro lag nullifier.

#!/system/bin/sh

#remounting the file systems with noatime and nodiratime flags to save battery and CPU cycles
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime,nodiratime $k
done

#alternative route on remounting with noatime if the for loop doesn't work
mount -o remount,noatime,nodiratime auto /
mount -o remount,noatime,nodiratime auto /dev
mount -o remount,noatime,nodiratime auto /proc
mount -o remount,noatime,nodiratime auto /sys
mount -o remount,noatime,nodiratime auto /mnt/asec
mount -o remount,noatime,nodiratime auto /system
mount -o remount,noatime,nodiratime auto /data
mount -o remount,noatime,nodiratime auto /cache
mount -o remount,noatime,nodiratime auto /mnt/sdcard
mount -o remount,noatime,nodiratime auto /mnt/secure/asec
mount -o remount,noatime,nodiratime auto /mnt/sdcard/.android_secure
mount -o rw -t tmpfs tmpfs /data/data/com.aurorasoftworks.quadrant.ui.advanced

#flags every mounted partition as non rotational and increases it's cache size for more read speed
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;

for j in $MTD $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "4096" > $j/queue/read_ahead_kb;

done

echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;

for a in $MTD $MMC
do
echo "512" > $a/queue/nr_requests;
done

#internet speed tweaks
echo 0 > /proc/sys/net/ipv4/tcp_timestamps;
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse;
echo 1 > /proc/sys/net/ipv4/tcp_sack;
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle;
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling;
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout;
echo 524288 > /proc/sys/net/core/wmem_max;
echo 524288 > /proc/sys/net/core/rmem_max;
echo 256960 > /proc/sys/net/core/rmem_default;
echo 256960 > /proc/sys/net/core/wmem_default;
echo 6144 87380 524288 > /proc/sys/net/ipv4/tcp_wmem;
echo 6144 87380 524288 > /proc/sys/net/ipv4/tcp_rmem;

#vm management tweaks
echo "0" > /proc/sys/vm/swappiness;
echo "95" > /proc/sys/vm/dirty_ratio;
echo "10" > /proc/sys/vm/vfs_cache_pressure;
echo "20480" > /proc/sys/vm/min_free_kbytes;
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/laptop_mode;
echo "60000" > /proc/sys/vm/dirty_expire_centisecs;
echo "60" > /proc/sys/vm/dirty_background_ratio;
echo "6000" > /proc/sys/vm/dirty_writeback_centisecs;
busybox sysctl -e -w vm.panic_on_oom=0;
busybox sysctl -e -w vm.overcommit_memory=1;
busybox sysctl -e -w vm.min_free_order_shift=4;

#kernel tweaks
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo 500 512000 64 2048 > /proc/sys/kernel/sem;
busybox sysctl -e -w kernel.panic=0;
busybox sysctl -e -w kernel.panic_on_oops=1;
busybox sysctl -e -w kernel.shmmax=268435456;
busybox sysctl -e -w kernel.sched_features=24189;
busybox sysctl -e -w kernel.hung_task_timeout_secs=30; # Set to 0 to disable but can cause black screen on incoming calls
busybox sysctl -e -w kernel.sched_latency_ns=18000000;
busybox sysctl -e -w kernel.sched_min_granularity_ns=1500000;
busybox sysctl -e -w kernel.sched_wakeup_granularity_ns=3000000;
busybox sysctl -e -w kernel.sched_compat_yield=1;
busybox sysctl -e -w kernel.sched_shares_ratelimit=256000;
busybox sysctl -e -w kernel.sched_child_runs_first=0;
busybox sysctl -e -w kernel.threads-max=5000;
busybox sysctl -e -w net.core.wmem_max=524288;
busybox sysctl -e -w net.core.rmem_max=524288;

#setprop
setprop wifi.supplicant_scan_interval 600;
setprop windowsmgr.max_events_per_sec 260;
setprop ro.lge.proximity.delay 25;
setprop mot.proximity.delay 75;
setprop net.tcp.buffersize.default 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.wifi 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.umts 4096,87380,256960,4096,16384,256960;
setprop ro.HOME_APP_ADJ 1;
setprop ro.mot.eri.losalert.delay 1000;
setprop video.accelerate.hw 1;
setprop ro.ril.disable.power.collapse 0;
setprop pm.sleep_mode 1;
setprop media.stagefright.enable-player true;
setprop ro.ril.hsxpa 3;
setprop ro.ril.gprsclass 32;
setprop ro.ril.hep 1;
setprop ro.ril.hsdpa.category 28;
setprop ro.ril.enable.3g.prefix 1;
setprop ro.ril.htcmaskw1.bitmask 4294967295;
setprop ro.ril.htcmaskw1 268449905;
setprop ro.ril.hsupa.category 9;
setprop ro.ril.def.agps.mode 2;
setprop ro.ril.def.agps.feature 1;
setprop ro.ril.enable.sdr 1;
setprop ro.ril.enable.gea3 1;
setprop ro.ril.enable.fd.plmn.prefix 23402,23410,23411;
setprop ro.ril.disable.power.collapse 0;
setprop ro.ril.enable.a52 0;
setprop ro.ril.enable.a53 1;
setprop ro.ril.enable.dtm 1;
setprop ro.FOREGROUND_APP_ADJ 0;
setprop ro.VISIBLE_APP_ADJ 3;
setprop ro.SECONDARY_SERVER_ADJ 5;
setprop ro.BACKUP_APP_ADJ=1;
setprop ro.HIDDEN_APP_MIN_ADJ 7;
setprop ro.CONTENT_PROVIDER_ADJ 8;
setprop ro.EMPTY_APP_ADJ 15;
setprop ro.FOREGROUND_APP_MEM 1536;
setprop ro.VISIBLE_APP_MEM 2048;
setprop ro.SECONDARY_SERVER_MEM 5632;
setprop ro.BACKUP_APP_MEM 6144;
setprop ro.HOME_APP_MEM 1024;
setprop ro.HIDDEN_APP_MEM 6144;
setprop ro.CONTENT_PROVIDER_MEM 6656;
setprop ro.EMPTY_APP_MEM 6656;
setprop ENFORCE_PROCESS_LIMIT false;

The script was added to init.streak.post_boot.sh so even if the system doesn't support init.d it will still works.