Change default zram compression algorithm to zstd

Hi folks, I’m new to the whole universal blue concept and am testing out bluefin for the fist time. It looks like a well-polished and incredibly solid distro so far, the only thing that made me wonder a bit is the default lzo-rle compression algorithm for zram.
Wouldn’t it be better to set zstd as default, given that it’s more modern and generally performs better while compressing?
How could I easily tweak zram in an immutable system like bluefin?

Thanks!

2 Likes

How are you setting the config currently?

1 Like

Well… I’m not :slight_smile:
I just installed the system from the image on the official website, never touched zram. I’m not really a technical user, I was just curious if the compression algorithm was a deliberate choice and if it’s possible to change it in an easy way. I’m also not super-familiar with fedora in general, which doesn’t help I guess…

This is something that you can easily change. See man 5 zram-generator.conf. You need to create the file /etc/systemd/zram-generator.conf and set the optition compression-algorithm to the algorithm you want to use.

See /usr/lib/systemd/zram-generator.conf for the current config. This config does not specify an algorithm which makes me think that Fedora probably was fine with the default algorithm or did not bother to make a choice.

3 Likes

Thanks, this worked perfectly!
I was familiar with the conf file in /usr/lib/, however I tried setting my own config using algorithm= instead of compression-algorithm=.

Solved, thanks again!

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.