so use the default freebsd-swap partition is better?It's not recommended.
zvol is in ZFS pool, just NOT a ZFS native filesystem (dataset).
This means that features of the pool is applied to zvol, too.
It allows fragile filesystems to be backed by the reliability features of ZFS pools (i.e., checksum, if configured, zraid, ...), with the cost of additional memories to handle the features.
This can cause things worse (at worst, crash) on so-called "thrashing" state.
Same (at least alike) can be said with swap files on UFS (or any other filesystems). So dedicated "physical" swap partition is strongly recommended.
Looking into info on Internet, Solaris after making ZFS its default documents to use zvol for swaps. Not read the relevant source codes, but it would be because ZFS is the only filesystem to be configured, and would keep sufficient (a fair amount of) physical memories to handle ZFS features even on thrashing states, but it should mean that there are unallocatable-to-userland and unusable-for-other-purpose kernel memories, making thrashing state to come earlier.
For stability, yes.so us
so use the default freebsd-swap partition is better?
It would be because Solaris was re-designed to allow it stably (with the cost of not so small memory consumption) use swap on zvol when it made ZFS the default filesystem.The ZVOL based swap-areas in Solaris is handy as it allows you to Re-size the swap areas if requiered
Add ZVOL swap on second HDD
Delete ZVOL swap on first HDD & recreate it with desired SIZE.
No messing about with backing up ZROOT filesystem and deleting HDD root partition to increase swap Parttion and finally restoreing ZROOT.
Does this have any performance improvement?I never had any stability problems with zfs-swap created like this:
zfs create -V 8G -o org.freebsd:swap=on \
-o checksum=off \
-o compression=off \
-o dedup=off \
-o sync=disabled \
-o primarycache=metadata \
-o secondarycache=none \
-o logbias=throughput \
zpool/swap
I did not run any benchmark tests so I cannot say anything about "performance".Does this have any performance improvement?
I just care about performance. I've heard that frequent use of swap and ZFS can degrade performance, so I want to try zfs-swap.If you want encrypted swap maybe it is a good idea to not use zfs-swap.
If possible install more hardware RAM so there is less need for swapping.I've heard that frequent use of swap and ZFS can degrade performance
I also want to upgrade the RAM for my laptop, but memory prices have gotten more expensive recently.If possible install more hardware RAM so there is less need for swapping.
check the refurbished market. There is broker- companies that ship re-used RAM , SSD , a.s.o. other than ebay.I also want to upgrade the RAM for my laptop, but memory prices have gotten more expensive recently.
Does this have any performance improvement?
I also want to upgrade the RAM for my laptop, but memory prices have gotten more expensive recently.
The ZVOL based swap-areas in Solaris is handy as it allows you to Re-size the swap areas if requiered
Add ZVOL swap on second HDD
Delete ZVOL swap on first HDD & recreate it with desired SIZE.
No messing about with backing up ZROOT filesystem and deleting HDD root partition to increase swap Parttion and finally restoreing ZROOT.
iirc swap onto a zvol can lead to deadlocks, but we don't have empirical evidence, just anecdotes.
I think he's talking about "how to expand swap space using zvol vs swap partitions". Partitions, need mucking around in gpart and doing things, which may have danger associated with it.Is that second paragraph still about Solaris or is it a FreeBSD suggestion? Either way what's the point of the second pool?
huh. we'd had both recommended against for the same reason. if zvols are safe that's cool.IIRC what can lead to deadlocks is swapping to a file that lives in a ZFS filesystem, not swapping to a zvol.
huh. we'd had both recommended against for the same reason. if zvols are safe that's cool.
He referred to deleting a zvol swap from the first drive and creating a new zvol swap on the second drive.I think he's talking about "how to expand swap space using zvol vs swap partitions". Partitions, need mucking around in gpart and doing things, which may have danger associated with it.
Swap on a zvol is add a new zpool, create the zvol on it, swapon new thing, swapoff on old.
Mucking around at a higher level than partitions so marginally less danger.
If you are in multi-user mode , some things may use the swap ,,, so it should not be removed completely .He referred to deleting a zvol swap from the first drive and creating a new zvol swap on the second drive.