One-liners to limit ZFS ARC (live + permanent) so it doesn’t eat most of your RAM next to KVM/libvirt guests. Defaults leave arc_max uncapped; 4–8 GB is a good desktop/VM ceiling.
Live:
# 8 GB ZFS ARC Cache
echo $((8 * 1024 * 1024 * 1024)) | sudo tee /sys/module/zfs/parameters/zfs_arc_max# 4 GB ZFS ARC Cache
echo $((4 * 1024 * 1024 * 1024)) | sudo tee /sys/module/zfs/parameters/zfs_arc_maxPermanent:
# 8 GB ZFS ARC Cache
echo 'options zfs zfs_arc_max=8589934592' | sudo tee /etc/modprobe.d/zfs.conf && sudo update-initramfs -u # 4 GB ZFS ARC Cache
echo 'options zfs zfs_arc_max=4294967296' | sudo tee /etc/modprobe.d/zfs.conf && sudo update-initramfs -u