Use CachyOS-style ZRAM on Ubuntu?
2026-06-13 03:36 UTC
Replies (5)
-
@A_norny_mousse@piefed.zip 2026-06-13 06:11
a handbrake encoding that was paused and decided to open [a game] Even in 2026 that does not seem like good practice to me. Have you tried switching to a different tty and killing the handbrake process? Also, have you checked that it’s really RAM getting filled up that freezes your system?
-
@Ordoviz@lemmy.ml 2026-06-13 06:37
Use systemd-zram-generator. The process is explain in the DebianWiki and the ArchWiki and this random blog, but it boils down to just a few commands you need to run: $ apt install systemd-zram-generator $ sudoedit /etc/systemd/zram-generator.conf [zram0] zram-size = min(ram, 8192) compression-algorithm = zstd $ sudo systemctl daemon-reload && sudo systemctl start systemd-zram-setup@zram0.service You can tweak the settings above. Fedora recommends using zram-size = min(ram, 8192), which would correspond to 8GB ZRAM in your case. CachyOS uses a less conservative config with zram-size = ram. To confirm that zram is working, run zramctl. It should print something like NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT /dev/zram0 zstd 8G 430.8M 137.6M 142.9M [SWAP] See also Improving system responsiveness under low-memory conditions.
-
@catdog@lemmy.ml 2026-06-13 05:32
Try it. I have configured ZRAM on Linux Mint and Debian, works like a charm. If I may ask: why are you thinking of only committing 1 or 2GB to ZRAM? This way your net RAM capacity increase will only be a few hundred megs. I recommend to allocate 25% to 60% of your RAM to it. To set it up, I have used an LLM for instructions, so don’t listen to me for derails. I recommend prompting/searching for instructions youryelf if others aren’t aplble to point you to a guide.
-
@fozid@feddit.uk 2026-06-13 22:24
When your system starts swapping it will also start to crawl. Just set up an oom protector, then when you run out of ram, the system will kill the culprit automatically and your system will never crawl, and you get a notification what’s happened and why.
-
@swelter_spark@reddthat.com 2026-06-14 00:26
You might want to look into zswap as well.