meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:fs:zfs:tuning [2026/03/20 07:51] niziaklinux:fs:zfs:tuning [2026/04/14 21:43] (current) niziak
Line 14: Line 14:
 See more in [[linux:fs:zfs:compression]] See more in [[linux:fs:zfs:compression]]
  
 +
 +===== stripe size =====
 +
 +ZFS use dynamic stripe size. One strip is one write transaction (limited by recordsize).
 +So zfs dataset recordsize needs tunning to given type of workload.
 +
 +For example: on pool composed as  3 x 2 HDD mirror:
 +
 +<code bash>fio --name=rand-4k --ioengine=libaio --rw=randrw --rwmixread=70 --bs=1m --direct=1 --size=1G --numjobs=6 --iodepth=16 --runtime=60 --time_based --filename=fio_testfile --group_reporting</code>
 +
 +  * zfs dataset with recordsize 128k:
 +    * BS=4k jobs=1 IOPS RW 214/91
 +    * BS=4k jobs=6 IOPS RW 2107/909
 +    * BS=16k jobs=1 IOPS RW 137/59
 +    * BS=16k jobs=6 IOPS RW 1277/549
 +    * BS=128k jobs=1 IOPS RW 190/82
 +    * BS=128k jobs=6 IOPS RW 549/239
 +    * BS=1m jobs=1 IOPS RW 48/21
 +    * BS=1m jobs=6 IOPS RW 164/71
 +    * BS=16m jobs=1 IOPS RW 9/4
 +    * BS=16m jobs=6 IOPS RW 17/7
 +  * zfs dataset with recordsize 1M:
 +    * BS=4k jobs=6 IOPS RW 21,7/9k - aggregated
 +    * BS=128k jobs=6 IOPS RW 1125/484
 +    * BS=1m jobs=6 IOPS RW 232/101
 +    * BS=16m jobs=6 IOPS RW
 +  * zfs dataset with recordsize 16M:
 +    * BS=4k jobs=1 IOPS RW 38/16
 +    * BS=4k jobs=6 IOPS RW 156k/67k
 +    * BS=16k jobs=1 IOPS RW 31/14
 +    * BS=16k jobs=6 IOPS RW 122k/52k
 +    * BS=128k jobs=1 IOPS RW 20/9
 +    * BS=128k jobs=6 IOPS RW 17.7K/7607 - small iops are aggregated into 16M
 +    * BS=1m jobs=1 IOPS RW 30/13
 +    * BS=1m jobs=6 IOPS RW 2586/1117
 +    * BS=16m jobs=1 IOPS RW 5/2
 +    * BS=16m jobs=6 IOPS RW 20/8
 +
 +For example: on pool composed as 6x HDD raidz2:
 +  * zfs dataset with recordsize 16M:
 +    * BS=128k jobs=6 IOPS RW 16.4k/7026
 +    * BS=1m jobs=6 IOPS RW 2472/1068
 +    * BS=16m jobs=6 IOPS RW 27/11
  
 ===== zil limit ===== ===== zil limit =====