Low memory, apps crashing - change zram settings or add swapfile? [4.x]

Just wanted to document what I did on my Xperia 10 ii 4.3.0.12 in case it may help someone (thanks for all the information in your posts) :

dd if=/dev/zero of=/swapfile bs=1M count=1024
chmod 600 swapfile
mkswap /swapfile
swapon /swapfile

then edited “/vendor/etc/fstab.pdx201” to reduce zram to 500M and mount the swap file :

...
# ZRAM/SWAP          
/dev/block/zram0                           none                  swap     defaults     
/swapfile                                  none                  swap     sw              0       0
...

I find the result quite dramatic (positively) especially for android apps, and its seems to resist in time and reboots. 1GB swap is probably overkill though.

7 Likes