meta data for this page
  •  

Differences

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

Link to this comparison view

Next revision
Previous revision
linux:fs:zfs:tuning:hdd [2026/03/20 07:25] – created niziaklinux:fs:zfs:tuning:hdd [2026/07/07 19:44] (current) niziak
Line 2: Line 2:
  
 [[https://github.com/openzfs/zfs/discussions/14916|ZFS Send & RaidZ - Poor performance on HDD #14916]] [[https://github.com/openzfs/zfs/discussions/14916|ZFS Send & RaidZ - Poor performance on HDD #14916]]
 +
 +All ''zfs_vdev'' read/write parameters are for number of parallel requests to one vdev (i.e. for 2x HDD mirror it is for each HDD).
 +So for very slow 2xHDD mirror it is good to limit reads to 2 (2xHDD = 4 parallel reads), and write to 2.
  
 <code bash> <code bash>
Line 26: Line 29:
 **Note:**  Latest Proxmox default volblock size was increased form 8k to 16k. When 8k is used warning is shown: **Note:**  Latest Proxmox default volblock size was increased form 8k to 16k. When 8k is used warning is shown:
 <code> <code>
- 
 Warning: volblocksize (8192) is less than the default minimum block size (16384). Warning: volblocksize (8192) is less than the default minimum block size (16384).
 To reduce wasted space a volblocksize of 16384 is recommended. To reduce wasted space a volblocksize of 16384 is recommended.
- 
 </code> </code>
 +
 +====== Change volblock (by copying to new) ======
  
 <code bash> <code bash>
Line 39: Line 42:
 </code> </code>
  
-Use of''bfq'' is mandatory. See [[#my_findings|my findings]].+<code bash> 
 +zfs list 
 +rpool/data/vm-101-disk-0                       37.5G   854G  37.5G  - 
 +rpool/data/vm-101-disk-0-backup                41.9G   854G  41.9G  - 
 +</code>
  
-===== SMR =====+====== bfq ====== 
 + 
 +Use of''bfq'' is mandatory. See [[iosched#my_findings|my findings]]. 
 + 
 +====== prefetch ====== 
 + 
 +By default prefetech is enabled. Enabling it generates additional ''async'' reads. 
 + 
 +''/sys/module/zfs/parameters/zfs_prefetch_disable'' 
 +''/sys/module/zfs/parameters/zvol_prefetch_bytes'' 
 + 
 +NOTE: Disable it ! I was unable to peform full (dirty bitmap lost after restart) KVM backup to PBS due to huge sync read queue times (up to 25s) and backup times out with error. 
 + 
 + 
 +====== SMR ======
  
   * SMR drives behaves correctly for sequential writes, but long working ZFS or LVM thin spread writes into lots of random location causing unusable IOPS. So never use SMR.   * SMR drives behaves correctly for sequential writes, but long working ZFS or LVM thin spread writes into lots of random location causing unusable IOPS. So never use SMR.
   * If SMR must be  used try to set ''spa_num_allocators=1'' (default is 4) [[https://openzfs.github.io/openzfs-docs/man/v2.3/4/zfs.4.html#spa_num_allocators|spa_num_allocators]]   * If SMR must be  used try to set ''spa_num_allocators=1'' (default is 4) [[https://openzfs.github.io/openzfs-docs/man/v2.3/4/zfs.4.html#spa_num_allocators|spa_num_allocators]]
 +
 +