this post was submitted on 10 Mar 2026
525 points (99.1% liked)

Programmer Humor

30364 readers
681 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] turdas@suppo.fi 11 points 5 days ago (3 children)
$ zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR   TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle      62.6G  2.8G  972M 1011.4M         [SWAP]

Already did

[–] lambalicious@lemmy.sdf.org 2 points 5 days ago

Based zramctl. Makes my 8GB RAM system run like I had 12 GB, which is quite significant in this new internet world where opening a second tab in a web browser costs almost 600 MB.

[–] probable_possum@leminal.space 2 points 5 days ago (1 children)

What's the use case over RAM or disk swap? It's compressed but faster than SSD? Hmm. That could help in distinct use cases...

[–] turdas@suppo.fi 6 points 5 days ago

Yes, it's basically faster than disk swap but uses some CPU cycles. The compression algorithms involved are very fast on modern CPUs so in some sense it's "free RAM".

I set mine to almost 1:1 my physical RAM, because the way it works is that the zram disk size (62.6G there) is the amount of uncompressed data allowed on it, and the compression on real-world data is almost always at least 50% -- so if the zram device fills up, it'll be using something like 32G of physical memory. I'm yet to hit real-world usecases that would have tested these limits though, and the defaults are much more conservative.

[–] vividspecter@aussie.zone 1 points 4 days ago

I prefer zstd but your data shows that even the algorithms with less compression efficiency do quite well.