Zram's installation and successful running [need help]

Hi, i am about to run (wish to) 4-5Gb zram swap partition on my 8Gb system but have issues with several zram packages and they succsessful usage: 1) some config parameters are not simply clear or full for my purpose, 2) some sytem services just wont running by comand or depend on some other things to work or 3) system wont use dedicated to it swap at all.

I would like to figure things out with the help of a knowledgeable person, because this technology will help in my daily tasks and will allow me to get rid of a swap on a ssd which uses fleerly (means i no need so much more ram/compression).

I would suggest considering the following packages:
(as I understand the rest provide slightly different functionality)

4 aur/zramd 0.9.2-1 (+10 0.89)
Automatically setup swap on zram :sparkles:
3 aur/zramswap 5-1 (+237 1.53) (Installed)
Sets up zram-based swap devices on boot
2 community/zram-generator 1.1.2-1 (322.4 KiB 770.0 KiB)
Systemd unit generator for zram devices

How (on a example of one of these packages) can I set things up to make zram work properly?

Hi @Hedgeg

I am not knowledgeable on this topic, but looking at Arch Wiki, it seems as simple as enabling a service in some cases, or in other cases, also creating a configuration file (you can use the sample link there). If you would like to try any of those options, I could help you with the instructions from the Arch Wiki.

However, I remember that Garuda Linux has already set up zram by default. Perhaps Garuda devs can help (on their forum) if you need a knowledgeable person on this topic.

Hi Hedgeg,
I experimented with a ZRAM setup and have successfully implemented it. I didn’t use the zram-generator, but I did use the zramswap AUR package and followed the guidance from Daniel Wayne Armstrong’s page titled ‘arch linux zram-swap setup’. I first setup an 8GB zram swap, but then decided to change it to a 4GB swap because that system already has 16GB of system RAM. Let me know if you need to see the setup from that system, but I think you should be fine using the zramswap package.

One last thing, is you might need to disable the zswap which may already be enabled by default. You will need to add the kernel parameter: zswap.enabled=0

1 Like

I just finished my first How to in the RebornOS Wiki on this subject, please let me know if it helped you :hugs: or made things more confusing :crazy_face:

2 Likes

I fifnished with zram-generator with sertain config lines in /etc/systemd/zram-generator.conf:
*maybe it another source of zram config but i found that according to internet

[zram0]
zram-size = ram / 5 * 2
compression-algorithm = zstd
swap-priority = 100
fs-type = swap

Idk about kernel parameters or other sources of zdevices in system and Daniel Wayne Armstrong’s article seems a bit complicated with too many comands in it.

Your article unavaiible rn on a wiki, would apprisiate to see it live again.

Older topic, sorry to bump but the link was changed to the how-to.

https://wiki.rebornos.org/en/howto/use-zram-instead-of-zswap