19
Use CachyOS-style ZRAM on Ubuntu?
(lemmy.world)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
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:
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 withzram-size = ram.To confirm that zram is working, run
zramctl. It should print something likeSee also Improving system responsiveness under low-memory conditions.
Systemd absorbed zram now.
And no, you don't need a background service for this.
Systemd is a great operating system, all it lacks is a kernel.
Just like GNU coreutils.
What happens when you reboot?
Using a udev rule
I'd take a single file config. It's cleaner and easier to see what's going on.
You may not need an additional package, but often they're convenient.