[SOLVED] ZRAM as Swap and ZFS

Johannes S

Distinguished Member
Sep 7, 2024
1,540
1,140
178
Hello everybody,

as most of you propably know using a ZFS ZVOL as swap device is not supported and might lead to problems and thus should be avoided. On the other hand using a zram compressed swap device is possible and even mentioned in the wiki to mitigate a lack of memory (a common problem in homelabs, nost just mine ;) ):
https://pve.proxmox.com/wiki/Zram

Maybe I'm wrong but due to the swap being entirely in memory combining zram swap and ZFS shouldn't be a problem, right?

I did try to search the forum for older discussions on this but neither the forums native search nor google with site:forum.proxmox.com yielded anything expect the already linked wiki page and https://forum.proxmox.com/threads/how-to-configure-zram-on-zfs.151747/

Am I missing something?

Best regards, Johannes.
 
Last edited:
Maybe I'm missing something but due to the swap being entirely in memory combining zram swap and ZFS shouldn't be a problem or am I missing something?
The problem with swap on ZFS was as far as I remember that there was a deadlock, that as triggered or the system just rebooted. I ran into this a couple of times in the past and switches to zram. I use it in ZFS and non-ZFS system for many years without a problem.
 
The problem with swap on ZFS was as far as I remember that there was a deadlock, that as triggered or the system just rebooted. I ran into this a couple of times in the past and switches to zram. I use it in ZFS and non-ZFS system for many years without a problem.

Thanks! I asked because I have to reinstall PVE on one mini-pc and want to use the Situation to switch from lvm to zfs
 
  • Like
Reactions: Kingneutron