Clarifying the ZRAM Implementation: dom0 vs. AppVMs

Continuing the discussion from Memes about Qubes OS:

Yes, I’m now using zram inside my AppVMs. It works.
But as I understand the project that alimirjamali linked to, zram is set up within dom0. Or did I misunderstand?

You can (and in my opinion should) set up zram in both AppVMs and dom0.

1 Like

Also see

2 Likes

I find it good, when having plenty of RAM, to also prevent SSD wearing off this way.

2 Likes

Where do you use ZRAM: AppVM and/or dom0?

In all Linux qubes, while not any swap in dom0 since assigned enough of RAM for otherwise not heavy loaded dom0 actions anyway.

For example:

[user@personal ~]$ swapon --show
NAME TYPE SIZE USED PRIO
/dev/xvdc1 partition 1024M 0B -1
/dev/zram0 partition 732M 61.2M 100
[user@personal ~]$ cat /sys/module/zswap/parameters/enabled
N

Meaning, no hibernation, but sleep is enough. It’s probably reflex from the past where hibernation doesn’t work with Qubes reliably anyway. In addition I always strongly disliked hibernation in any kind of shape and form. Walt Disney obviously disagreed with me.

1 Like

Personally, both AppVMs and dom0 but not much usually happens in dom0, so you could skip that. Although, using zram in place of normal swap in dom0 will reduce disk writes, as unless your swappiness is 0/1, Linux will always use a little bit of swap.

1 Like