FreeBSD 9.1 and swap on zfs
Kai Gallasch
gallasch at free.de
Mon Apr 8 13:08:58 UTC 2013
Hi.
When running a ZFS on root FreeBSD install..
is it for FreeBSD 9.1 (ZFS v28) still not advisable to use a vdev as swapspace? - like:
# zfs create -V 8G \
-o org.freebsd:swap=on \
-o sync=disabled \
-o primarycache=none \
-o secondarycache=none rpool/swap
# swapon /dev/zvol/rpool/swap
Often voiced fears for swapping on zfs are, that at the moment the server starts to swap, ZFS will start to compete for memory with the short-on-memory server itself (reason for swapping) and the system will lock up shortly after.
Seems a lot of ZFS-on-root single disk setups make use of an extra swap partition on the root-disk.
People booting of a mirrored-zpool often seem to have a swap partition on both disks forming the zpool and use those as devices for a gmirror. They then use the gmirror device as swap.
Which approach is the recommended one?
Swapping to ZFS *or* a swap partition / gmirror on top of two partitions?
Regards,
Kai Gallasch.
More information about the freebsd-fs
mailing list