On Thu, 2 Jul 2020, Tom wrote:

# create a zfs filesystem, with compression (optional)
zfs create -V 4G -b 4096 \
   -o compression=lz4 -o logbias=throughput -o sync=always \
   -o primarycache=metadata -o secondarycache=none \
   rpool/swap

# make it into swap fs
mkswap -f /dev/zvol/rpool/swap

# turn it on
swapon /dev/zvol/rpool/swap

I would not recommend doing that. Swap on ZFS subvolume is not stable on Linux yet and leads to lockups. I've done it myself and eventually just placed a small SSD into my system and used that exclusively for a large swap.

Without questioning Tom's experience, I'll only note that we have not seen such lockups. Our systems with swap on ZFS run smoothly. I will, however, keep an eye out for these symptoms.

--
Paul Heinlein
[email protected]
45°38' N, 122°6' W
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to