diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh index 07fd111..d58bac4 100644 --- a/rootdir/bin/init.qcom.post_boot.sh +++ b/rootdir/bin/init.qcom.post_boot.sh @@ -31,7 +31,7 @@ target=`getprop ro.board.platform` function configure_zram_parameters() { # Set Zram disk size=1GB for >=2GB Non-Go targets. - echo 1073741824 > /sys/block/zram0/disksize + echo 2684350464 > /sys/block/zram0/disksize mkswap /dev/block/zram0 swapon /dev/block/zram0 -p 32758 } @@ -82,6 +82,11 @@ function configure_memory_parameters() { echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper + # Set allocstall_threshold to 0 + # Set swappiness to 100 + echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold + echo 100 > /proc/sys/vm/swappiness + configure_zram_parameters } diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom index 41e73a6..9acb618 100644 --- a/rootdir/etc/fstab.qcom +++ b/rootdir/etc/fstab.qcom @@ -48,4 +48,4 @@ # The update_engine code looks for this entry in order to determine the boot device address # and fails if it does not find it. /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults -/dev/block/zram0 none swap defaults zramsize=1073741824 +/dev/block/zram0 none swap defaults zramsize=2684350464