How To Set And Use ZRAM swap

Thank you for the quick reply.

My newest finding is that it’s not necessary to provide dom0 with more than 2GB zram.

Could you please explain how you found that? I am asking in order to find the correct number for a system with N GiB of RAM (and based on other factors which you may have considered too).

The fact that zram is included both in Fedora and Debian now should say enough.

I don’t quite understand. Enough for what? I suppose you are not saying that if a package is included in a distro automatically makes it free of disadvantages, so I hope you can clarify.

Also, in regards to that inclusion, does it somehow change the steps you suggest?

Not to say that I can format zram and use it temporary as any other block device,

Can you suggest how to do this in the thread where I asked about RAM disk? That might be really helpful if it provides additional benefits to a standard RAM disk.

but much faster, right?

I don’t know. It sounds so but perhaps it needs benchmarking because performance depends on the bottleneck in the particular system, be that the CPU (de/compression), RAM speed, HDD/SSD speed, zram size, compression algorithm, perhaps even the way the system is used (workload specifics). Looking at one of the links you shared I see zram can make things slower or faster.

Also, zswap decompressing to swap makes me extremely uncomfortable since under specific circumstances it can be very dangerous.

Could you please elaborate? (sorry if it is in the links you posted, I just can’t see it)

I’m not sure I understand this.

OK, I am clarifying: The question is in relation to your “For other qubes, it can be done by adding kerenlopts […]” which seems not to apply to a Windows VM. So, what I am asking is: how will the memory used by a Windows VM be swapped (if and when necessary) and are there any specific steps required in order to “zswap it” like the Linux qubes?

Beside disabling paging in Win qubes in order to spare SSD, I see creating RamDisk meaningful only to put browser cache there for example.

It is also meaningful for improving performance while working on big files, as I mentioned in the RAM disk thread.