# Logical volume is on an SSD/NVMe
lvcreate <vgname> --size 4G --name slog
zpool create tank raidz2 -o ashift=12 -O atime=off -O canmount=off -O compression=lz4 -O normalization=formD -O mountpoint=/opt/backups -O xattr=sa \
/dev/vdb /dev/vdc /dev/vdd /dev/vde /dev/vdf /dev/vdg
zfs create tank/backuppc
zfs create tank/incoming
zfs create tank/restore
zpool add tank log <vgname>-slog
- ashift http://open-zfs.org/wiki/Performance_tuning#Alignment_Shift_.28ashift.29
- TL;DR: zfs recordsize = 4kB
- Possibly increases performance, reduces total storage a bit.
- atime Disable unnecessary overhead from setting access time
- canmount Disable mounting the root of the pool; only use ZVOL filesystems
- compression Enable lz4 compression, which is almost transparent
- Also means we can disable compression in backuppc
- normalization Complex unicode filename comparison shizzle.
- formD is supposedly more performant than the default and does some neat stuff.
- If you're suicidal: https://unicode.org/reports/tr15/#Normalization_Forms_TableG
- xattr http://www.nerdblog.com/2013/10/zfs-xattr-tuning-on-linux.html
- Put xattrs in inodes instead of in a hidden folder (performance increase)
/dev/vdb
/dev/vdc
/dev/vdd
/dev/vde
/dev/vdf
/dev/vdg
Useful for increasing read speeds.
ARC is in RAM.
L2ARC is on a separate device. With only 16 GB RAM, configuring L2ARC is not beneficial. From 32 GB or higher read performance increases can be seen. Every block on L2ARC uses a bit of RAM. Formula: https://www.reddit.com/r/zfs/comments/4glcfb/l2arc_scoping_how_much_arc_does_l2arc_eat_on/d2iu4py/
Monitoring ARC: http://fibrevillage.com/storage/169-zfs-arc-on-linux-how-to-set-and-monitor-on-linux
ZFS Intent Log / Separate Intent Log
Default ZIL is on the pool itself. Using a SLOG on a faster device than is running the pool can improve performance, especially when writing small random IO. It does not matter much for large IOs.
It should be noted that if the SSD fails while there's still data not committed to the pool, that data will be lost.
Disable compression in backuppc as we already have practically transparent compression in zfs