[PLUG] Ubuntu 20.04 ZFS swap

Paul Heinlein heinlein at madboa.com
Fri Jul 3 15:27:23 UTC 2020


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
heinlein at madboa.com
45°38' N, 122°6' W


More information about the PLUG mailing list