PINE64
zram swap support for the PBP; aka: "how to download more RAM" - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: zram swap support for the PBP; aka: "how to download more RAM" (/showthread.php?tid=8812)

Pages: 1 2


RE: zram swap support for the PBP; aka: "how to download more RAM" - moonwalkers - 02-02-2020

(02-01-2020, 01:06 PM)wasgurd Wrote:
(01-21-2020, 11:39 PM)Arglebarg Wrote:
Code:
root@pinebookpro:~/work/zram-swap# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/zram0                              partition       6291452 0       5

I'm pretty sure the default swapfile has a priority of 1, 0 or -1; I can't remember which. The zram-swap script sets priority 5 which should be higher.

You can safely disable the default swapfile and remove it.

What size of zram do you recommend?
I personally use 2xRAM, 1.5xRAM is what Chromebooks use as well as what my team uses at work for our production fleet. It kinda depends on what compression algorithm you use as well as what gets stuffed into your RAM. If you use lz4 for extra-fast compression/decompression you should expect compression ratio around 2x on average, with default lzo or lzo-rle you should expect compression ratio around 3x. Considering you still need some base memory that cannot be swapped out/compressed, I'd say you should be OK with the above mentioned sizes for zram - you are more likely to see the system slow down very noticeably as it fills up zram beyond ~180-200% total RAM use ((zram content + RAM use - zram compressed size)/total RAM) than see OOMs with those sizes in my experience.