ZFS – Tuning
ZFS tuning for SAS3 Storage Tank
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
#### # ZFS tuning ### echo > /etc/modprobe.d/zfs.conf echo -e "\ # ---------------- BEGIN ---------------- \r # ZFS tuning for SAS3 12GE Storage Tank \r # tank-a Total Memory: 327680 MB # tank-b Total Memory: 393216 MB # total arc size limited to 90% of free -m - factor is 1024 \r # zfs_arc_max={{ '%d' | format(memtotal_mb*1024*1024*0.9) }} \r options zfs zfs_arc_min=262144000000 \r options zfs zfs_arc_max=314572800000 \r options zfs zfs_compressed_arc_enabled=0 \r ###\r # txg timeout \r options zfs zfs_txg_timeout=5 \r ###\r # disable prefetch \r options zfs zfs_prefetch_disable=1 \r ###\r # tune l2arc \r # max write speed to l2arc \r # default : 8 * 1024 * 1024 \r # setting here : 500 * 1024 * 1024 \r options zfs l2arc_write_max=524288000 \r options zfs l2arc_write_boost=524288000 \r options zfs l2arc_noprefetch=0 \r options zfs l2arc_headroom=24 \r ###\r # dirty pages \r options zfs zfs_dirty_data_max_percent=40 \r ###\r # sync zfs_vdev_* \r # increase them so scrub/resilver is more quickly at the cost of other work \r options zfs zfs_vdev_scrub_min_active=24 \r options zfs zfs_vdev_scrub_max_active=64 \r # sync write \r options zfs zfs_vdev_sync_write_min_active=8 \r options zfs zfs_vdev_sync_write_max_active=32 \r # sync reads (normal) \r options zfs zfs_vdev_sync_read_min_active=8 \r options zfs zfs_vdev_sync_read_max_active=32 \r # async reads : prefetcher \r options zfs zfs_vdev_async_read_min_active=8 \r options zfs zfs_vdev_async_read_max_active=32 \r # async write : bulk writes \r options zfs zfs_vdev_async_write_min_active=8 \r options zfs zfs_vdev_async_write_max_active=32 \r ###\r # scrub \r options zfs zfs_top_maxinflight=320 \r options zfs zfs_resilver_delay=0 \r options zfs zfs_scrub_delay=0 \r options zfs zfs_resilver_min_time_ms=5000 \r ###\r # scheduler \r options zfs zfs_vdev_scheduler=deadline \r ###\r # cpu limits \r options zfs zio_taskq_batch_pct=85 \r options zfs zfs_sync_taskq_batch_pct=85 \r ###\r # history \r options zfs zfs_read_history=100 \r options zfs zfs_read_history_hits=100 \r options zfs zfs_txg_history=10 \r ###\r # other tuning\r options zfs zfs_nocacheflush=1 \r ###\r # --------------- END ------------------" \ > /etc/modprobe.d/zfs.conf cat /etc/modprobe.d/zfs.conf /sbin/modprobe zfs cat /proc/spl/kstat/zfs/arcstats |
ZFS tuning for SAS3 ALL SSD + nVME Storage Tank
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
#### # ZFS tuning # https://www.svennd.be/tuning-of-zfs-module/ ### echo > /etc/modprobe.d/zfs.conf echo -e "\ # ---------------- BEGIN ---------------- \r # ZFS tuning for SAS3 ALL SSD + nVME Storage Tank \r # total arc size limited to 90% of free -m - factor is 1024 \r # zfs_arc_max={{ '%d' | format(memtotal_mb*1024*1024*0.9) }} \r options zfs zfs_arc_min=262144000000 \r options zfs zfs_arc_max=283115520000 \r options zfs zfs_compressed_arc_enabled=0 \r ###\r # txg timeout \r options zfs zfs_txg_timeout=5 \r ###\r # disable prefetch \r options zfs zfs_prefetch_disable=1 \r ###\r # tune l2arc \r # max write speed to l2arc \r # default : 8 * 1024 * 1024 \r # setting here : 500 * 1024 * 1024 \r options zfs l2arc_write_max=524288000 \r options zfs l2arc_write_boost=524288000 \r options zfs l2arc_noprefetch=0 \r options zfs l2arc_headroom=24 \r ###\r # dirty pages \r options zfs zfs_dirty_data_max_percent=40 \r ###\r # sync zfs_vdev_* \r # increase them so scrub/resilver is more quickly at the cost of other work \r options zfs zfs_vdev_scrub_min_active=24 \r options zfs zfs_vdev_scrub_max_active=64 \r # sync write \r options zfs zfs_vdev_sync_write_min_active=8 \r options zfs zfs_vdev_sync_write_max_active=32 \r # sync reads (normal) \r options zfs zfs_vdev_sync_read_min_active=8 \r options zfs zfs_vdev_sync_read_max_active=32 \r # async reads : prefetcher \r options zfs zfs_vdev_async_read_min_active=8 \r options zfs zfs_vdev_async_read_max_active=32 \r # async write : bulk writes \r options zfs zfs_vdev_async_write_min_active=8 \r options zfs zfs_vdev_async_write_max_active=32 \r ###\r # scrub \r options zfs zfs_top_maxinflight=320 \r options zfs zfs_resilver_delay=0 \r options zfs zfs_scrub_delay=0 \r options zfs zfs_resilver_min_time_ms=5000 \r ###\r # scheduler \r options zfs zfs_vdev_scheduler=deadline \r ###\r # cpu limits \r options zfs zio_taskq_batch_pct=85 \r options zfs zfs_sync_taskq_batch_pct=85 \r ###\r # history \r options zfs zfs_read_history=100 \r options zfs zfs_read_history_hits=100 \r options zfs zfs_txg_history=10 \r ###\r # other tuning\r options zfs zfs_nocacheflush=1 \r ###\r # --------------- END ------------------" \ > /etc/modprobe.d/zfs.conf cat /etc/modprobe.d/zfs.conf /sbin/modprobe zfs cat /proc/spl/kstat/zfs/arcstats |
Some more good advice: