Skip to content

Instantly share code, notes, and snippets.

@CroneKorkN
Last active April 22, 2017 08:33
Show Gist options
  • Save CroneKorkN/777ca1ef5e8884b893be234f89d614c2 to your computer and use it in GitHub Desktop.
Save CroneKorkN/777ca1ef5e8884b893be234f89d614c2 to your computer and use it in GitHub Desktop.
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2012-02/msg00157.html
http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6r2s/index.html#gcfgr
get stats: cat /proc/spl/kstat/zfs/arcstats
@ruegand
zpool create \
-o compression=on \
-o primarycache=metadat \ # (only metadata in L1ARC)
-o secondarycache=all \
-o compression=on \
-o atime=on \
-o relatime=on \ # (depends on atime)
-o volblocksize=4K \ # (fdisk -l | grep Sector\ size)
-o com.sun:auto-snapshot=false \
@db-volume
zpool create \
-o recordsize=8k (rdbmses commit in 8k portions)
-o logbias=throuput (disable ZIL, cause rdbmses are alreade corruption safe)#
#################
/etc/modprobe.d/zfs.conf (https://dan.langille.org/2013/02/)
options zfs txg.synctime_ms="2000" # ?
options zfs txg.timeout="5" # ???
options zfs zfs_arc_min=536870912
options zfs zfs_arc_max=2147483648
#################
finally:
zpool create tank /dev/disk/by-partlabel/part1-mirror1 /dev/disk/by-partlabel/part2-mirror1 log /dev/disk/by-partlabel/slog1 cache /dev/disk/by-partlabel/l2arc1 -o ashift=12
zfs set compress=lz4 tank
zfs set atime=on tank
zfs set relatime=on tank
zfs set primarycache=metadata tank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment