-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Looking in:
https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device
I see
zfs create -V 4G -b $(getconf PAGESIZE) -o compression=zle \
-o logbias=throughput -o sync=always \
-o primarycache=metadata -o secondarycache=none \
-o com.sun:auto-snapshot=false rpool/swap
why sync=always? if the system crashes all RAM will be lost. hence writing swap synchronously seems a bit too much.
sync=always
For the ultra-cautious, every file system transaction is
written and flushed to stable storage by a system call return.
This obviously has a big performance penalty.
FreeBSD docs for reference:
https://wiki.freebsd.org/RootOnZFS#ZFS_Swap_Volume
zfs create -V 2G -o org.freebsd:swap=on -o checksum=off -o compression=off -o dedup=off -o sync=disabled -o primarycache=none zroot/swap
Why should it be sync=always when using zfs on linux, or is it a typo?
Metadata
Metadata
Assignees
Labels
No labels