Zram Performance Analysis
18 points by knl
18 points by knl
I wonder if it's even necessary on systems that are not constrained like the raspberry pi? I have a system 128 gigs of RAM and I was just curious if it's even worth having. Especially if one could actually use it to smoosh big models out of it.
I have a 64GB system with zram set to 256GB, algo zstd, swapiness 100, page-cluster 0, and compressed memory limited to 56GB.
I've had multiple occasions where an unusual one off task would unexpectedly consume 96-128GB of memory. Compression ratios were high. I have a screenshot with the ratio being x24 and I'm pretty sure there was one time it was in the 40s. The entire time my desktop would keep running smoothly iirc.
It's really nice to have peace of mind that an unusual or badly behaving task won't trigger the OOM killer and in fact would be barely noticed at all.
I'll also say that during regular use, provided uptime is long enough, I'll generally see >10GB of cold pages in zram. Mind you a lot of that is just one daemon.
So yeah, I'd say zram is pretty worth it for me.