Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2013 15:08:55 +0200
From:      Kai Gallasch <gallasch@free.de>
To:        freebsd-fs@freebsd.org
Subject:   FreeBSD 9.1 and swap on zfs
Message-ID:  <9407C6ED-3B4C-4BA2-8B88-F8A998E0A847@free.de>

next in thread | raw e-mail | index | archive | help

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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9407C6ED-3B4C-4BA2-8B88-F8A998E0A847>