02-02-2020, 10:53 AM
(This post was last modified: 02-02-2020, 10:53 AM by moonwalkers.)
(02-01-2020, 01:06 PM)wasgurd Wrote: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.(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?