[Galaxy Note 3 Original Android Development] 6h0st:
If you want to use scripts to configure the kernel, you must uninstall all apps that control the parameters of the kernel. (Faux123's app especially).

For those who are interested, this is my config script:

#!/system/bin/sh

# .... Ghost's Tweaks from here:

echo 1024 > /sys/block/mmcblk0/bdi/read_ahead_kb

echo 1024> /sys/block/mmcblk0rpmb/bdi/read_ahead_kb

echo 2048 > /sys/block/mmcblk1/bdi/read_ahead_kb

#Entropy on internal,rpmb and external sdcard

echo 0 > /sys/block/mmcblk0/queue/add_random

echo 0 > /sys/block/mmcblk0rpmb/queue/add_random

echo 0 > /sys/block/mmcblk1/queue/add_random

#Scheduler for internal,rpmb and external sdcard

echo "fiops" > /sys/block/mmcblk0/queue/scheduler

echo "fiops" > /sys/block/mmcblk0rpmb/queue/scheduler

echo "fiops" > /sys/block/mmcblk1/queue/scheduler

#disable iostats to reduce overhead !

if [ -e $i/queue/iostats ];

then

echo "0" > $i/queue/iostats;

fi;

# "Applying I/O related tweaks..."

MMC=`ls -d /sys/block/mmc*`;

echo Optimize non-rotating storage;

for i in $MMC;

do

#IMPORTANT!

if [ -e $i/queue/rotational ];

then

echo 0 > $i/queue/rotational;

fi;

if [ -e $i/queue/nr_requests ];

then

echo 8192 > $i/queue/nr_requests;

fi;

done

#disable iostats to reduce overhead # idea by kodos96 - thanks !

if [ -e $i/queue/iostats ];

then

echo "0" > $i/queue/iostats;

fi;

#CPU fixes and tweaks

stop mpdecision

#Turn on CPUs

echo 1 > /sys/devices/system/cpu/cpu0/online

echo 1 > /sys/devices/system/cpu/cpu1/online

echo 1 > /sys/devices/system/cpu/cpu2/online

echo 1 > /sys/devices/system/cpu/cpu3/online

#Set governor

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

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

echo "yankactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

echo "yankactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

#echo "intellimm" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

#echo "intellimm" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

#echo "intellimm" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

#echo "intellimm" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

#echo "zzmoove" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

#echo "zzmoove" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

#echo "zzmoove" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

#echo "zzmoove" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

sync

sleep 1

start mpdecision

# Activate simple GPU alogarithm

echo 1 > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate

echo 5 > /sys/module/simple_gpu_algorithm/parameters/simple_laziness

echo 5000 > /sys/module/simple_gpu_algorithm/parameters/simple_ramp_threshold

# Maximum GPU frequency

echo 200000000 > /sys/class/kgsl/kgsl-3d0/max_gpuclk

echo 200000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq

echo 200000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq

echo Checking GPU frequency...

echo -- max frequency is set to:

cat /sys/class/kgsl/kgsl-3d0/max_gpuclk

cat /sys/class/kgsl/kgsl-3d0/devfreq/max_freq

echo -- min frequency is set to:

cat /sys/class/kgsl/kgsl-3d0/devfreq/min_freq

#ext4 tweaks

echo "Checing for EXT4 Partitions"

if ( mount | grep -w ext4 ) then

echo "EXT4 Partition Found!"

echo "Remounting..."

mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /system /system;

mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /cache /cache;

mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /data /data;

else

echo "EXT4 Partition Not Found!"

fi;

#Cache cleaning

busybox find /data/data -type d -iname *cache* -maxdepth 2 -mindepth 2 -exec busybox rm -rf {} ';'

#VM Settings

echo "Applying VM Settings..."

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

echo 3000 > /proc/sys/vm/dirty_expire_centisecs;

echo 500 > /proc/sys/vm/dirty_writeback_centisecs;

echo "5120" > /proc/sys/vm/min_free_kbytes;

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

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

echo "35" > /proc/sys/vm/dirty_background_ratio;

echo "70" > /proc/sys/vm/dirty_ratio;

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

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

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

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

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

echo "1" > /proc/sys/vm/oom_dump_tasks;

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

sleep 1

sync

# Disable swap

swapoff /dev/block/vnswap0

sleep 5

sync

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

sleep 1

sync

# Kernel tweaks

echo "Applying Kernel and FS Tweaks..."

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

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

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

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

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

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

echo "30" > /proc/sys/kernel/panic;

echo "0" > /proc/sys/kernel/panic_on_oops;

echo "5000" > /proc/sys/kernel/threads-max;

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

echo "65536" > /proc/sys/fs/file-max;

sleep 1

sync

# Fast charge

echo 2 > /sys/kernel/fast_charge/force_fast_charge

echo 2100 > /sys/kernel/fast_charge/ac_charge_level

echo 460 > /sys/kernel/fast_charge/usb_charge_level

echo Cleaning System...

busybox rm -fr /cache/*

busybox rm -fr /cache/recovery/*

busybox rm -fr /data/*.log

busybox rm -fr /data/anr/*

busybox rm -fr /data/backup/pending/*.tmp

busybox rm -fr /data/local/*.apk

busybox rm -fr /data/local/tmp/*

busybox rm -fr /data/log/*

busybox rm -fr /data/tmp/*

busybox rm -fr /data/tombstones/*

busybox rm -fr /data/system/appusagestats/*

busybox rm -fr /data/system/dropbox/*

busybox rm -fr /data/system/usagestats/*

busybox rm -fr /storage/sdcard0/DCIM/.thumbnails/*

busybox rm -fr /storage/sdcard0/.downloadTemp/*

busybox rm -fr /sdcard/LOST.DIR/*

busybox rm -fr /extSdCard/LOST.DIR/*

echo ...done.

echo More cleaning and fixing...

busybox rm -fr /dev/log/*

busybox chmod 000 /data/system/dropbox/

busybox chmod 000 /data/anr/

busybox chmod 000 /data/tombstones/

#echo Cleaning KNOX ****...

#stop com.samsung.knox.rcp.components

#mount -o remount,rw -t rootfs rootfs /

#busybox rmdir --ignore /knox_data/appdata

#busybox rmdir --ignore /knox_data/userdata

#busybox rmdir --ignore /knox_data

#busybox rmdir --ignore /data/knox/app

#busybox rmdir --ignore /data/knox/data

#busybox rmdir --ignore /data/knox/ext_sdcard

#busybox rmdir --ignore /data/knox/sdcard

#busybox rmdir --ignore /data/knox/tmp

#busybox rmdir --ignore /data/knox

#busybox rm -fr /data/data/com.samsung.knox.rcp.components/*

#busybox rmdir --ignore /data/data/com.samsung.knox.rcp.components

echo done all!

# Trimming

fstrim -v /system

fstrim -v /data

fstrim -v /cache

sleep 1

sync

# Set correct permissions to init.d scripts

mount -o remount,rw /system

chmod 775 /system/etc/init.d/*

mount -o remount,ro /system

#The end

echo "All things seem to be working..." > /data/test-log.txt