Zram and Endeavouros

Hi, how many guys in endeavour os community uses zram ?

And to activate zram on endeavour os

Enable zram:

sudo pacman -S zram-generator
sudo touch /usr/lib/systemd/zram-generator.conf
sudo nano /usr/lib/systemd/zram-generator.conf

I use this configuration:

zram-fraction = 1.0
# Maximum is half of my usable RAM.
max-zram-size = 6144 
compression-algorithm = zstd

Thanx :blush:

1 Like

Are this steps are correct?

Am i missing something?

I use it on all my physical machines at this point.

Not exactly. First of all, there is no reason to touch a file before editing it.

You should setup the file at /etc/systemd/zram-generator.conf instead of using the location in /usr/lib

These days I am using 100% of ram up to 8GB.

sudo nano /etc/systemd/zram-generator.conf

Like this?

Sure. That is one way to do it.

Which way you had do this?

I am learning terminal, so i want to know

There are virtually an unlimited number of ways to edit and/or install a configuration file. Using sudo nano is a perfectly reasonable way.

I would use vi personally but I don’t recommend that if you don’t know how to use it.

1 Like

And can you show us

Your zram configuration

It would be helpful for newbie like me

I could if I had access to that machine but I am not in front of it at the moment.


And to disable zswap,

Because it can cause problems with zRAM


cat /sys/module/zswap/parameters/enabled

an is Y then disable it

in the grub with
sudo nano /etc/default/grub

In the Nano editor, locate the line GRUB_CMDLINE_LINUX_DEFAULT. This line of code in the configuration file should have a few command-line arguments, such as “quiet splash,” and maybe a few others. Don’t erase them! Instead, add the code below at the end of the line.

grub-mkconfig -o /boot/grub/grub.cfg

Are this steps are correct?

You shouldn’t need to disable zswap. It shouldn’t be used by default.

Where are you getting these instructions?

Arrch Forum & Reddit

Screenshot 2021-08-28 at 09-37-09 Improving performance - ArchWiki

Link : https://wiki.archlinux.org/title/improving_performance#zram_or_zswap

arch wiki says we need to disable zswap,

zswap is enabled by default in endos

1 Like

I didnt notice that. I am using zram but I have not disabled any zswap. Are you sure about the EndeavourOS default?

My /etc/systemd/zram-generator.conf is very simple:

max-zram-size = 12288

I am only specifying the amount of RAM. Thats it.

1 Like

According to the Arch Wiki:

In the stable linux official kernel, zswap is enabled by default. This can be verified via the CONFIG_ZSWAP_DEFAULT_ON flag in the stable kernel config.

Yes it is enabled by default on enos

I missed that. Thank you. I am running zram since ages without disabling zswap. I will disable it now.

Why 12228?