MrBobo
Android Expert
script to enable zram@128mb
Code:#!/system/bin/sh echo "134217728" > /sys/block/zram0/disksize mkswap /dev/block/zram0 swapon /dev/blcok/zram0
can someone explain to me how echo "134217728" sets 128mb ram?
Also, does it make sense to run BOTH zram and swap? I was thinking about adding a priority to both so the zram will be used first, then if full swap will get used, I am trying that setup by adding -p 10 to zram and -p 100 to swap, so zram would look like this:
echo "134217728" > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon -p 10 /dev/blcok/zram0
Is this the way to go? Also, with this setup would it make sense to lower the size of the swap so in total they are around a quarter of the total ram? so maybe have both set to be 128mb?
Lastly, how do I go about verifying both are being used/setup? I can see swap sitting on my phone, can I view zram somewhere?