You are not logged in.

#1 2024-04-29 02:17:04

HurricanePootis
Member
Registered: 2020-10-16
Posts: 18

Questions About Having both Zram and Zswap Togther

Hello everybody,

Currently on my system, I have two swap devices: a zram devices and a swap file. The swap file is 6GB and the zram device is set to 15.6GB using zram-generator; it also gives my zram device a higher priority than my swap file. I am keeping my swap file because I hibernate my system.

So my questions is this: since my zram device has a higher priority than my swap file, if I were to keep zswap enabled, would my zram performance be affected at all?

I appreciate the help!

Offline

#2 2024-04-29 06:34:01

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: Questions About Having both Zram and Zswap Togther

https://wiki.archlinux.org/title/Zram#Usage_as_swap

If the related zswap kernel feature remains enabled, it will prevent zram from being used effectively. This is because zswap functions as a swap cache in front of zram, intercepting and compressing evicted memory pages before they can reach zram. Despite the output of zramctl(8), most of zswap is unused in this circumstance. Therefore, it's recommended to permanently disable zswap using the kernel parameter or sysfs setting before starting.

Pick one of them and add a https://wiki.archlinux.org/title/Swap#Swap_file with lower priority to capture the spill.

Offline

Board footer

Powered by FluxBB