[arch-general] systemd-zram generator

Chris Murphy lists at colorremedies.com
Wed Jan 15 17:57:45 UTC 2020


On Mon, Jan 13, 2020 at 6:45 AM Geo Kozey via arch-general
<arch-general at archlinux.org> wrote:
>
> There are many tools to configure zram available, one is even in Arch Linux repos:
> https://www.archlinux.org/packages/community/any/systemd-swap/

Right. And typically they don't co-exist, they expect they're the only
one. So the first one that runs, works. Additional ones fail with
confusing error messages - even if it's a non-fatal failure, it's
kinda messy for users.

I think it's inherently valuable for users to have a consistent
interface for configuring something as basic as swap. Including swap
on ZRAM. Is it really a feature that the user needs to know about
specific implementations?

As a generator, rather than a script, there's quite a bit of code
reuse. It uses existing facilities in systemd to load the zram kernel
module, to mkswap, and to swapon. It's much lighter weight than the
existing alternatives, and is suitable for always including it in an
installation by default, just like the existing swap units, rather
than expecting users to manually install a package.

Also, there's a better chance systemd/zram-generator can be adopted
across distributions, which improves user experience.


-- 
Chris Murphy


More information about the arch-general mailing list