[Motorola Droid 4] giannhs_n:
I use cm11 or cm12 (i find cm13 extremely slow) But with the following tweaks made from my daily experience feel free to try it

Add those lines on boot

swapoff /dev/block/zram0

echo 1 > /sys/block/zram0/reset

#

# setting zram size to 140 mb

echo 396286400 > /sys/block/zram0/disksize

#

# making zram swapable

mkswap /dev/block/zram0

#

# starting swap on zram

swapon /dev/block/zram0

sysctl -w vm.overcommit_ratio=2

sysctl -w vm.swappiness=100

sysctl -w vm.vfs_cache_pressure=70

swapoff /dev/block/zram0

swapon /dev/block/zram0

echo "0" > /sys/kernel/mm/ksm/run

chmod 755 /sys/kernel/dyn_fsync/Dyn_fsync_active

echo "1" > /sys/kernel/dyn_fsync/Dyn_fsync_active

#----------------------------------I/O------------------------------------

A=`ls -d /sys/block/mmcblk1` ;

B=`ls -d /sys/block/mmcblk0` ;

C=`ls -d /sys/block/mmcblk0/mmcblk0boot0` ;

D=`ls -d /sys/block/mmcblk0/mmcblk0boot1` ;

E=`ls -d /sys/block/mmcblk1/mmcblk0boot0` ;

F=`ls -d /sys/block/mmcblk1/mmcblk0boot1` ;

for i in $A $B $C $D $E $F;

do

chmod 755 $i/queue/scheduler

echo "sioplus" > $i/queue/scheduler

echo "16" > $i/queue/iosched/fifo_batch;

echo "1048576" > $i/queue/iosched/back_seek_max;

echo "128" > $i/queue/nr_requests;

echo "1" > $i/queue/add_random;

echo "1" > $i/queue/iosched/back_seek_penalty;

echo "1" > $i/queue/rq_affinity;

echo "3" > $i/queue/iosched/writes_starved;

echo "16" > $i/queue/iosched/quantum;

echo "0" > $i/queue/rotational

echo "1" > $i/queue/iostats

echo "500" > $i/queue/iosched/read_expire;

echo "3000" > $i/queue/iosched/write_expire;

#---------------------------ReadAhead------------------------------

echo "512" > /sys/devices/virtual/bdi/179:24/read_ahead_kb #SD CARD

done

G=`ls -d /sys/class/bdi/7:0` ;

H=`ls -d /sys/class/bdi/7:1` ;

I=`ls -d /sys/class/bdi/7:2` ;

J=`ls -d /sys/class/bdi/7:3` ;

L=`ls -d /sys/class/bdi/7:4` ;

M=`ls -d /sys/class/bdi/default` ;

N=`ls -d /sys/class/bdi/7:5` ;

O=`ls -d /sys/class/bdi/7:6` ;

P=`ls -d /sys/class/bdi/7:7` ;

for i in $G $H $I $J $L $M $N $O $P;

do

chmod 755 $i/read_ahead_kb

echo "512" > $i/read_ahead_kb

echo "512" > /sys/class/bdi/default/read_ahead_kb

done

echo "512" > /sys/class/bdi/253:0/read_ahead_kb

#----------------------------------I/O--FOR SD AND INTERNAL----------------------------------

AA=`ls -d /sys/block/mmcblk1` ;

BB=`ls -d /sys/block/mmcblk0` ;

for i in $AA $BB;

do

chmod 755 $i/queue/scheduler

echo "sioplus" > $i/queue/scheduler

echo "0" > $i/queue/rotational

echo "16" > $i/queue/iosched/quantum;

echo "1048576" > $i/queue/iosched/back_seek_max;

echo "1" > $i/queue/rq_affinity;

echo "1" > $i/queue/iosched/back_seek_penalty;

echo "256" > $i/queue/nr_requests;

echo "1" > $i/queue/add_random;

echo "16" > $i/queue/iosched/fifo_batch;

echo "3" > $i/queue/iosched/writes_starved;

#echo "1" > $i/queue/iosched/quantum;

echo "1" > $i/queue/iostats

echo "500" > $i/queue/iosched/read_expire;

echo "3000" > $i/queue/iosched/write_expire;

done

sysctl -w kernel.panic_on_oops=0

#sysctl -w vm.min_free_kbytes=3774

sysctl -w vm.vfs_cache_pressure=70

sysctl -w vm.swappiness=100

sysctl -w vm.drop_caches=0

sysctl -w vm.min_free_kbytes=3774

sysctl -w vm.page-cluster=3

#setsd speeds

chmod 666 /sys/block/mmcblk0/queue/read_ahead_kb

echo "512" > /sys/block/mmcblk0/queue/read_ahead_kb

chmod 666 /sys/block/mmcblk1/queue/read_ahead_kb

echo "512" > /sys/block/mmcblk1/queue/read_ahead_kb

chmod 666 /sys/devices/virtual/bdi/179:0/read_ahead_kb

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

######sd card

chmod 666 /sys/devices/virtual/bdi/179:24/read_ahead_kb

echo "512" > /sys/devices/virtual/bdi/179:24/read_ahead_kb

chmod 666 /sys/devices/virtual/bdi/179:16/read_ahead_kb

echo "512" > /sys/devices/virtual/bdi/179:16/read_ahead_kb

chmod 666 /sys/devices/virtual/bdi/179:8/read_ahead_kb

echo "512" > /sys/devices/virtual/bdi/179:8/read_ahead_kb

chmod 666 /sys/devices/virtual/bdi/179:32/read_ahead_kb

echo "512" > /sys/devices/virtual/bdi/179:32/read_ahead_kb

chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo "1300000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo "1200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

echo "1300000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

chmod 666 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

echo "1200000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay

echo 2 > /sys/devices/system/cpu/cpufreq/interactive/boost

echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration

echo 70 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load

echo 300000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq

echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time

echo 60 > /sys/devices/system/cpu/cpufreq/interactive/target_loads

echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate

echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

chmod 666 /sys/module/lowmemorykiller/parameters/minfree

echo '7936,16384,37120,57088,58880,65536' > /sys/module/lowmemorykiller/parameters/minfree