Finalized Numbers

590 views
Skip to first unread message

Franco's Dev Team

unread,
Jun 29, 2013, 5:14:02 PM6/29/13
to

Once we finalize a set of numbers and are moving on from them, this is the place to post them so Francisco has one place to look, and we can always come back to snag the defaults. No need for any further posts in this thread, so replies are locked. As the script gets changed, and we add new scripts, just edit this post. Everyone has the ability to edit all posts.
  

/system/etc/init.d/950iosettings:
 
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 11-Jun-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres

# disable sysctl.conf to prevent ROM interference
if [ -e /system/etc/sysctl.conf ]; then
  mount
-o remount,rw /system;
  mv
/system/etc/sysctl.conf /system/etc/sysctl.conf.fkbak;
  mount
-o remount,ro /system;
fi;

# general queue tweaks
for i in /sys/block/*/queue; do
  echo
512 > $i/nr_requests;
  echo
512 > $i/read_ahead_kb;
  echo
2 > $i/rq_affinity;
  echo
0 > $i/nomerges;
  echo
0 > $i/add_random;
  echo 0 > $i/rotational;
done;

# override scheduler defaults with tweaked values
scheduler
=reset;
while sleep 1; do
  current
=`cut -d\[ -f2 /sys/block/mmcblk0/queue/scheduler | cut -d\] -f1`;
 
if [ $scheduler != $current ]; then
    scheduler
=$current;
   
if [ $scheduler == "deadline" ]; then

# deadline tweaks
echo 250 > /sys/block/mmcblk0/queue/iosched/read_expire;
echo
2500 > /sys/block/mmcblk0/queue/iosched/write_expire;
echo
1 > /sys/block/mmcblk0/queue/iosched/writes_starved;
echo
1 > /sys/block/mmcblk0/queue/iosched/front_merges;
echo
8 > /sys/block/mmcblk0/queue/iosched/fifo_batch;

    elif 
[ $scheduler == "row" ]; then

# row tweaks
echo
100 > /sys/block/mmcblk0/queue/iosched/hp_read_quantum;
echo
75 > /sys/block/mmcblk0/queue/iosched/rp_read_quantum;
echo
5 > /sys/block/mmcblk0/queue/iosched/hp_swrite_quantum;
echo
4 > /sys/block/mmcblk0/queue/iosched/rp_swrite_quantum;
echo
4 > /sys/block/mmcblk0/queue/iosched/rp_write_quantum;
echo
3 > /sys/block/mmcblk0/queue/iosched/lp_read_quantum;
echo
12 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum;
echo
10 > /sys/block/mmcblk0/queue/iosched/read_idle;
echo
25 > /sys/block/mmcblk0/queue/iosched/read_idle_freq;
## N4 and N10 row adds lsl and rsl, which were hardcoded previously
echo 10000 > /sys/block/mmcblk0/queue/iosched/low_starv_limit;
echo
5000 > /sys/block/mmcblk0/queue/iosched/reg_starv_limit;
## N4 has a new version of row with corrected entry for lsq and renamed ri and rif

[ `cat /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum` != "2" ] && echo 2 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum;
echo
10 > /sys/block/mmcblk0/queue/iosched/rd_idle_data;
echo
25 > /sys/block/mmcblk0/queue/iosched/rd_idle_data_freq;

    elif [ $scheduler == "cfq" ]; then

# cfq tweaks
echo
4 > /sys/block/mmcblk0/queue/iosched/quantum;
echo
80 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync;
echo
330 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async;
echo
12582912 > /sys/block/mmcblk0/queue/iosched/back_seek_max;
echo
1 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty;
echo
60 > /sys/block/mmcblk0/queue/iosched/slice_sync;
echo
50 > /sys/block/mmcblk0/queue/iosched/slice_async;
echo
2 > /sys/block/mmcblk0/queue/iosched/slice_async_rq;
echo
0 > /sys/block/mmcblk0/queue/iosched/slice_idle;
echo
0 > /sys/block/mmcblk0/queue/iosched/group_idle;
echo
1 > /sys/block/mmcblk0/queue/iosched/low_latency;
## N4 and N10 cfq adds tl, which was hardcoded previously
echo
300 > /sys/block/mmcblk0/queue/iosched/target_latency;

   
fi;
 
fi;
# loop forever independently
done&


 
 
/system/etc/init.d/925vmsettings:
 
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 26-Jun-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres

# disable sysctl.conf to prevent ROM interference
if [ -e /system/etc/sysctl.conf ]; then
  mount
-o remount,rw /system;
  mv
/system/etc/sysctl.conf /system/etc/sysctl.conf.fkbak;
  mount
-o remount,ro /system;
fi;

# vm tweaks
echo 5 > /proc/sys/vm/dirty_background_ratio;
echo
200 > /proc/sys/vm/dirty_expire_centisecs;
echo
20 > /proc/sys/vm/dirty_ratio;
echo
500 > /proc/sys/vm/dirty_writeback_centisecs;
echo
2884 > /proc/sys/vm/min_free_kbytes;
echo
4 > /proc/sys/vm/min_free_order_shift;
echo
3 > /proc/sys/vm/page-cluster;
echo
0 > /proc/sys/vm/swappiness;
echo
100 > /proc/sys/vm/vfs_cache_pressure; 
 
# lmk tweaks
minfree=6144,8192,12288,16384,24576,40960;

lmk
=/sys/module/lowmemorykiller/parameters/minfree;
minboot
=`cat $lmk`;
while sleep 1; do
 
if [ `cat $lmk` != $minboot ]; then
   
[ `cat $lmk` != $minfree ] && echo $minfree > $lmk || exit;
 
fi;
done&
 
# fs tweaks
echo 10 > /proc/sys/fs/lease_break_time;
 
# entropy tweaks
echo
128 > /proc/sys/kernel/random/read_wakeup_threshold;
echo
256 > /proc/sys/kernel/random/read_wakeup_threshold;
 
# tcp tweaks
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control;

 

 
/system/etc/init.d/875mntsettings:
 
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 12-May-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres

# sysfs+sdcard tweaks
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto /;
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto /proc;
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto /sys;
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto /sys/kernel/debug;
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto /mnt/shell/emulated;
for i in /storage/emulated/*; do
  busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto $i;
  busybox mount
-o remount,nosuid,nodev,noatime,nodiratime -t auto $i/Android/obb;
done;

# partition tweaks
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /data;
busybox mount
-o remount,nosuid,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /cache;
busybox mount
-o remount,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /system;
 
 

 
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages