diff options
-rw-r--r-- | rootdir/fstab.qcom | 2 | ||||
-rw-r--r-- | rootdir/init.qcom.rc | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/rootdir/fstab.qcom b/rootdir/fstab.qcom index 8bdd8a8..e7d21fd 100644 --- a/rootdir/fstab.qcom +++ b/rootdir/fstab.qcom @@ -15,3 +15,5 @@ /devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata /devices/msm_sdcc.3/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata /devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk:auto +/dev/block/zram0 none swap defaults zramsize=533413200,zramstreams=4,notrim + diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index 6be57e2..a9e2002 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -64,6 +64,9 @@ on init # Enable panic on out of memory write /proc/sys/vm/panic_on_oom 2 + # Setup zram options + write /sys/block/zram0/comp_algorithm lz4 + # Create a tmpfs for dynamic network mounting mkdir /storage/removable/remote 0700 root system mount tmpfs tmpfs /storage/removable/remote mode=0755,uid=0,gid=0 @@ -81,6 +84,9 @@ on fs chown system system /lta-label chmod 0555 /lta-label + # Mount ZRAM + swapon_all fstab.qcom + on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 |