1.\" 2.\" Copyright (c) 2013 by Turbo Fredriksson <turbo@bayour.com>. All rights reserved. 3.\" Copyright (c) 2019, 2021 by Delphix. All rights reserved. 4.\" Copyright (c) 2019 Datto Inc. 5.\" Copyright (c) 2023, 2024 Klara, Inc. 6.\" The contents of this file are subject to the terms of the Common Development 7.\" and Distribution License (the "License"). You may not use this file except 8.\" in compliance with the License. You can obtain a copy of the license at 9.\" usr/src/OPENSOLARIS.LICENSE or https://opensource.org/licenses/CDDL-1.0. 10.\" 11.\" See the License for the specific language governing permissions and 12.\" limitations under the License. When distributing Covered Code, include this 13.\" CDDL HEADER in each file and include the License file at 14.\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this 15.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your 16.\" own identifying information: 17.\" Portions Copyright [yyyy] [name of copyright owner] 18.\" 19.\" Copyright (c) 2024, Klara, Inc. 20.\" 21.Dd November 1, 2024 22.Dt ZFS 4 23.Os 24. 25.Sh NAME 26.Nm zfs 27.Nd tuning of the ZFS kernel module 28. 29.Sh DESCRIPTION 30The ZFS module supports these parameters: 31.Bl -tag -width Ds 32.It Sy dbuf_cache_max_bytes Ns = Ns Sy UINT64_MAX Ns B Pq u64 33Maximum size in bytes of the dbuf cache. 34The target size is determined by the MIN versus 35.No 1/2^ Ns Sy dbuf_cache_shift Pq 1/32nd 36of the target ARC size. 37The behavior of the dbuf cache and its associated settings 38can be observed via the 39.Pa /proc/spl/kstat/zfs/dbufstats 40kstat. 41. 42.It Sy dbuf_metadata_cache_max_bytes Ns = Ns Sy UINT64_MAX Ns B Pq u64 43Maximum size in bytes of the metadata dbuf cache. 44The target size is determined by the MIN versus 45.No 1/2^ Ns Sy dbuf_metadata_cache_shift Pq 1/64th 46of the target ARC size. 47The behavior of the metadata dbuf cache and its associated settings 48can be observed via the 49.Pa /proc/spl/kstat/zfs/dbufstats 50kstat. 51. 52.It Sy dbuf_cache_hiwater_pct Ns = Ns Sy 10 Ns % Pq uint 53The percentage over 54.Sy dbuf_cache_max_bytes 55when dbufs must be evicted directly. 56. 57.It Sy dbuf_cache_lowater_pct Ns = Ns Sy 10 Ns % Pq uint 58The percentage below 59.Sy dbuf_cache_max_bytes 60when the evict thread stops evicting dbufs. 61. 62.It Sy dbuf_cache_shift Ns = Ns Sy 5 Pq uint 63Set the size of the dbuf cache 64.Pq Sy dbuf_cache_max_bytes 65to a log2 fraction of the target ARC size. 66. 67.It Sy dbuf_metadata_cache_shift Ns = Ns Sy 6 Pq uint 68Set the size of the dbuf metadata cache 69.Pq Sy dbuf_metadata_cache_max_bytes 70to a log2 fraction of the target ARC size. 71. 72.It Sy dbuf_mutex_cache_shift Ns = Ns Sy 0 Pq uint 73Set the size of the mutex array for the dbuf cache. 74When set to 75.Sy 0 76the array is dynamically sized based on total system memory. 77. 78.It Sy dmu_object_alloc_chunk_shift Ns = Ns Sy 7 Po 128 Pc Pq uint 79dnode slots allocated in a single operation as a power of 2. 80The default value minimizes lock contention for the bulk operation performed. 81. 82.It Sy dmu_ddt_copies Ns = Ns Sy 3 Pq uint 83Controls the number of copies stored for DeDup Table 84.Pq DDT 85objects. 86Reducing the number of copies to 1 from the previous default of 3 87can reduce the write inflation caused by deduplication. 88This assumes redundancy for this data is provided by the vdev layer. 89If the DDT is damaged, space may be leaked 90.Pq not freed 91when the DDT can not report the correct reference count. 92. 93.It Sy dmu_prefetch_max Ns = Ns Sy 134217728 Ns B Po 128 MiB Pc Pq uint 94Limit the amount we can prefetch with one call to this amount in bytes. 95This helps to limit the amount of memory that can be used by prefetching. 96. 97.It Sy ignore_hole_birth Pq int 98Alias for 99.Sy send_holes_without_birth_time . 100. 101.It Sy l2arc_feed_again Ns = Ns Sy 1 Ns | Ns 0 Pq int 102Turbo L2ARC warm-up. 103When the L2ARC is cold the fill interval will be set as fast as possible. 104. 105.It Sy l2arc_feed_min_ms Ns = Ns Sy 200 Pq u64 106Min feed interval in milliseconds. 107Requires 108.Sy l2arc_feed_again Ns = Ns Ar 1 109and only applicable in related situations. 110. 111.It Sy l2arc_feed_secs Ns = Ns Sy 1 Pq u64 112Seconds between L2ARC writing. 113. 114.It Sy l2arc_headroom Ns = Ns Sy 8 Pq u64 115How far through the ARC lists to search for L2ARC cacheable content, 116expressed as a multiplier of 117.Sy l2arc_write_max . 118ARC persistence across reboots can be achieved with persistent L2ARC 119by setting this parameter to 120.Sy 0 , 121allowing the full length of ARC lists to be searched for cacheable content. 122. 123.It Sy l2arc_headroom_boost Ns = Ns Sy 200 Ns % Pq u64 124Scales 125.Sy l2arc_headroom 126by this percentage when L2ARC contents are being successfully compressed 127before writing. 128A value of 129.Sy 100 130disables this feature. 131. 132.It Sy l2arc_exclude_special Ns = Ns Sy 0 Ns | Ns 1 Pq int 133Controls whether buffers present on special vdevs are eligible for caching 134into L2ARC. 135If set to 1, exclude dbufs on special vdevs from being cached to L2ARC. 136. 137.It Sy l2arc_mfuonly Ns = Ns Sy 0 Ns | Ns 1 Ns | Ns 2 Pq int 138Controls whether only MFU metadata and data are cached from ARC into L2ARC. 139This may be desired to avoid wasting space on L2ARC when reading/writing large 140amounts of data that are not expected to be accessed more than once. 141.Pp 142The default is 0, 143meaning both MRU and MFU data and metadata are cached. 144When turning off this feature (setting it to 0), some MRU buffers will 145still be present in ARC and eventually cached on L2ARC. 146.No If Sy l2arc_noprefetch Ns = Ns Sy 0 , 147some prefetched buffers will be cached to L2ARC, and those might later 148transition to MRU, in which case the 149.Sy l2arc_mru_asize No arcstat will not be Sy 0 . 150.Pp 151Setting it to 1 means to L2 cache only MFU data and metadata. 152.Pp 153Setting it to 2 means to L2 cache all metadata (MRU+MFU) but 154only MFU data (ie: MRU data are not cached). This can be the right setting 155to cache as much metadata as possible even when having high data turnover. 156.Pp 157Regardless of 158.Sy l2arc_noprefetch , 159some MFU buffers might be evicted from ARC, 160accessed later on as prefetches and transition to MRU as prefetches. 161If accessed again they are counted as MRU and the 162.Sy l2arc_mru_asize No arcstat will not be Sy 0 . 163.Pp 164The ARC status of L2ARC buffers when they were first cached in 165L2ARC can be seen in the 166.Sy l2arc_mru_asize , Sy l2arc_mfu_asize , No and Sy l2arc_prefetch_asize 167arcstats when importing the pool or onlining a cache 168device if persistent L2ARC is enabled. 169.Pp 170The 171.Sy evict_l2_eligible_mru 172arcstat does not take into account if this option is enabled as the information 173provided by the 174.Sy evict_l2_eligible_m[rf]u 175arcstats can be used to decide if toggling this option is appropriate 176for the current workload. 177. 178.It Sy l2arc_meta_percent Ns = Ns Sy 33 Ns % Pq uint 179Percent of ARC size allowed for L2ARC-only headers. 180Since L2ARC buffers are not evicted on memory pressure, 181too many headers on a system with an irrationally large L2ARC 182can render it slow or unusable. 183This parameter limits L2ARC writes and rebuilds to achieve the target. 184. 185.It Sy l2arc_trim_ahead Ns = Ns Sy 0 Ns % Pq u64 186Trims ahead of the current write size 187.Pq Sy l2arc_write_max 188on L2ARC devices by this percentage of write size if we have filled the device. 189If set to 190.Sy 100 191we TRIM twice the space required to accommodate upcoming writes. 192A minimum of 193.Sy 64 MiB 194will be trimmed. 195It also enables TRIM of the whole L2ARC device upon creation 196or addition to an existing pool or if the header of the device is 197invalid upon importing a pool or onlining a cache device. 198A value of 199.Sy 0 200disables TRIM on L2ARC altogether and is the default as it can put significant 201stress on the underlying storage devices. 202This will vary depending of how well the specific device handles these commands. 203. 204.It Sy l2arc_noprefetch Ns = Ns Sy 1 Ns | Ns 0 Pq int 205Do not write buffers to L2ARC if they were prefetched but not used by 206applications. 207In case there are prefetched buffers in L2ARC and this option 208is later set, we do not read the prefetched buffers from L2ARC. 209Unsetting this option is useful for caching sequential reads from the 210disks to L2ARC and serve those reads from L2ARC later on. 211This may be beneficial in case the L2ARC device is significantly faster 212in sequential reads than the disks of the pool. 213.Pp 214Use 215.Sy 1 216to disable and 217.Sy 0 218to enable caching/reading prefetches to/from L2ARC. 219. 220.It Sy l2arc_norw Ns = Ns Sy 0 Ns | Ns 1 Pq int 221No reads during writes. 222. 223.It Sy l2arc_write_boost Ns = Ns Sy 33554432 Ns B Po 32 MiB Pc Pq u64 224Cold L2ARC devices will have 225.Sy l2arc_write_max 226increased by this amount while they remain cold. 227. 228.It Sy l2arc_write_max Ns = Ns Sy 33554432 Ns B Po 32 MiB Pc Pq u64 229Max write bytes per interval. 230. 231.It Sy l2arc_rebuild_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 232Rebuild the L2ARC when importing a pool (persistent L2ARC). 233This can be disabled if there are problems importing a pool 234or attaching an L2ARC device (e.g. the L2ARC device is slow 235in reading stored log metadata, or the metadata 236has become somehow fragmented/unusable). 237. 238.It Sy l2arc_rebuild_blocks_min_l2size Ns = Ns Sy 1073741824 Ns B Po 1 GiB Pc Pq u64 239Mininum size of an L2ARC device required in order to write log blocks in it. 240The log blocks are used upon importing the pool to rebuild the persistent L2ARC. 241.Pp 242For L2ARC devices less than 1 GiB, the amount of data 243.Fn l2arc_evict 244evicts is significant compared to the amount of restored L2ARC data. 245In this case, do not write log blocks in L2ARC in order not to waste space. 246. 247.It Sy metaslab_aliquot Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq u64 248Metaslab granularity, in bytes. 249This is roughly similar to what would be referred to as the "stripe size" 250in traditional RAID arrays. 251In normal operation, ZFS will try to write this amount of data to each disk 252before moving on to the next top-level vdev. 253. 254.It Sy metaslab_bias_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 255Enable metaslab group biasing based on their vdevs' over- or under-utilization 256relative to the pool. 257. 258.It Sy metaslab_force_ganging Ns = Ns Sy 16777217 Ns B Po 16 MiB + 1 B Pc Pq u64 259Make some blocks above a certain size be gang blocks. 260This option is used by the test suite to facilitate testing. 261. 262.It Sy metaslab_force_ganging_pct Ns = Ns Sy 3 Ns % Pq uint 263For blocks that could be forced to be a gang block (due to 264.Sy metaslab_force_ganging ) , 265force this many of them to be gang blocks. 266. 267.It Sy brt_zap_prefetch Ns = Ns Sy 1 Ns | Ns 0 Pq int 268Controls prefetching BRT records for blocks which are going to be cloned. 269. 270.It Sy brt_zap_default_bs Ns = Ns Sy 12 Po 4 KiB Pc Pq int 271Default BRT ZAP data block size as a power of 2. Note that changing this after 272creating a BRT on the pool will not affect existing BRTs, only newly created 273ones. 274. 275.It Sy brt_zap_default_ibs Ns = Ns Sy 12 Po 4 KiB Pc Pq int 276Default BRT ZAP indirect block size as a power of 2. Note that changing this 277after creating a BRT on the pool will not affect existing BRTs, only newly 278created ones. 279. 280.It Sy ddt_zap_default_bs Ns = Ns Sy 15 Po 32 KiB Pc Pq int 281Default DDT ZAP data block size as a power of 2. Note that changing this after 282creating a DDT on the pool will not affect existing DDTs, only newly created 283ones. 284. 285.It Sy ddt_zap_default_ibs Ns = Ns Sy 15 Po 32 KiB Pc Pq int 286Default DDT ZAP indirect block size as a power of 2. Note that changing this 287after creating a DDT on the pool will not affect existing DDTs, only newly 288created ones. 289. 290.It Sy zfs_default_bs Ns = Ns Sy 9 Po 512 B Pc Pq int 291Default dnode block size as a power of 2. 292. 293.It Sy zfs_default_ibs Ns = Ns Sy 17 Po 128 KiB Pc Pq int 294Default dnode indirect block size as a power of 2. 295. 296.It Sy zfs_dio_enabled Ns = Ns Sy 0 Ns | Ns 1 Pq int 297Enable Direct I/O. 298If this setting is 0, then all I/O requests will be directed through the ARC 299acting as though the dataset property 300.Sy direct 301was set to 302.Sy disabled . 303. 304.It Sy zfs_history_output_max Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq u64 305When attempting to log an output nvlist of an ioctl in the on-disk history, 306the output will not be stored if it is larger than this size (in bytes). 307This must be less than 308.Sy DMU_MAX_ACCESS Pq 64 MiB . 309This applies primarily to 310.Fn zfs_ioc_channel_program Pq cf. Xr zfs-program 8 . 311. 312.It Sy zfs_keep_log_spacemaps_at_export Ns = Ns Sy 0 Ns | Ns 1 Pq int 313Prevent log spacemaps from being destroyed during pool exports and destroys. 314. 315.It Sy zfs_metaslab_segment_weight_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 316Enable/disable segment-based metaslab selection. 317. 318.It Sy zfs_metaslab_switch_threshold Ns = Ns Sy 2 Pq int 319When using segment-based metaslab selection, continue allocating 320from the active metaslab until this option's 321worth of buckets have been exhausted. 322. 323.It Sy metaslab_debug_load Ns = Ns Sy 0 Ns | Ns 1 Pq int 324Load all metaslabs during pool import. 325. 326.It Sy metaslab_debug_unload Ns = Ns Sy 0 Ns | Ns 1 Pq int 327Prevent metaslabs from being unloaded. 328. 329.It Sy metaslab_fragmentation_factor_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 330Enable use of the fragmentation metric in computing metaslab weights. 331. 332.It Sy metaslab_df_max_search Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq uint 333Maximum distance to search forward from the last offset. 334Without this limit, fragmented pools can see 335.Em >100`000 336iterations and 337.Fn metaslab_block_picker 338becomes the performance limiting factor on high-performance storage. 339.Pp 340With the default setting of 341.Sy 16 MiB , 342we typically see less than 343.Em 500 344iterations, even with very fragmented 345.Sy ashift Ns = Ns Sy 9 346pools. 347The maximum number of iterations possible is 348.Sy metaslab_df_max_search / 2^(ashift+1) . 349With the default setting of 350.Sy 16 MiB 351this is 352.Em 16*1024 Pq with Sy ashift Ns = Ns Sy 9 353or 354.Em 2*1024 Pq with Sy ashift Ns = Ns Sy 12 . 355. 356.It Sy metaslab_df_use_largest_segment Ns = Ns Sy 0 Ns | Ns 1 Pq int 357If not searching forward (due to 358.Sy metaslab_df_max_search , metaslab_df_free_pct , 359.No or Sy metaslab_df_alloc_threshold ) , 360this tunable controls which segment is used. 361If set, we will use the largest free segment. 362If unset, we will use a segment of at least the requested size. 363. 364.It Sy zfs_metaslab_max_size_cache_sec Ns = Ns Sy 3600 Ns s Po 1 hour Pc Pq u64 365When we unload a metaslab, we cache the size of the largest free chunk. 366We use that cached size to determine whether or not to load a metaslab 367for a given allocation. 368As more frees accumulate in that metaslab while it's unloaded, 369the cached max size becomes less and less accurate. 370After a number of seconds controlled by this tunable, 371we stop considering the cached max size and start 372considering only the histogram instead. 373. 374.It Sy zfs_metaslab_mem_limit Ns = Ns Sy 25 Ns % Pq uint 375When we are loading a new metaslab, we check the amount of memory being used 376to store metaslab range trees. 377If it is over a threshold, we attempt to unload the least recently used metaslab 378to prevent the system from clogging all of its memory with range trees. 379This tunable sets the percentage of total system memory that is the threshold. 380. 381.It Sy zfs_metaslab_try_hard_before_gang Ns = Ns Sy 0 Ns | Ns 1 Pq int 382.Bl -item -compact 383.It 384If unset, we will first try normal allocation. 385.It 386If that fails then we will do a gang allocation. 387.It 388If that fails then we will do a "try hard" gang allocation. 389.It 390If that fails then we will have a multi-layer gang block. 391.El 392.Pp 393.Bl -item -compact 394.It 395If set, we will first try normal allocation. 396.It 397If that fails then we will do a "try hard" allocation. 398.It 399If that fails we will do a gang allocation. 400.It 401If that fails we will do a "try hard" gang allocation. 402.It 403If that fails then we will have a multi-layer gang block. 404.El 405. 406.It Sy zfs_metaslab_find_max_tries Ns = Ns Sy 100 Pq uint 407When not trying hard, we only consider this number of the best metaslabs. 408This improves performance, especially when there are many metaslabs per vdev 409and the allocation can't actually be satisfied 410(so we would otherwise iterate all metaslabs). 411. 412.It Sy zfs_vdev_default_ms_count Ns = Ns Sy 200 Pq uint 413When a vdev is added, target this number of metaslabs per top-level vdev. 414. 415.It Sy zfs_vdev_default_ms_shift Ns = Ns Sy 29 Po 512 MiB Pc Pq uint 416Default lower limit for metaslab size. 417. 418.It Sy zfs_vdev_max_ms_shift Ns = Ns Sy 34 Po 16 GiB Pc Pq uint 419Default upper limit for metaslab size. 420. 421.It Sy zfs_vdev_max_auto_ashift Ns = Ns Sy 14 Pq uint 422Maximum ashift used when optimizing for logical \[->] physical sector size on 423new 424top-level vdevs. 425May be increased up to 426.Sy ASHIFT_MAX Po 16 Pc , 427but this may negatively impact pool space efficiency. 428. 429.It Sy zfs_vdev_direct_write_verify Ns = Ns Sy Linux 1 | FreeBSD 0 Pq uint 430If non-zero, then a Direct I/O write's checksum will be verified every 431time the write is issued and before it is commited to the block pointer. 432In the event the checksum is not valid then the I/O operation will return EIO. 433This module parameter can be used to detect if the 434contents of the users buffer have changed in the process of doing a Direct I/O 435write. 436It can also help to identify if reported checksum errors are tied to Direct I/O 437writes. 438Each verify error causes a 439.Sy dio_verify_wr 440zevent. 441Direct Write I/O checkum verify errors can be seen with 442.Nm zpool Cm status Fl d . 443The default value for this is 1 on Linux, but is 0 for 444.Fx 445because user pages can be placed under write protection in 446.Fx 447before the Direct I/O write is issued. 448. 449.It Sy zfs_vdev_min_auto_ashift Ns = Ns Sy ASHIFT_MIN Po 9 Pc Pq uint 450Minimum ashift used when creating new top-level vdevs. 451. 452.It Sy zfs_vdev_min_ms_count Ns = Ns Sy 16 Pq uint 453Minimum number of metaslabs to create in a top-level vdev. 454. 455.It Sy vdev_validate_skip Ns = Ns Sy 0 Ns | Ns 1 Pq int 456Skip label validation steps during pool import. 457Changing is not recommended unless you know what you're doing 458and are recovering a damaged label. 459. 460.It Sy zfs_vdev_ms_count_limit Ns = Ns Sy 131072 Po 128k Pc Pq uint 461Practical upper limit of total metaslabs per top-level vdev. 462. 463.It Sy metaslab_preload_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 464Enable metaslab group preloading. 465. 466.It Sy metaslab_preload_limit Ns = Ns Sy 10 Pq uint 467Maximum number of metaslabs per group to preload 468. 469.It Sy metaslab_preload_pct Ns = Ns Sy 50 Pq uint 470Percentage of CPUs to run a metaslab preload taskq 471. 472.It Sy metaslab_lba_weighting_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 473Give more weight to metaslabs with lower LBAs, 474assuming they have greater bandwidth, 475as is typically the case on a modern constant angular velocity disk drive. 476. 477.It Sy metaslab_unload_delay Ns = Ns Sy 32 Pq uint 478After a metaslab is used, we keep it loaded for this many TXGs, to attempt to 479reduce unnecessary reloading. 480Note that both this many TXGs and 481.Sy metaslab_unload_delay_ms 482milliseconds must pass before unloading will occur. 483. 484.It Sy metaslab_unload_delay_ms Ns = Ns Sy 600000 Ns ms Po 10 min Pc Pq uint 485After a metaslab is used, we keep it loaded for this many milliseconds, 486to attempt to reduce unnecessary reloading. 487Note, that both this many milliseconds and 488.Sy metaslab_unload_delay 489TXGs must pass before unloading will occur. 490. 491.It Sy reference_history Ns = Ns Sy 3 Pq uint 492Maximum reference holders being tracked when reference_tracking_enable is 493active. 494.It Sy raidz_expand_max_copy_bytes Ns = Ns Sy 160MB Pq ulong 495Max amount of memory to use for RAID-Z expansion I/O. 496This limits how much I/O can be outstanding at once. 497. 498.It Sy raidz_expand_max_reflow_bytes Ns = Ns Sy 0 Pq ulong 499For testing, pause RAID-Z expansion when reflow amount reaches this value. 500. 501.It Sy raidz_io_aggregate_rows Ns = Ns Sy 4 Pq ulong 502For expanded RAID-Z, aggregate reads that have more rows than this. 503. 504.It Sy reference_history Ns = Ns Sy 3 Pq int 505Maximum reference holders being tracked when reference_tracking_enable is 506active. 507. 508.It Sy reference_tracking_enable Ns = Ns Sy 0 Ns | Ns 1 Pq int 509Track reference holders to 510.Sy refcount_t 511objects (debug builds only). 512. 513.It Sy send_holes_without_birth_time Ns = Ns Sy 1 Ns | Ns 0 Pq int 514When set, the 515.Sy hole_birth 516optimization will not be used, and all holes will always be sent during a 517.Nm zfs Cm send . 518This is useful if you suspect your datasets are affected by a bug in 519.Sy hole_birth . 520. 521.It Sy spa_config_path Ns = Ns Pa /etc/zfs/zpool.cache Pq charp 522SPA config file. 523. 524.It Sy spa_asize_inflation Ns = Ns Sy 24 Pq uint 525Multiplication factor used to estimate actual disk consumption from the 526size of data being written. 527The default value is a worst case estimate, 528but lower values may be valid for a given pool depending on its configuration. 529Pool administrators who understand the factors involved 530may wish to specify a more realistic inflation factor, 531particularly if they operate close to quota or capacity limits. 532. 533.It Sy spa_load_print_vdev_tree Ns = Ns Sy 0 Ns | Ns 1 Pq int 534Whether to print the vdev tree in the debugging message buffer during pool 535import. 536. 537.It Sy spa_load_verify_data Ns = Ns Sy 1 Ns | Ns 0 Pq int 538Whether to traverse data blocks during an "extreme rewind" 539.Pq Fl X 540import. 541.Pp 542An extreme rewind import normally performs a full traversal of all 543blocks in the pool for verification. 544If this parameter is unset, the traversal skips non-metadata blocks. 545It can be toggled once the 546import has started to stop or start the traversal of non-metadata blocks. 547. 548.It Sy spa_load_verify_metadata Ns = Ns Sy 1 Ns | Ns 0 Pq int 549Whether to traverse blocks during an "extreme rewind" 550.Pq Fl X 551pool import. 552.Pp 553An extreme rewind import normally performs a full traversal of all 554blocks in the pool for verification. 555If this parameter is unset, the traversal is not performed. 556It can be toggled once the import has started to stop or start the traversal. 557. 558.It Sy spa_load_verify_shift Ns = Ns Sy 4 Po 1/16th Pc Pq uint 559Sets the maximum number of bytes to consume during pool import to the log2 560fraction of the target ARC size. 561. 562.It Sy spa_slop_shift Ns = Ns Sy 5 Po 1/32nd Pc Pq int 563Normally, we don't allow the last 564.Sy 3.2% Pq Sy 1/2^spa_slop_shift 565of space in the pool to be consumed. 566This ensures that we don't run the pool completely out of space, 567due to unaccounted changes (e.g. to the MOS). 568It also limits the worst-case time to allocate space. 569If we have less than this amount of free space, 570most ZPL operations (e.g. write, create) will return 571.Sy ENOSPC . 572. 573.It Sy spa_num_allocators Ns = Ns Sy 4 Pq int 574Determines the number of block alloctators to use per spa instance. 575Capped by the number of actual CPUs in the system via 576.Sy spa_cpus_per_allocator . 577.Pp 578Note that setting this value too high could result in performance 579degredation and/or excess fragmentation. 580Set value only applies to pools imported/created after that. 581. 582.It Sy spa_cpus_per_allocator Ns = Ns Sy 4 Pq int 583Determines the minimum number of CPUs in a system for block alloctator 584per spa instance. 585Set value only applies to pools imported/created after that. 586. 587.It Sy spa_upgrade_errlog_limit Ns = Ns Sy 0 Pq uint 588Limits the number of on-disk error log entries that will be converted to the 589new format when enabling the 590.Sy head_errlog 591feature. 592The default is to convert all log entries. 593. 594.It Sy vdev_removal_max_span Ns = Ns Sy 32768 Ns B Po 32 KiB Pc Pq uint 595During top-level vdev removal, chunks of data are copied from the vdev 596which may include free space in order to trade bandwidth for IOPS. 597This parameter determines the maximum span of free space, in bytes, 598which will be included as "unnecessary" data in a chunk of copied data. 599.Pp 600The default value here was chosen to align with 601.Sy zfs_vdev_read_gap_limit , 602which is a similar concept when doing 603regular reads (but there's no reason it has to be the same). 604. 605.It Sy vdev_file_logical_ashift Ns = Ns Sy 9 Po 512 B Pc Pq u64 606Logical ashift for file-based devices. 607. 608.It Sy vdev_file_physical_ashift Ns = Ns Sy 9 Po 512 B Pc Pq u64 609Physical ashift for file-based devices. 610. 611.It Sy zap_iterate_prefetch Ns = Ns Sy 1 Ns | Ns 0 Pq int 612If set, when we start iterating over a ZAP object, 613prefetch the entire object (all leaf blocks). 614However, this is limited by 615.Sy dmu_prefetch_max . 616. 617.It Sy zap_micro_max_size Ns = Ns Sy 131072 Ns B Po 128 KiB Pc Pq int 618Maximum micro ZAP size. 619A "micro" ZAP is upgraded to a "fat" ZAP once it grows beyond the specified 620size. 621Sizes higher than 128KiB will be clamped to 128KiB unless the 622.Sy large_microzap 623feature is enabled. 624. 625.It Sy zap_shrink_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 626If set, adjacent empty ZAP blocks will be collapsed, reducing disk space. 627. 628.It Sy zfetch_min_distance Ns = Ns Sy 4194304 Ns B Po 4 MiB Pc Pq uint 629Min bytes to prefetch per stream. 630Prefetch distance starts from the demand access size and quickly grows to 631this value, doubling on each hit. 632After that it may grow further by 1/8 per hit, but only if some prefetch 633since last time haven't completed in time to satisfy demand request, i.e. 634prefetch depth didn't cover the read latency or the pool got saturated. 635. 636.It Sy zfetch_max_distance Ns = Ns Sy 67108864 Ns B Po 64 MiB Pc Pq uint 637Max bytes to prefetch per stream. 638. 639.It Sy zfetch_max_idistance Ns = Ns Sy 67108864 Ns B Po 64 MiB Pc Pq uint 640Max bytes to prefetch indirects for per stream. 641. 642.It Sy zfetch_max_reorder Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq uint 643Requests within this byte distance from the current prefetch stream position 644are considered parts of the stream, reordered due to parallel processing. 645Such requests do not advance the stream position immediately unless 646.Sy zfetch_hole_shift 647fill threshold is reached, but saved to fill holes in the stream later. 648. 649.It Sy zfetch_max_streams Ns = Ns Sy 8 Pq uint 650Max number of streams per zfetch (prefetch streams per file). 651. 652.It Sy zfetch_min_sec_reap Ns = Ns Sy 1 Pq uint 653Min time before inactive prefetch stream can be reclaimed 654. 655.It Sy zfetch_max_sec_reap Ns = Ns Sy 2 Pq uint 656Max time before inactive prefetch stream can be deleted 657. 658.It Sy zfs_abd_scatter_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 659Enables ARC from using scatter/gather lists and forces all allocations to be 660linear in kernel memory. 661Disabling can improve performance in some code paths 662at the expense of fragmented kernel memory. 663. 664.It Sy zfs_abd_scatter_max_order Ns = Ns Sy MAX_ORDER\-1 Pq uint 665Maximum number of consecutive memory pages allocated in a single block for 666scatter/gather lists. 667.Pp 668The value of 669.Sy MAX_ORDER 670depends on kernel configuration. 671. 672.It Sy zfs_abd_scatter_min_size Ns = Ns Sy 1536 Ns B Po 1.5 KiB Pc Pq uint 673This is the minimum allocation size that will use scatter (page-based) ABDs. 674Smaller allocations will use linear ABDs. 675. 676.It Sy zfs_arc_dnode_limit Ns = Ns Sy 0 Ns B Pq u64 677When the number of bytes consumed by dnodes in the ARC exceeds this number of 678bytes, try to unpin some of it in response to demand for non-metadata. 679This value acts as a ceiling to the amount of dnode metadata, and defaults to 680.Sy 0 , 681which indicates that a percent which is based on 682.Sy zfs_arc_dnode_limit_percent 683of the ARC meta buffers that may be used for dnodes. 684.It Sy zfs_arc_dnode_limit_percent Ns = Ns Sy 10 Ns % Pq u64 685Percentage that can be consumed by dnodes of ARC meta buffers. 686.Pp 687See also 688.Sy zfs_arc_dnode_limit , 689which serves a similar purpose but has a higher priority if nonzero. 690. 691.It Sy zfs_arc_dnode_reduce_percent Ns = Ns Sy 10 Ns % Pq u64 692Percentage of ARC dnodes to try to scan in response to demand for non-metadata 693when the number of bytes consumed by dnodes exceeds 694.Sy zfs_arc_dnode_limit . 695. 696.It Sy zfs_arc_average_blocksize Ns = Ns Sy 8192 Ns B Po 8 KiB Pc Pq uint 697The ARC's buffer hash table is sized based on the assumption of an average 698block size of this value. 699This works out to roughly 1 MiB of hash table per 1 GiB of physical memory 700with 8-byte pointers. 701For configurations with a known larger average block size, 702this value can be increased to reduce the memory footprint. 703. 704.It Sy zfs_arc_eviction_pct Ns = Ns Sy 200 Ns % Pq uint 705When 706.Fn arc_is_overflowing , 707.Fn arc_get_data_impl 708waits for this percent of the requested amount of data to be evicted. 709For example, by default, for every 710.Em 2 KiB 711that's evicted, 712.Em 1 KiB 713of it may be "reused" by a new allocation. 714Since this is above 715.Sy 100 Ns % , 716it ensures that progress is made towards getting 717.Sy arc_size No under Sy arc_c . 718Since this is finite, it ensures that allocations can still happen, 719even during the potentially long time that 720.Sy arc_size No is more than Sy arc_c . 721. 722.It Sy zfs_arc_evict_batch_limit Ns = Ns Sy 10 Pq uint 723Number ARC headers to evict per sub-list before proceeding to another sub-list. 724This batch-style operation prevents entire sub-lists from being evicted at once 725but comes at a cost of additional unlocking and locking. 726. 727.It Sy zfs_arc_grow_retry Ns = Ns Sy 0 Ns s Pq uint 728If set to a non zero value, it will replace the 729.Sy arc_grow_retry 730value with this value. 731The 732.Sy arc_grow_retry 733.No value Pq default Sy 5 Ns s 734is the number of seconds the ARC will wait before 735trying to resume growth after a memory pressure event. 736. 737.It Sy zfs_arc_lotsfree_percent Ns = Ns Sy 10 Ns % Pq int 738Throttle I/O when free system memory drops below this percentage of total 739system memory. 740Setting this value to 741.Sy 0 742will disable the throttle. 743. 744.It Sy zfs_arc_max Ns = Ns Sy 0 Ns B Pq u64 745Max size of ARC in bytes. 746If 747.Sy 0 , 748then the max size of ARC is determined by the amount of system memory installed. 749The larger of 750.Sy all_system_memory No \- Sy 1 GiB 751and 752.Sy 5/8 No \(mu Sy all_system_memory 753will be used as the limit. 754This value must be at least 755.Sy 67108864 Ns B Pq 64 MiB . 756.Pp 757This value can be changed dynamically, with some caveats. 758It cannot be set back to 759.Sy 0 760while running, and reducing it below the current ARC size will not cause 761the ARC to shrink without memory pressure to induce shrinking. 762. 763.It Sy zfs_arc_meta_balance Ns = Ns Sy 500 Pq uint 764Balance between metadata and data on ghost hits. 765Values above 100 increase metadata caching by proportionally reducing effect 766of ghost data hits on target data/metadata rate. 767. 768.It Sy zfs_arc_min Ns = Ns Sy 0 Ns B Pq u64 769Min size of ARC in bytes. 770.No If set to Sy 0 , arc_c_min 771will default to consuming the larger of 772.Sy 32 MiB 773and 774.Sy all_system_memory No / Sy 32 . 775. 776.It Sy zfs_arc_min_prefetch_ms Ns = Ns Sy 0 Ns ms Ns Po Ns ≡ Ns 1s Pc Pq uint 777Minimum time prefetched blocks are locked in the ARC. 778. 779.It Sy zfs_arc_min_prescient_prefetch_ms Ns = Ns Sy 0 Ns ms Ns Po Ns ≡ Ns 6s Pc Pq uint 780Minimum time "prescient prefetched" blocks are locked in the ARC. 781These blocks are meant to be prefetched fairly aggressively ahead of 782the code that may use them. 783. 784.It Sy zfs_arc_prune_task_threads Ns = Ns Sy 1 Pq int 785Number of arc_prune threads. 786.Fx 787does not need more than one. 788Linux may theoretically use one per mount point up to number of CPUs, 789but that was not proven to be useful. 790. 791.It Sy zfs_max_missing_tvds Ns = Ns Sy 0 Pq int 792Number of missing top-level vdevs which will be allowed during 793pool import (only in read-only mode). 794. 795.It Sy zfs_max_nvlist_src_size Ns = Sy 0 Pq u64 796Maximum size in bytes allowed to be passed as 797.Sy zc_nvlist_src_size 798for ioctls on 799.Pa /dev/zfs . 800This prevents a user from causing the kernel to allocate 801an excessive amount of memory. 802When the limit is exceeded, the ioctl fails with 803.Sy EINVAL 804and a description of the error is sent to the 805.Pa zfs-dbgmsg 806log. 807This parameter should not need to be touched under normal circumstances. 808If 809.Sy 0 , 810equivalent to a quarter of the user-wired memory limit under 811.Fx 812and to 813.Sy 134217728 Ns B Pq 128 MiB 814under Linux. 815. 816.It Sy zfs_multilist_num_sublists Ns = Ns Sy 0 Pq uint 817To allow more fine-grained locking, each ARC state contains a series 818of lists for both data and metadata objects. 819Locking is performed at the level of these "sub-lists". 820This parameters controls the number of sub-lists per ARC state, 821and also applies to other uses of the multilist data structure. 822.Pp 823If 824.Sy 0 , 825equivalent to the greater of the number of online CPUs and 826.Sy 4 . 827. 828.It Sy zfs_arc_overflow_shift Ns = Ns Sy 8 Pq int 829The ARC size is considered to be overflowing if it exceeds the current 830ARC target size 831.Pq Sy arc_c 832by thresholds determined by this parameter. 833Exceeding by 834.Sy ( arc_c No >> Sy zfs_arc_overflow_shift ) No / Sy 2 835starts ARC reclamation process. 836If that appears insufficient, exceeding by 837.Sy ( arc_c No >> Sy zfs_arc_overflow_shift ) No \(mu Sy 1.5 838blocks new buffer allocation until the reclaim thread catches up. 839Started reclamation process continues till ARC size returns below the 840target size. 841.Pp 842The default value of 843.Sy 8 844causes the ARC to start reclamation if it exceeds the target size by 845.Em 0.2% 846of the target size, and block allocations by 847.Em 0.6% . 848. 849.It Sy zfs_arc_shrink_shift Ns = Ns Sy 0 Pq uint 850If nonzero, this will update 851.Sy arc_shrink_shift Pq default Sy 7 852with the new value. 853. 854.It Sy zfs_arc_pc_percent Ns = Ns Sy 0 Ns % Po off Pc Pq uint 855Percent of pagecache to reclaim ARC to. 856.Pp 857This tunable allows the ZFS ARC to play more nicely 858with the kernel's LRU pagecache. 859It can guarantee that the ARC size won't collapse under scanning 860pressure on the pagecache, yet still allows the ARC to be reclaimed down to 861.Sy zfs_arc_min 862if necessary. 863This value is specified as percent of pagecache size (as measured by 864.Sy NR_FILE_PAGES ) , 865where that percent may exceed 866.Sy 100 . 867This 868only operates during memory pressure/reclaim. 869. 870.It Sy zfs_arc_shrinker_limit Ns = Ns Sy 10000 Pq int 871This is a limit on how many pages the ARC shrinker makes available for 872eviction in response to one page allocation attempt. 873Note that in practice, the kernel's shrinker can ask us to evict 874up to about four times this for one allocation attempt. 875To reduce OOM risk, this limit is applied for kswapd reclaims only. 876.Pp 877The default limit of 878.Sy 10000 Pq in practice, Em 160 MiB No per allocation attempt with 4 KiB pages 879limits the amount of time spent attempting to reclaim ARC memory to 880less than 100 ms per allocation attempt, 881even with a small average compressed block size of ~8 KiB. 882.Pp 883The parameter can be set to 0 (zero) to disable the limit, 884and only applies on Linux. 885. 886.It Sy zfs_arc_shrinker_seeks Ns = Ns Sy 2 Pq int 887Relative cost of ARC eviction on Linux, AKA number of seeks needed to 888restore evicted page. 889Bigger values make ARC more precious and evictions smaller, comparing to 890other kernel subsystems. 891Value of 4 means parity with page cache. 892. 893.It Sy zfs_arc_sys_free Ns = Ns Sy 0 Ns B Pq u64 894The target number of bytes the ARC should leave as free memory on the system. 895If zero, equivalent to the bigger of 896.Sy 512 KiB No and Sy all_system_memory/64 . 897. 898.It Sy zfs_autoimport_disable Ns = Ns Sy 1 Ns | Ns 0 Pq int 899Disable pool import at module load by ignoring the cache file 900.Pq Sy spa_config_path . 901. 902.It Sy zfs_checksum_events_per_second Ns = Ns Sy 20 Ns /s Pq uint 903Rate limit checksum events to this many per second. 904Note that this should not be set below the ZED thresholds 905(currently 10 checksums over 10 seconds) 906or else the daemon may not trigger any action. 907. 908.It Sy zfs_commit_timeout_pct Ns = Ns Sy 10 Ns % Pq uint 909This controls the amount of time that a ZIL block (lwb) will remain "open" 910when it isn't "full", and it has a thread waiting for it to be committed to 911stable storage. 912The timeout is scaled based on a percentage of the last lwb 913latency to avoid significantly impacting the latency of each individual 914transaction record (itx). 915. 916.It Sy zfs_condense_indirect_commit_entry_delay_ms Ns = Ns Sy 0 Ns ms Pq int 917Vdev indirection layer (used for device removal) sleeps for this many 918milliseconds during mapping generation. 919Intended for use with the test suite to throttle vdev removal speed. 920. 921.It Sy zfs_condense_indirect_obsolete_pct Ns = Ns Sy 25 Ns % Pq uint 922Minimum percent of obsolete bytes in vdev mapping required to attempt to 923condense 924.Pq see Sy zfs_condense_indirect_vdevs_enable . 925Intended for use with the test suite 926to facilitate triggering condensing as needed. 927. 928.It Sy zfs_condense_indirect_vdevs_enable Ns = Ns Sy 1 Ns | Ns 0 Pq int 929Enable condensing indirect vdev mappings. 930When set, attempt to condense indirect vdev mappings 931if the mapping uses more than 932.Sy zfs_condense_min_mapping_bytes 933bytes of memory and if the obsolete space map object uses more than 934.Sy zfs_condense_max_obsolete_bytes 935bytes on-disk. 936The condensing process is an attempt to save memory by removing obsolete 937mappings. 938. 939.It Sy zfs_condense_max_obsolete_bytes Ns = Ns Sy 1073741824 Ns B Po 1 GiB Pc Pq u64 940Only attempt to condense indirect vdev mappings if the on-disk size 941of the obsolete space map object is greater than this number of bytes 942.Pq see Sy zfs_condense_indirect_vdevs_enable . 943. 944.It Sy zfs_condense_min_mapping_bytes Ns = Ns Sy 131072 Ns B Po 128 KiB Pc Pq u64 945Minimum size vdev mapping to attempt to condense 946.Pq see Sy zfs_condense_indirect_vdevs_enable . 947. 948.It Sy zfs_dbgmsg_enable Ns = Ns Sy 1 Ns | Ns 0 Pq int 949Internally ZFS keeps a small log to facilitate debugging. 950The log is enabled by default, and can be disabled by unsetting this option. 951The contents of the log can be accessed by reading 952.Pa /proc/spl/kstat/zfs/dbgmsg . 953Writing 954.Sy 0 955to the file clears the log. 956.Pp 957This setting does not influence debug prints due to 958.Sy zfs_flags . 959. 960.It Sy zfs_dbgmsg_maxsize Ns = Ns Sy 4194304 Ns B Po 4 MiB Pc Pq uint 961Maximum size of the internal ZFS debug log. 962. 963.It Sy zfs_dbuf_state_index Ns = Ns Sy 0 Pq int 964Historically used for controlling what reporting was available under 965.Pa /proc/spl/kstat/zfs . 966No effect. 967. 968.It Sy zfs_deadman_checktime_ms Ns = Ns Sy 60000 Ns ms Po 1 min Pc Pq u64 969Check time in milliseconds. 970This defines the frequency at which we check for hung I/O requests 971and potentially invoke the 972.Sy zfs_deadman_failmode 973behavior. 974. 975.It Sy zfs_deadman_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 976When a pool sync operation takes longer than 977.Sy zfs_deadman_synctime_ms , 978or when an individual I/O operation takes longer than 979.Sy zfs_deadman_ziotime_ms , 980then the operation is considered to be "hung". 981If 982.Sy zfs_deadman_enabled 983is set, then the deadman behavior is invoked as described by 984.Sy zfs_deadman_failmode . 985By default, the deadman is enabled and set to 986.Sy wait 987which results in "hung" I/O operations only being logged. 988The deadman is automatically disabled when a pool gets suspended. 989. 990.It Sy zfs_deadman_events_per_second Ns = Ns Sy 1 Ns /s Pq int 991Rate limit deadman zevents (which report hung I/O operations) to this many per 992second. 993. 994.It Sy zfs_deadman_failmode Ns = Ns Sy wait Pq charp 995Controls the failure behavior when the deadman detects a "hung" I/O operation. 996Valid values are: 997.Bl -tag -compact -offset 4n -width "continue" 998.It Sy wait 999Wait for a "hung" operation to complete. 1000For each "hung" operation a "deadman" event will be posted 1001describing that operation. 1002.It Sy continue 1003Attempt to recover from a "hung" operation by re-dispatching it 1004to the I/O pipeline if possible. 1005.It Sy panic 1006Panic the system. 1007This can be used to facilitate automatic fail-over 1008to a properly configured fail-over partner. 1009.El 1010. 1011.It Sy zfs_deadman_synctime_ms Ns = Ns Sy 600000 Ns ms Po 10 min Pc Pq u64 1012Interval in milliseconds after which the deadman is triggered and also 1013the interval after which a pool sync operation is considered to be "hung". 1014Once this limit is exceeded the deadman will be invoked every 1015.Sy zfs_deadman_checktime_ms 1016milliseconds until the pool sync completes. 1017. 1018.It Sy zfs_deadman_ziotime_ms Ns = Ns Sy 300000 Ns ms Po 5 min Pc Pq u64 1019Interval in milliseconds after which the deadman is triggered and an 1020individual I/O operation is considered to be "hung". 1021As long as the operation remains "hung", 1022the deadman will be invoked every 1023.Sy zfs_deadman_checktime_ms 1024milliseconds until the operation completes. 1025. 1026.It Sy zfs_dedup_prefetch Ns = Ns Sy 0 Ns | Ns 1 Pq int 1027Enable prefetching dedup-ed blocks which are going to be freed. 1028. 1029.It Sy zfs_dedup_log_flush_passes_max Ns = Ns Sy 8 Ns Pq uint 1030Maximum number of dedup log flush passes (iterations) each transaction. 1031.Pp 1032At the start of each transaction, OpenZFS will estimate how many entries it 1033needs to flush out to keep up with the change rate, taking the amount and time 1034taken to flush on previous txgs into account (see 1035.Sy zfs_dedup_log_flush_flow_rate_txgs ) . 1036It will spread this amount into a number of passes. 1037At each pass, it will use the amount already flushed and the total time taken 1038by flushing and by other IO to recompute how much it should do for the remainder 1039of the txg. 1040.Pp 1041Reducing the max number of passes will make flushing more aggressive, flushing 1042out more entries on each pass. 1043This can be faster, but also more likely to compete with other IO. 1044Increasing the max number of passes will put fewer entries onto each pass, 1045keeping the overhead of dedup changes to a minimum but possibly causing a large 1046number of changes to be dumped on the last pass, which can blow out the txg 1047sync time beyond 1048.Sy zfs_txg_timeout . 1049. 1050.It Sy zfs_dedup_log_flush_min_time_ms Ns = Ns Sy 1000 Ns Pq uint 1051Minimum time to spend on dedup log flush each transaction. 1052.Pp 1053At least this long will be spent flushing dedup log entries each transaction, 1054up to 1055.Sy zfs_txg_timeout . 1056This occurs even if doing so would delay the transaction, that is, other IO 1057completes under this time. 1058. 1059.It Sy zfs_dedup_log_flush_entries_min Ns = Ns Sy 1000 Ns Pq uint 1060Flush at least this many entries each transaction. 1061.Pp 1062OpenZFS will estimate how many entries it needs to flush each transaction to 1063keep up with the ingest rate (see 1064.Sy zfs_dedup_log_flush_flow_rate_txgs ) . 1065This sets the minimum for that estimate. 1066Raising it can force OpenZFS to flush more aggressively, keeping the log small 1067and so reducing pool import times, but can make it less able to back off if 1068log flushing would compete with other IO too much. 1069. 1070.It Sy zfs_dedup_log_flush_flow_rate_txgs Ns = Ns Sy 10 Ns Pq uint 1071Number of transactions to use to compute the flow rate. 1072.Pp 1073OpenZFS will estimate how many entries it needs to flush each transaction by 1074monitoring the number of entries changed (ingest rate), number of entries 1075flushed (flush rate) and time spent flushing (flush time rate) and combining 1076these into an overall "flow rate". 1077It will use an exponential weighted moving average over some number of recent 1078transactions to compute these rates. 1079This sets the number of transactions to compute these averages over. 1080Setting it higher can help to smooth out the flow rate in the face of spiky 1081workloads, but will take longer for the flow rate to adjust to a sustained 1082change in the ingress rate. 1083. 1084.It Sy zfs_dedup_log_txg_max Ns = Ns Sy 8 Ns Pq uint 1085Max transactions to before starting to flush dedup logs. 1086.Pp 1087OpenZFS maintains two dedup logs, one receiving new changes, one flushing. 1088If there is nothing to flush, it will accumulate changes for no more than this 1089many transactions before switching the logs and starting to flush entries out. 1090. 1091.It Sy zfs_dedup_log_mem_max Ns = Ns Sy 0 Ns Pq u64 1092Max memory to use for dedup logs. 1093.Pp 1094OpenZFS will spend no more than this much memory on maintaining the in-memory 1095dedup log. 1096Flushing will begin when around half this amount is being spent on logs. 1097The default value of 1098.Sy 0 1099will cause it to be set by 1100.Sy zfs_dedup_log_mem_max_percent 1101instead. 1102. 1103.It Sy zfs_dedup_log_mem_max_percent Ns = Ns Sy 1 Ns % Pq uint 1104Max memory to use for dedup logs, as a percentage of total memory. 1105.Pp 1106If 1107.Sy zfs_dedup_log_mem_max 1108is not set, it will be initialised as a percentage of the total memory in the 1109system. 1110. 1111.It Sy zfs_delay_min_dirty_percent Ns = Ns Sy 60 Ns % Pq uint 1112Start to delay each transaction once there is this amount of dirty data, 1113expressed as a percentage of 1114.Sy zfs_dirty_data_max . 1115This value should be at least 1116.Sy zfs_vdev_async_write_active_max_dirty_percent . 1117.No See Sx ZFS TRANSACTION DELAY . 1118. 1119.It Sy zfs_delay_scale Ns = Ns Sy 500000 Pq int 1120This controls how quickly the transaction delay approaches infinity. 1121Larger values cause longer delays for a given amount of dirty data. 1122.Pp 1123For the smoothest delay, this value should be about 1 billion divided 1124by the maximum number of operations per second. 1125This will smoothly handle between ten times and a tenth of this number. 1126.No See Sx ZFS TRANSACTION DELAY . 1127.Pp 1128.Sy zfs_delay_scale No \(mu Sy zfs_dirty_data_max Em must No be smaller than Sy 2^64 . 1129. 1130.It Sy zfs_dio_write_verify_events_per_second Ns = Ns Sy 20 Ns /s Pq uint 1131Rate limit Direct I/O write verify events to this many per second. 1132. 1133.It Sy zfs_disable_ivset_guid_check Ns = Ns Sy 0 Ns | Ns 1 Pq int 1134Disables requirement for IVset GUIDs to be present and match when doing a raw 1135receive of encrypted datasets. 1136Intended for users whose pools were created with 1137OpenZFS pre-release versions and now have compatibility issues. 1138. 1139.It Sy zfs_key_max_salt_uses Ns = Ns Sy 400000000 Po 4*10^8 Pc Pq ulong 1140Maximum number of uses of a single salt value before generating a new one for 1141encrypted datasets. 1142The default value is also the maximum. 1143. 1144.It Sy zfs_object_mutex_size Ns = Ns Sy 64 Pq uint 1145Size of the znode hashtable used for holds. 1146.Pp 1147Due to the need to hold locks on objects that may not exist yet, kernel mutexes 1148are not created per-object and instead a hashtable is used where collisions 1149will result in objects waiting when there is not actually contention on the 1150same object. 1151. 1152.It Sy zfs_slow_io_events_per_second Ns = Ns Sy 20 Ns /s Pq int 1153Rate limit delay zevents (which report slow I/O operations) to this many per 1154second. 1155. 1156.It Sy zfs_unflushed_max_mem_amt Ns = Ns Sy 1073741824 Ns B Po 1 GiB Pc Pq u64 1157Upper-bound limit for unflushed metadata changes to be held by the 1158log spacemap in memory, in bytes. 1159. 1160.It Sy zfs_unflushed_max_mem_ppm Ns = Ns Sy 1000 Ns ppm Po 0.1% Pc Pq u64 1161Part of overall system memory that ZFS allows to be used 1162for unflushed metadata changes by the log spacemap, in millionths. 1163. 1164.It Sy zfs_unflushed_log_block_max Ns = Ns Sy 131072 Po 128k Pc Pq u64 1165Describes the maximum number of log spacemap blocks allowed for each pool. 1166The default value means that the space in all the log spacemaps 1167can add up to no more than 1168.Sy 131072 1169blocks (which means 1170.Em 16 GiB 1171of logical space before compression and ditto blocks, 1172assuming that blocksize is 1173.Em 128 KiB ) . 1174.Pp 1175This tunable is important because it involves a trade-off between import 1176time after an unclean export and the frequency of flushing metaslabs. 1177The higher this number is, the more log blocks we allow when the pool is 1178active which means that we flush metaslabs less often and thus decrease 1179the number of I/O operations for spacemap updates per TXG. 1180At the same time though, that means that in the event of an unclean export, 1181there will be more log spacemap blocks for us to read, inducing overhead 1182in the import time of the pool. 1183The lower the number, the amount of flushing increases, destroying log 1184blocks quicker as they become obsolete faster, which leaves less blocks 1185to be read during import time after a crash. 1186.Pp 1187Each log spacemap block existing during pool import leads to approximately 1188one extra logical I/O issued. 1189This is the reason why this tunable is exposed in terms of blocks rather 1190than space used. 1191. 1192.It Sy zfs_unflushed_log_block_min Ns = Ns Sy 1000 Pq u64 1193If the number of metaslabs is small and our incoming rate is high, 1194we could get into a situation that we are flushing all our metaslabs every TXG. 1195Thus we always allow at least this many log blocks. 1196. 1197.It Sy zfs_unflushed_log_block_pct Ns = Ns Sy 400 Ns % Pq u64 1198Tunable used to determine the number of blocks that can be used for 1199the spacemap log, expressed as a percentage of the total number of 1200unflushed metaslabs in the pool. 1201. 1202.It Sy zfs_unflushed_log_txg_max Ns = Ns Sy 1000 Pq u64 1203Tunable limiting maximum time in TXGs any metaslab may remain unflushed. 1204It effectively limits maximum number of unflushed per-TXG spacemap logs 1205that need to be read after unclean pool export. 1206. 1207.It Sy zfs_unlink_suspend_progress Ns = Ns Sy 0 Ns | Ns 1 Pq uint 1208When enabled, files will not be asynchronously removed from the list of pending 1209unlinks and the space they consume will be leaked. 1210Once this option has been disabled and the dataset is remounted, 1211the pending unlinks will be processed and the freed space returned to the pool. 1212This option is used by the test suite. 1213. 1214.It Sy zfs_delete_blocks Ns = Ns Sy 20480 Pq ulong 1215This is the used to define a large file for the purposes of deletion. 1216Files containing more than 1217.Sy zfs_delete_blocks 1218will be deleted asynchronously, while smaller files are deleted synchronously. 1219Decreasing this value will reduce the time spent in an 1220.Xr unlink 2 1221system call, at the expense of a longer delay before the freed space is 1222available. 1223This only applies on Linux. 1224. 1225.It Sy zfs_dirty_data_max Ns = Pq int 1226Determines the dirty space limit in bytes. 1227Once this limit is exceeded, new writes are halted until space frees up. 1228This parameter takes precedence over 1229.Sy zfs_dirty_data_max_percent . 1230.No See Sx ZFS TRANSACTION DELAY . 1231.Pp 1232Defaults to 1233.Sy physical_ram/10 , 1234capped at 1235.Sy zfs_dirty_data_max_max . 1236. 1237.It Sy zfs_dirty_data_max_max Ns = Pq int 1238Maximum allowable value of 1239.Sy zfs_dirty_data_max , 1240expressed in bytes. 1241This limit is only enforced at module load time, and will be ignored if 1242.Sy zfs_dirty_data_max 1243is later changed. 1244This parameter takes precedence over 1245.Sy zfs_dirty_data_max_max_percent . 1246.No See Sx ZFS TRANSACTION DELAY . 1247.Pp 1248Defaults to 1249.Sy min(physical_ram/4, 4GiB) , 1250or 1251.Sy min(physical_ram/4, 1GiB) 1252for 32-bit systems. 1253. 1254.It Sy zfs_dirty_data_max_max_percent Ns = Ns Sy 25 Ns % Pq uint 1255Maximum allowable value of 1256.Sy zfs_dirty_data_max , 1257expressed as a percentage of physical RAM. 1258This limit is only enforced at module load time, and will be ignored if 1259.Sy zfs_dirty_data_max 1260is later changed. 1261The parameter 1262.Sy zfs_dirty_data_max_max 1263takes precedence over this one. 1264.No See Sx ZFS TRANSACTION DELAY . 1265. 1266.It Sy zfs_dirty_data_max_percent Ns = Ns Sy 10 Ns % Pq uint 1267Determines the dirty space limit, expressed as a percentage of all memory. 1268Once this limit is exceeded, new writes are halted until space frees up. 1269The parameter 1270.Sy zfs_dirty_data_max 1271takes precedence over this one. 1272.No See Sx ZFS TRANSACTION DELAY . 1273.Pp 1274Subject to 1275.Sy zfs_dirty_data_max_max . 1276. 1277.It Sy zfs_dirty_data_sync_percent Ns = Ns Sy 20 Ns % Pq uint 1278Start syncing out a transaction group if there's at least this much dirty data 1279.Pq as a percentage of Sy zfs_dirty_data_max . 1280This should be less than 1281.Sy zfs_vdev_async_write_active_min_dirty_percent . 1282. 1283.It Sy zfs_wrlog_data_max Ns = Pq int 1284The upper limit of write-transaction zil log data size in bytes. 1285Write operations are throttled when approaching the limit until log data is 1286cleared out after transaction group sync. 1287Because of some overhead, it should be set at least 2 times the size of 1288.Sy zfs_dirty_data_max 1289.No to prevent harming normal write throughput . 1290It also should be smaller than the size of the slog device if slog is present. 1291.Pp 1292Defaults to 1293.Sy zfs_dirty_data_max*2 1294. 1295.It Sy zfs_fallocate_reserve_percent Ns = Ns Sy 110 Ns % Pq uint 1296Since ZFS is a copy-on-write filesystem with snapshots, blocks cannot be 1297preallocated for a file in order to guarantee that later writes will not 1298run out of space. 1299Instead, 1300.Xr fallocate 2 1301space preallocation only checks that sufficient space is currently available 1302in the pool or the user's project quota allocation, 1303and then creates a sparse file of the requested size. 1304The requested space is multiplied by 1305.Sy zfs_fallocate_reserve_percent 1306to allow additional space for indirect blocks and other internal metadata. 1307Setting this to 1308.Sy 0 1309disables support for 1310.Xr fallocate 2 1311and causes it to return 1312.Sy EOPNOTSUPP . 1313. 1314.It Sy zfs_fletcher_4_impl Ns = Ns Sy fastest Pq string 1315Select a fletcher 4 implementation. 1316.Pp 1317Supported selectors are: 1318.Sy fastest , scalar , sse2 , ssse3 , avx2 , avx512f , avx512bw , 1319.No and Sy aarch64_neon . 1320All except 1321.Sy fastest No and Sy scalar 1322require instruction set extensions to be available, 1323and will only appear if ZFS detects that they are present at runtime. 1324If multiple implementations of fletcher 4 are available, the 1325.Sy fastest 1326will be chosen using a micro benchmark. 1327Selecting 1328.Sy scalar 1329results in the original CPU-based calculation being used. 1330Selecting any option other than 1331.Sy fastest No or Sy scalar 1332results in vector instructions 1333from the respective CPU instruction set being used. 1334. 1335.It Sy zfs_bclone_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 1336Enables access to the block cloning feature. 1337If this setting is 0, then even if feature@block_cloning is enabled, 1338using functions and system calls that attempt to clone blocks will act as 1339though the feature is disabled. 1340. 1341.It Sy zfs_bclone_wait_dirty Ns = Ns Sy 0 Ns | Ns 1 Pq int 1342When set to 1 the FICLONE and FICLONERANGE ioctls wait for dirty data to be 1343written to disk. 1344This allows the clone operation to reliably succeed when a file is 1345modified and then immediately cloned. 1346For small files this may be slower than making a copy of the file. 1347Therefore, this setting defaults to 0 which causes a clone operation to 1348immediately fail when encountering a dirty block. 1349. 1350.It Sy zfs_blake3_impl Ns = Ns Sy fastest Pq string 1351Select a BLAKE3 implementation. 1352.Pp 1353Supported selectors are: 1354.Sy cycle , fastest , generic , sse2 , sse41 , avx2 , avx512 . 1355All except 1356.Sy cycle , fastest No and Sy generic 1357require instruction set extensions to be available, 1358and will only appear if ZFS detects that they are present at runtime. 1359If multiple implementations of BLAKE3 are available, the 1360.Sy fastest will be chosen using a micro benchmark. You can see the 1361benchmark results by reading this kstat file: 1362.Pa /proc/spl/kstat/zfs/chksum_bench . 1363. 1364.It Sy zfs_free_bpobj_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 1365Enable/disable the processing of the free_bpobj object. 1366. 1367.It Sy zfs_async_block_max_blocks Ns = Ns Sy UINT64_MAX Po unlimited Pc Pq u64 1368Maximum number of blocks freed in a single TXG. 1369. 1370.It Sy zfs_max_async_dedup_frees Ns = Ns Sy 100000 Po 10^5 Pc Pq u64 1371Maximum number of dedup blocks freed in a single TXG. 1372. 1373.It Sy zfs_vdev_async_read_max_active Ns = Ns Sy 3 Pq uint 1374Maximum asynchronous read I/O operations active to each device. 1375.No See Sx ZFS I/O SCHEDULER . 1376. 1377.It Sy zfs_vdev_async_read_min_active Ns = Ns Sy 1 Pq uint 1378Minimum asynchronous read I/O operation active to each device. 1379.No See Sx ZFS I/O SCHEDULER . 1380. 1381.It Sy zfs_vdev_async_write_active_max_dirty_percent Ns = Ns Sy 60 Ns % Pq uint 1382When the pool has more than this much dirty data, use 1383.Sy zfs_vdev_async_write_max_active 1384to limit active async writes. 1385If the dirty data is between the minimum and maximum, 1386the active I/O limit is linearly interpolated. 1387.No See Sx ZFS I/O SCHEDULER . 1388. 1389.It Sy zfs_vdev_async_write_active_min_dirty_percent Ns = Ns Sy 30 Ns % Pq uint 1390When the pool has less than this much dirty data, use 1391.Sy zfs_vdev_async_write_min_active 1392to limit active async writes. 1393If the dirty data is between the minimum and maximum, 1394the active I/O limit is linearly 1395interpolated. 1396.No See Sx ZFS I/O SCHEDULER . 1397. 1398.It Sy zfs_vdev_async_write_max_active Ns = Ns Sy 10 Pq uint 1399Maximum asynchronous write I/O operations active to each device. 1400.No See Sx ZFS I/O SCHEDULER . 1401. 1402.It Sy zfs_vdev_async_write_min_active Ns = Ns Sy 2 Pq uint 1403Minimum asynchronous write I/O operations active to each device. 1404.No See Sx ZFS I/O SCHEDULER . 1405.Pp 1406Lower values are associated with better latency on rotational media but poorer 1407resilver performance. 1408The default value of 1409.Sy 2 1410was chosen as a compromise. 1411A value of 1412.Sy 3 1413has been shown to improve resilver performance further at a cost of 1414further increasing latency. 1415. 1416.It Sy zfs_vdev_initializing_max_active Ns = Ns Sy 1 Pq uint 1417Maximum initializing I/O operations active to each device. 1418.No See Sx ZFS I/O SCHEDULER . 1419. 1420.It Sy zfs_vdev_initializing_min_active Ns = Ns Sy 1 Pq uint 1421Minimum initializing I/O operations active to each device. 1422.No See Sx ZFS I/O SCHEDULER . 1423. 1424.It Sy zfs_vdev_max_active Ns = Ns Sy 1000 Pq uint 1425The maximum number of I/O operations active to each device. 1426Ideally, this will be at least the sum of each queue's 1427.Sy max_active . 1428.No See Sx ZFS I/O SCHEDULER . 1429. 1430.It Sy zfs_vdev_open_timeout_ms Ns = Ns Sy 1000 Pq uint 1431Timeout value to wait before determining a device is missing 1432during import. 1433This is helpful for transient missing paths due 1434to links being briefly removed and recreated in response to 1435udev events. 1436. 1437.It Sy zfs_vdev_rebuild_max_active Ns = Ns Sy 3 Pq uint 1438Maximum sequential resilver I/O operations active to each device. 1439.No See Sx ZFS I/O SCHEDULER . 1440. 1441.It Sy zfs_vdev_rebuild_min_active Ns = Ns Sy 1 Pq uint 1442Minimum sequential resilver I/O operations active to each device. 1443.No See Sx ZFS I/O SCHEDULER . 1444. 1445.It Sy zfs_vdev_removal_max_active Ns = Ns Sy 2 Pq uint 1446Maximum removal I/O operations active to each device. 1447.No See Sx ZFS I/O SCHEDULER . 1448. 1449.It Sy zfs_vdev_removal_min_active Ns = Ns Sy 1 Pq uint 1450Minimum removal I/O operations active to each device. 1451.No See Sx ZFS I/O SCHEDULER . 1452. 1453.It Sy zfs_vdev_scrub_max_active Ns = Ns Sy 2 Pq uint 1454Maximum scrub I/O operations active to each device. 1455.No See Sx ZFS I/O SCHEDULER . 1456. 1457.It Sy zfs_vdev_scrub_min_active Ns = Ns Sy 1 Pq uint 1458Minimum scrub I/O operations active to each device. 1459.No See Sx ZFS I/O SCHEDULER . 1460. 1461.It Sy zfs_vdev_sync_read_max_active Ns = Ns Sy 10 Pq uint 1462Maximum synchronous read I/O operations active to each device. 1463.No See Sx ZFS I/O SCHEDULER . 1464. 1465.It Sy zfs_vdev_sync_read_min_active Ns = Ns Sy 10 Pq uint 1466Minimum synchronous read I/O operations active to each device. 1467.No See Sx ZFS I/O SCHEDULER . 1468. 1469.It Sy zfs_vdev_sync_write_max_active Ns = Ns Sy 10 Pq uint 1470Maximum synchronous write I/O operations active to each device. 1471.No See Sx ZFS I/O SCHEDULER . 1472. 1473.It Sy zfs_vdev_sync_write_min_active Ns = Ns Sy 10 Pq uint 1474Minimum synchronous write I/O operations active to each device. 1475.No See Sx ZFS I/O SCHEDULER . 1476. 1477.It Sy zfs_vdev_trim_max_active Ns = Ns Sy 2 Pq uint 1478Maximum trim/discard I/O operations active to each device. 1479.No See Sx ZFS I/O SCHEDULER . 1480. 1481.It Sy zfs_vdev_trim_min_active Ns = Ns Sy 1 Pq uint 1482Minimum trim/discard I/O operations active to each device. 1483.No See Sx ZFS I/O SCHEDULER . 1484. 1485.It Sy zfs_vdev_nia_delay Ns = Ns Sy 5 Pq uint 1486For non-interactive I/O (scrub, resilver, removal, initialize and rebuild), 1487the number of concurrently-active I/O operations is limited to 1488.Sy zfs_*_min_active , 1489unless the vdev is "idle". 1490When there are no interactive I/O operations active (synchronous or otherwise), 1491and 1492.Sy zfs_vdev_nia_delay 1493operations have completed since the last interactive operation, 1494then the vdev is considered to be "idle", 1495and the number of concurrently-active non-interactive operations is increased to 1496.Sy zfs_*_max_active . 1497.No See Sx ZFS I/O SCHEDULER . 1498. 1499.It Sy zfs_vdev_nia_credit Ns = Ns Sy 5 Pq uint 1500Some HDDs tend to prioritize sequential I/O so strongly, that concurrent 1501random I/O latency reaches several seconds. 1502On some HDDs this happens even if sequential I/O operations 1503are submitted one at a time, and so setting 1504.Sy zfs_*_max_active Ns = Sy 1 1505does not help. 1506To prevent non-interactive I/O, like scrub, 1507from monopolizing the device, no more than 1508.Sy zfs_vdev_nia_credit operations can be sent 1509while there are outstanding incomplete interactive operations. 1510This enforced wait ensures the HDD services the interactive I/O 1511within a reasonable amount of time. 1512.No See Sx ZFS I/O SCHEDULER . 1513. 1514.It Sy zfs_vdev_queue_depth_pct Ns = Ns Sy 1000 Ns % Pq uint 1515Maximum number of queued allocations per top-level vdev expressed as 1516a percentage of 1517.Sy zfs_vdev_async_write_max_active , 1518which allows the system to detect devices that are more capable 1519of handling allocations and to allocate more blocks to those devices. 1520This allows for dynamic allocation distribution when devices are imbalanced, 1521as fuller devices will tend to be slower than empty devices. 1522.Pp 1523Also see 1524.Sy zio_dva_throttle_enabled . 1525. 1526.It Sy zfs_vdev_def_queue_depth Ns = Ns Sy 32 Pq uint 1527Default queue depth for each vdev IO allocator. 1528Higher values allow for better coalescing of sequential writes before sending 1529them to the disk, but can increase transaction commit times. 1530. 1531.It Sy zfs_vdev_failfast_mask Ns = Ns Sy 1 Pq uint 1532Defines if the driver should retire on a given error type. 1533The following options may be bitwise-ored together: 1534.TS 1535box; 1536lbz r l l . 1537 Value Name Description 1538_ 1539 1 Device No driver retries on device errors 1540 2 Transport No driver retries on transport errors. 1541 4 Driver No driver retries on driver errors. 1542.TE 1543. 1544.It Sy zfs_vdev_disk_max_segs Ns = Ns Sy 0 Pq uint 1545Maximum number of segments to add to a BIO (min 4). 1546If this is higher than the maximum allowed by the device queue or the kernel 1547itself, it will be clamped. 1548Setting it to zero will cause the kernel's ideal size to be used. 1549This parameter only applies on Linux. 1550This parameter is ignored if 1551.Sy zfs_vdev_disk_classic Ns = Ns Sy 1 . 1552. 1553.It Sy zfs_vdev_disk_classic Ns = Ns Sy 0 Ns | Ns 1 Pq uint 1554If set to 1, OpenZFS will submit IO to Linux using the method it used in 2.2 1555and earlier. 1556This "classic" method has known issues with highly fragmented IO requests and 1557is slower on many workloads, but it has been in use for many years and is known 1558to be very stable. 1559If you set this parameter, please also open a bug report why you did so, 1560including the workload involved and any error messages. 1561.Pp 1562This parameter and the classic submission method will be removed once we have 1563total confidence in the new method. 1564.Pp 1565This parameter only applies on Linux, and can only be set at module load time. 1566. 1567.It Sy zfs_expire_snapshot Ns = Ns Sy 300 Ns s Pq int 1568Time before expiring 1569.Pa .zfs/snapshot . 1570. 1571.It Sy zfs_admin_snapshot Ns = Ns Sy 0 Ns | Ns 1 Pq int 1572Allow the creation, removal, or renaming of entries in the 1573.Sy .zfs/snapshot 1574directory to cause the creation, destruction, or renaming of snapshots. 1575When enabled, this functionality works both locally and over NFS exports 1576which have the 1577.Em no_root_squash 1578option set. 1579. 1580.It Sy zfs_snapshot_no_setuid Ns = Ns Sy 0 Ns | Ns 1 Pq int 1581Whether to disable 1582.Em setuid/setgid 1583support for snapshot mounts triggered by access to the 1584.Sy .zfs/snapshot 1585directory by setting the 1586.Em nosuid 1587mount option. 1588. 1589.It Sy zfs_flags Ns = Ns Sy 0 Pq int 1590Set additional debugging flags. 1591The following flags may be bitwise-ored together: 1592.TS 1593box; 1594lbz r l l . 1595 Value Name Description 1596_ 1597 1 ZFS_DEBUG_DPRINTF Enable dprintf entries in the debug log. 1598* 2 ZFS_DEBUG_DBUF_VERIFY Enable extra dbuf verifications. 1599* 4 ZFS_DEBUG_DNODE_VERIFY Enable extra dnode verifications. 1600 8 ZFS_DEBUG_SNAPNAMES Enable snapshot name verification. 1601* 16 ZFS_DEBUG_MODIFY Check for illegally modified ARC buffers. 1602 64 ZFS_DEBUG_ZIO_FREE Enable verification of block frees. 1603 128 ZFS_DEBUG_HISTOGRAM_VERIFY Enable extra spacemap histogram verifications. 1604 256 ZFS_DEBUG_METASLAB_VERIFY Verify space accounting on disk matches in-memory \fBrange_trees\fP. 1605 512 ZFS_DEBUG_SET_ERROR Enable \fBSET_ERROR\fP and dprintf entries in the debug log. 1606 1024 ZFS_DEBUG_INDIRECT_REMAP Verify split blocks created by device removal. 1607 2048 ZFS_DEBUG_TRIM Verify TRIM ranges are always within the allocatable range tree. 1608 4096 ZFS_DEBUG_LOG_SPACEMAP Verify that the log summary is consistent with the spacemap log 1609 and enable \fBzfs_dbgmsgs\fP for metaslab loading and flushing. 1610.TE 1611.Sy \& * No Requires debug build . 1612. 1613.It Sy zfs_btree_verify_intensity Ns = Ns Sy 0 Pq uint 1614Enables btree verification. 1615The following settings are culminative: 1616.TS 1617box; 1618lbz r l l . 1619 Value Description 1620 1621 1 Verify height. 1622 2 Verify pointers from children to parent. 1623 3 Verify element counts. 1624 4 Verify element order. (expensive) 1625* 5 Verify unused memory is poisoned. (expensive) 1626.TE 1627.Sy \& * No Requires debug build . 1628. 1629.It Sy zfs_free_leak_on_eio Ns = Ns Sy 0 Ns | Ns 1 Pq int 1630If destroy encounters an 1631.Sy EIO 1632while reading metadata (e.g. indirect blocks), 1633space referenced by the missing metadata can not be freed. 1634Normally this causes the background destroy to become "stalled", 1635as it is unable to make forward progress. 1636While in this stalled state, all remaining space to free 1637from the error-encountering filesystem is "temporarily leaked". 1638Set this flag to cause it to ignore the 1639.Sy EIO , 1640permanently leak the space from indirect blocks that can not be read, 1641and continue to free everything else that it can. 1642.Pp 1643The default "stalling" behavior is useful if the storage partially 1644fails (i.e. some but not all I/O operations fail), and then later recovers. 1645In this case, we will be able to continue pool operations while it is 1646partially failed, and when it recovers, we can continue to free the 1647space, with no leaks. 1648Note, however, that this case is actually fairly rare. 1649.Pp 1650Typically pools either 1651.Bl -enum -compact -offset 4n -width "1." 1652.It 1653fail completely (but perhaps temporarily, 1654e.g. due to a top-level vdev going offline), or 1655.It 1656have localized, permanent errors (e.g. disk returns the wrong data 1657due to bit flip or firmware bug). 1658.El 1659In the former case, this setting does not matter because the 1660pool will be suspended and the sync thread will not be able to make 1661forward progress regardless. 1662In the latter, because the error is permanent, the best we can do 1663is leak the minimum amount of space, 1664which is what setting this flag will do. 1665It is therefore reasonable for this flag to normally be set, 1666but we chose the more conservative approach of not setting it, 1667so that there is no possibility of 1668leaking space in the "partial temporary" failure case. 1669. 1670.It Sy zfs_free_min_time_ms Ns = Ns Sy 1000 Ns ms Po 1s Pc Pq uint 1671During a 1672.Nm zfs Cm destroy 1673operation using the 1674.Sy async_destroy 1675feature, 1676a minimum of this much time will be spent working on freeing blocks per TXG. 1677. 1678.It Sy zfs_obsolete_min_time_ms Ns = Ns Sy 500 Ns ms Pq uint 1679Similar to 1680.Sy zfs_free_min_time_ms , 1681but for cleanup of old indirection records for removed vdevs. 1682. 1683.It Sy zfs_immediate_write_sz Ns = Ns Sy 32768 Ns B Po 32 KiB Pc Pq s64 1684Largest data block to write to the ZIL. 1685Larger blocks will be treated as if the dataset being written to had the 1686.Sy logbias Ns = Ns Sy throughput 1687property set. 1688. 1689.It Sy zfs_initialize_value Ns = Ns Sy 16045690984833335022 Po 0xDEADBEEFDEADBEEE Pc Pq u64 1690Pattern written to vdev free space by 1691.Xr zpool-initialize 8 . 1692. 1693.It Sy zfs_initialize_chunk_size Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq u64 1694Size of writes used by 1695.Xr zpool-initialize 8 . 1696This option is used by the test suite. 1697. 1698.It Sy zfs_livelist_max_entries Ns = Ns Sy 500000 Po 5*10^5 Pc Pq u64 1699The threshold size (in block pointers) at which we create a new sub-livelist. 1700Larger sublists are more costly from a memory perspective but the fewer 1701sublists there are, the lower the cost of insertion. 1702. 1703.It Sy zfs_livelist_min_percent_shared Ns = Ns Sy 75 Ns % Pq int 1704If the amount of shared space between a snapshot and its clone drops below 1705this threshold, the clone turns off the livelist and reverts to the old 1706deletion method. 1707This is in place because livelists no long give us a benefit 1708once a clone has been overwritten enough. 1709. 1710.It Sy zfs_livelist_condense_new_alloc Ns = Ns Sy 0 Pq int 1711Incremented each time an extra ALLOC blkptr is added to a livelist entry while 1712it is being condensed. 1713This option is used by the test suite to track race conditions. 1714. 1715.It Sy zfs_livelist_condense_sync_cancel Ns = Ns Sy 0 Pq int 1716Incremented each time livelist condensing is canceled while in 1717.Fn spa_livelist_condense_sync . 1718This option is used by the test suite to track race conditions. 1719. 1720.It Sy zfs_livelist_condense_sync_pause Ns = Ns Sy 0 Ns | Ns 1 Pq int 1721When set, the livelist condense process pauses indefinitely before 1722executing the synctask \(em 1723.Fn spa_livelist_condense_sync . 1724This option is used by the test suite to trigger race conditions. 1725. 1726.It Sy zfs_livelist_condense_zthr_cancel Ns = Ns Sy 0 Pq int 1727Incremented each time livelist condensing is canceled while in 1728.Fn spa_livelist_condense_cb . 1729This option is used by the test suite to track race conditions. 1730. 1731.It Sy zfs_livelist_condense_zthr_pause Ns = Ns Sy 0 Ns | Ns 1 Pq int 1732When set, the livelist condense process pauses indefinitely before 1733executing the open context condensing work in 1734.Fn spa_livelist_condense_cb . 1735This option is used by the test suite to trigger race conditions. 1736. 1737.It Sy zfs_lua_max_instrlimit Ns = Ns Sy 100000000 Po 10^8 Pc Pq u64 1738The maximum execution time limit that can be set for a ZFS channel program, 1739specified as a number of Lua instructions. 1740. 1741.It Sy zfs_lua_max_memlimit Ns = Ns Sy 104857600 Po 100 MiB Pc Pq u64 1742The maximum memory limit that can be set for a ZFS channel program, specified 1743in bytes. 1744. 1745.It Sy zfs_max_dataset_nesting Ns = Ns Sy 50 Pq int 1746The maximum depth of nested datasets. 1747This value can be tuned temporarily to 1748fix existing datasets that exceed the predefined limit. 1749. 1750.It Sy zfs_max_log_walking Ns = Ns Sy 5 Pq u64 1751The number of past TXGs that the flushing algorithm of the log spacemap 1752feature uses to estimate incoming log blocks. 1753. 1754.It Sy zfs_max_logsm_summary_length Ns = Ns Sy 10 Pq u64 1755Maximum number of rows allowed in the summary of the spacemap log. 1756. 1757.It Sy zfs_max_recordsize Ns = Ns Sy 16777216 Po 16 MiB Pc Pq uint 1758We currently support block sizes from 1759.Em 512 Po 512 B Pc No to Em 16777216 Po 16 MiB Pc . 1760The benefits of larger blocks, and thus larger I/O, 1761need to be weighed against the cost of COWing a giant block to modify one byte. 1762Additionally, very large blocks can have an impact on I/O latency, 1763and also potentially on the memory allocator. 1764Therefore, we formerly forbade creating blocks larger than 1M. 1765Larger blocks could be created by changing it, 1766and pools with larger blocks can always be imported and used, 1767regardless of this setting. 1768.Pp 1769Note that it is still limited by default to 1770.Ar 1 MiB 1771on x86_32, because Linux's 17723/1 memory split doesn't leave much room for 16M chunks. 1773. 1774.It Sy zfs_allow_redacted_dataset_mount Ns = Ns Sy 0 Ns | Ns 1 Pq int 1775Allow datasets received with redacted send/receive to be mounted. 1776Normally disabled because these datasets may be missing key data. 1777. 1778.It Sy zfs_min_metaslabs_to_flush Ns = Ns Sy 1 Pq u64 1779Minimum number of metaslabs to flush per dirty TXG. 1780. 1781.It Sy zfs_metaslab_fragmentation_threshold Ns = Ns Sy 70 Ns % Pq uint 1782Allow metaslabs to keep their active state as long as their fragmentation 1783percentage is no more than this value. 1784An active metaslab that exceeds this threshold 1785will no longer keep its active status allowing better metaslabs to be selected. 1786. 1787.It Sy zfs_mg_fragmentation_threshold Ns = Ns Sy 95 Ns % Pq uint 1788Metaslab groups are considered eligible for allocations if their 1789fragmentation metric (measured as a percentage) is less than or equal to 1790this value. 1791If a metaslab group exceeds this threshold then it will be 1792skipped unless all metaslab groups within the metaslab class have also 1793crossed this threshold. 1794. 1795.It Sy zfs_mg_noalloc_threshold Ns = Ns Sy 0 Ns % Pq uint 1796Defines a threshold at which metaslab groups should be eligible for allocations. 1797The value is expressed as a percentage of free space 1798beyond which a metaslab group is always eligible for allocations. 1799If a metaslab group's free space is less than or equal to the 1800threshold, the allocator will avoid allocating to that group 1801unless all groups in the pool have reached the threshold. 1802Once all groups have reached the threshold, all groups are allowed to accept 1803allocations. 1804The default value of 1805.Sy 0 1806disables the feature and causes all metaslab groups to be eligible for 1807allocations. 1808.Pp 1809This parameter allows one to deal with pools having heavily imbalanced 1810vdevs such as would be the case when a new vdev has been added. 1811Setting the threshold to a non-zero percentage will stop allocations 1812from being made to vdevs that aren't filled to the specified percentage 1813and allow lesser filled vdevs to acquire more allocations than they 1814otherwise would under the old 1815.Sy zfs_mg_alloc_failures 1816facility. 1817. 1818.It Sy zfs_ddt_data_is_special Ns = Ns Sy 1 Ns | Ns 0 Pq int 1819If enabled, ZFS will place DDT data into the special allocation class. 1820. 1821.It Sy zfs_user_indirect_is_special Ns = Ns Sy 1 Ns | Ns 0 Pq int 1822If enabled, ZFS will place user data indirect blocks 1823into the special allocation class. 1824. 1825.It Sy zfs_multihost_history Ns = Ns Sy 0 Pq uint 1826Historical statistics for this many latest multihost updates will be available 1827in 1828.Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /multihost . 1829. 1830.It Sy zfs_multihost_interval Ns = Ns Sy 1000 Ns ms Po 1 s Pc Pq u64 1831Used to control the frequency of multihost writes which are performed when the 1832.Sy multihost 1833pool property is on. 1834This is one of the factors used to determine the 1835length of the activity check during import. 1836.Pp 1837The multihost write period is 1838.Sy zfs_multihost_interval No / Sy leaf-vdevs . 1839On average a multihost write will be issued for each leaf vdev 1840every 1841.Sy zfs_multihost_interval 1842milliseconds. 1843In practice, the observed period can vary with the I/O load 1844and this observed value is the delay which is stored in the uberblock. 1845. 1846.It Sy zfs_multihost_import_intervals Ns = Ns Sy 20 Pq uint 1847Used to control the duration of the activity test on import. 1848Smaller values of 1849.Sy zfs_multihost_import_intervals 1850will reduce the import time but increase 1851the risk of failing to detect an active pool. 1852The total activity check time is never allowed to drop below one second. 1853.Pp 1854On import the activity check waits a minimum amount of time determined by 1855.Sy zfs_multihost_interval No \(mu Sy zfs_multihost_import_intervals , 1856or the same product computed on the host which last had the pool imported, 1857whichever is greater. 1858The activity check time may be further extended if the value of MMP 1859delay found in the best uberblock indicates actual multihost updates happened 1860at longer intervals than 1861.Sy zfs_multihost_interval . 1862A minimum of 1863.Em 100 ms 1864is enforced. 1865.Pp 1866.Sy 0 No is equivalent to Sy 1 . 1867. 1868.It Sy zfs_multihost_fail_intervals Ns = Ns Sy 10 Pq uint 1869Controls the behavior of the pool when multihost write failures or delays are 1870detected. 1871.Pp 1872When 1873.Sy 0 , 1874multihost write failures or delays are ignored. 1875The failures will still be reported to the ZED which depending on 1876its configuration may take action such as suspending the pool or offlining a 1877device. 1878.Pp 1879Otherwise, the pool will be suspended if 1880.Sy zfs_multihost_fail_intervals No \(mu Sy zfs_multihost_interval 1881milliseconds pass without a successful MMP write. 1882This guarantees the activity test will see MMP writes if the pool is imported. 1883.Sy 1 No is equivalent to Sy 2 ; 1884this is necessary to prevent the pool from being suspended 1885due to normal, small I/O latency variations. 1886. 1887.It Sy zfs_no_scrub_io Ns = Ns Sy 0 Ns | Ns 1 Pq int 1888Set to disable scrub I/O. 1889This results in scrubs not actually scrubbing data and 1890simply doing a metadata crawl of the pool instead. 1891. 1892.It Sy zfs_no_scrub_prefetch Ns = Ns Sy 0 Ns | Ns 1 Pq int 1893Set to disable block prefetching for scrubs. 1894. 1895.It Sy zfs_nocacheflush Ns = Ns Sy 0 Ns | Ns 1 Pq int 1896Disable cache flush operations on disks when writing. 1897Setting this will cause pool corruption on power loss 1898if a volatile out-of-order write cache is enabled. 1899. 1900.It Sy zfs_nopwrite_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 1901Allow no-operation writes. 1902The occurrence of nopwrites will further depend on other pool properties 1903.Pq i.a. the checksumming and compression algorithms . 1904. 1905.It Sy zfs_dmu_offset_next_sync Ns = Ns Sy 1 Ns | Ns 0 Pq int 1906Enable forcing TXG sync to find holes. 1907When enabled forces ZFS to sync data when 1908.Sy SEEK_HOLE No or Sy SEEK_DATA 1909flags are used allowing holes in a file to be accurately reported. 1910When disabled holes will not be reported in recently dirtied files. 1911. 1912.It Sy zfs_pd_bytes_max Ns = Ns Sy 52428800 Ns B Po 50 MiB Pc Pq int 1913The number of bytes which should be prefetched during a pool traversal, like 1914.Nm zfs Cm send 1915or other data crawling operations. 1916. 1917.It Sy zfs_traverse_indirect_prefetch_limit Ns = Ns Sy 32 Pq uint 1918The number of blocks pointed by indirect (non-L0) block which should be 1919prefetched during a pool traversal, like 1920.Nm zfs Cm send 1921or other data crawling operations. 1922. 1923.It Sy zfs_per_txg_dirty_frees_percent Ns = Ns Sy 30 Ns % Pq u64 1924Control percentage of dirtied indirect blocks from frees allowed into one TXG. 1925After this threshold is crossed, additional frees will wait until the next TXG. 1926.Sy 0 No disables this throttle . 1927. 1928.It Sy zfs_prefetch_disable Ns = Ns Sy 0 Ns | Ns 1 Pq int 1929Disable predictive prefetch. 1930Note that it leaves "prescient" prefetch 1931.Pq for, e.g., Nm zfs Cm send 1932intact. 1933Unlike predictive prefetch, prescient prefetch never issues I/O 1934that ends up not being needed, so it can't hurt performance. 1935. 1936.It Sy zfs_qat_checksum_disable Ns = Ns Sy 0 Ns | Ns 1 Pq int 1937Disable QAT hardware acceleration for SHA256 checksums. 1938May be unset after the ZFS modules have been loaded to initialize the QAT 1939hardware as long as support is compiled in and the QAT driver is present. 1940. 1941.It Sy zfs_qat_compress_disable Ns = Ns Sy 0 Ns | Ns 1 Pq int 1942Disable QAT hardware acceleration for gzip compression. 1943May be unset after the ZFS modules have been loaded to initialize the QAT 1944hardware as long as support is compiled in and the QAT driver is present. 1945. 1946.It Sy zfs_qat_encrypt_disable Ns = Ns Sy 0 Ns | Ns 1 Pq int 1947Disable QAT hardware acceleration for AES-GCM encryption. 1948May be unset after the ZFS modules have been loaded to initialize the QAT 1949hardware as long as support is compiled in and the QAT driver is present. 1950. 1951.It Sy zfs_vnops_read_chunk_size Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq u64 1952Bytes to read per chunk. 1953. 1954.It Sy zfs_read_history Ns = Ns Sy 0 Pq uint 1955Historical statistics for this many latest reads will be available in 1956.Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /reads . 1957. 1958.It Sy zfs_read_history_hits Ns = Ns Sy 0 Ns | Ns 1 Pq int 1959Include cache hits in read history 1960. 1961.It Sy zfs_rebuild_max_segment Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq u64 1962Maximum read segment size to issue when sequentially resilvering a 1963top-level vdev. 1964. 1965.It Sy zfs_rebuild_scrub_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 1966Automatically start a pool scrub when the last active sequential resilver 1967completes in order to verify the checksums of all blocks which have been 1968resilvered. 1969This is enabled by default and strongly recommended. 1970. 1971.It Sy zfs_rebuild_vdev_limit Ns = Ns Sy 67108864 Ns B Po 64 MiB Pc Pq u64 1972Maximum amount of I/O that can be concurrently issued for a sequential 1973resilver per leaf device, given in bytes. 1974. 1975.It Sy zfs_reconstruct_indirect_combinations_max Ns = Ns Sy 4096 Pq int 1976If an indirect split block contains more than this many possible unique 1977combinations when being reconstructed, consider it too computationally 1978expensive to check them all. 1979Instead, try at most this many randomly selected 1980combinations each time the block is accessed. 1981This allows all segment copies to participate fairly 1982in the reconstruction when all combinations 1983cannot be checked and prevents repeated use of one bad copy. 1984. 1985.It Sy zfs_recover Ns = Ns Sy 0 Ns | Ns 1 Pq int 1986Set to attempt to recover from fatal errors. 1987This should only be used as a last resort, 1988as it typically results in leaked space, or worse. 1989. 1990.It Sy zfs_removal_ignore_errors Ns = Ns Sy 0 Ns | Ns 1 Pq int 1991Ignore hard I/O errors during device removal. 1992When set, if a device encounters a hard I/O error during the removal process 1993the removal will not be cancelled. 1994This can result in a normally recoverable block becoming permanently damaged 1995and is hence not recommended. 1996This should only be used as a last resort when the 1997pool cannot be returned to a healthy state prior to removing the device. 1998. 1999.It Sy zfs_removal_suspend_progress Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2000This is used by the test suite so that it can ensure that certain actions 2001happen while in the middle of a removal. 2002. 2003.It Sy zfs_remove_max_segment Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq uint 2004The largest contiguous segment that we will attempt to allocate when removing 2005a device. 2006If there is a performance problem with attempting to allocate large blocks, 2007consider decreasing this. 2008The default value is also the maximum. 2009. 2010.It Sy zfs_resilver_disable_defer Ns = Ns Sy 0 Ns | Ns 1 Pq int 2011Ignore the 2012.Sy resilver_defer 2013feature, causing an operation that would start a resilver to 2014immediately restart the one in progress. 2015. 2016.It Sy zfs_resilver_defer_percent Ns = Ns Sy 10 Ns % Pq uint 2017If the ongoing resilver progress is below this threshold, a new resilver will 2018restart from scratch instead of being deferred after the current one finishes, 2019even if the 2020.Sy resilver_defer 2021feature is enabled. 2022. 2023.It Sy zfs_resilver_min_time_ms Ns = Ns Sy 3000 Ns ms Po 3 s Pc Pq uint 2024Resilvers are processed by the sync thread. 2025While resilvering, it will spend at least this much time 2026working on a resilver between TXG flushes. 2027. 2028.It Sy zfs_scan_ignore_errors Ns = Ns Sy 0 Ns | Ns 1 Pq int 2029If set, remove the DTL (dirty time list) upon completion of a pool scan (scrub), 2030even if there were unrepairable errors. 2031Intended to be used during pool repair or recovery to 2032stop resilvering when the pool is next imported. 2033. 2034.It Sy zfs_scrub_after_expand Ns = Ns Sy 1 Ns | Ns 0 Pq int 2035Automatically start a pool scrub after a RAIDZ expansion completes 2036in order to verify the checksums of all blocks which have been 2037copied during the expansion. 2038This is enabled by default and strongly recommended. 2039. 2040.It Sy zfs_scrub_min_time_ms Ns = Ns Sy 1000 Ns ms Po 1 s Pc Pq uint 2041Scrubs are processed by the sync thread. 2042While scrubbing, it will spend at least this much time 2043working on a scrub between TXG flushes. 2044. 2045.It Sy zfs_scrub_error_blocks_per_txg Ns = Ns Sy 4096 Pq uint 2046Error blocks to be scrubbed in one txg. 2047. 2048.It Sy zfs_scan_checkpoint_intval Ns = Ns Sy 7200 Ns s Po 2 hour Pc Pq uint 2049To preserve progress across reboots, the sequential scan algorithm periodically 2050needs to stop metadata scanning and issue all the verification I/O to disk. 2051The frequency of this flushing is determined by this tunable. 2052. 2053.It Sy zfs_scan_fill_weight Ns = Ns Sy 3 Pq uint 2054This tunable affects how scrub and resilver I/O segments are ordered. 2055A higher number indicates that we care more about how filled in a segment is, 2056while a lower number indicates we care more about the size of the extent without 2057considering the gaps within a segment. 2058This value is only tunable upon module insertion. 2059Changing the value afterwards will have no effect on scrub or resilver 2060performance. 2061. 2062.It Sy zfs_scan_issue_strategy Ns = Ns Sy 0 Pq uint 2063Determines the order that data will be verified while scrubbing or resilvering: 2064.Bl -tag -compact -offset 4n -width "a" 2065.It Sy 1 2066Data will be verified as sequentially as possible, given the 2067amount of memory reserved for scrubbing 2068.Pq see Sy zfs_scan_mem_lim_fact . 2069This may improve scrub performance if the pool's data is very fragmented. 2070.It Sy 2 2071The largest mostly-contiguous chunk of found data will be verified first. 2072By deferring scrubbing of small segments, we may later find adjacent data 2073to coalesce and increase the segment size. 2074.It Sy 0 2075.No Use strategy Sy 1 No during normal verification 2076.No and strategy Sy 2 No while taking a checkpoint . 2077.El 2078. 2079.It Sy zfs_scan_legacy Ns = Ns Sy 0 Ns | Ns 1 Pq int 2080If unset, indicates that scrubs and resilvers will gather metadata in 2081memory before issuing sequential I/O. 2082Otherwise indicates that the legacy algorithm will be used, 2083where I/O is initiated as soon as it is discovered. 2084Unsetting will not affect scrubs or resilvers that are already in progress. 2085. 2086.It Sy zfs_scan_max_ext_gap Ns = Ns Sy 2097152 Ns B Po 2 MiB Pc Pq int 2087Sets the largest gap in bytes between scrub/resilver I/O operations 2088that will still be considered sequential for sorting purposes. 2089Changing this value will not 2090affect scrubs or resilvers that are already in progress. 2091. 2092.It Sy zfs_scan_mem_lim_fact Ns = Ns Sy 20 Ns ^-1 Pq uint 2093Maximum fraction of RAM used for I/O sorting by sequential scan algorithm. 2094This tunable determines the hard limit for I/O sorting memory usage. 2095When the hard limit is reached we stop scanning metadata and start issuing 2096data verification I/O. 2097This is done until we get below the soft limit. 2098. 2099.It Sy zfs_scan_mem_lim_soft_fact Ns = Ns Sy 20 Ns ^-1 Pq uint 2100The fraction of the hard limit used to determined the soft limit for I/O sorting 2101by the sequential scan algorithm. 2102When we cross this limit from below no action is taken. 2103When we cross this limit from above it is because we are issuing verification 2104I/O. 2105In this case (unless the metadata scan is done) we stop issuing verification I/O 2106and start scanning metadata again until we get to the hard limit. 2107. 2108.It Sy zfs_scan_report_txgs Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2109When reporting resilver throughput and estimated completion time use the 2110performance observed over roughly the last 2111.Sy zfs_scan_report_txgs 2112TXGs. 2113When set to zero performance is calculated over the time between checkpoints. 2114. 2115.It Sy zfs_scan_strict_mem_lim Ns = Ns Sy 0 Ns | Ns 1 Pq int 2116Enforce tight memory limits on pool scans when a sequential scan is in progress. 2117When disabled, the memory limit may be exceeded by fast disks. 2118. 2119.It Sy zfs_scan_suspend_progress Ns = Ns Sy 0 Ns | Ns 1 Pq int 2120Freezes a scrub/resilver in progress without actually pausing it. 2121Intended for testing/debugging. 2122. 2123.It Sy zfs_scan_vdev_limit Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq int 2124Maximum amount of data that can be concurrently issued at once for scrubs and 2125resilvers per leaf device, given in bytes. 2126. 2127.It Sy zfs_send_corrupt_data Ns = Ns Sy 0 Ns | Ns 1 Pq int 2128Allow sending of corrupt data (ignore read/checksum errors when sending). 2129. 2130.It Sy zfs_send_unmodified_spill_blocks Ns = Ns Sy 1 Ns | Ns 0 Pq int 2131Include unmodified spill blocks in the send stream. 2132Under certain circumstances, previous versions of ZFS could incorrectly 2133remove the spill block from an existing object. 2134Including unmodified copies of the spill blocks creates a backwards-compatible 2135stream which will recreate a spill block if it was incorrectly removed. 2136. 2137.It Sy zfs_send_no_prefetch_queue_ff Ns = Ns Sy 20 Ns ^\-1 Pq uint 2138The fill fraction of the 2139.Nm zfs Cm send 2140internal queues. 2141The fill fraction controls the timing with which internal threads are woken up. 2142. 2143.It Sy zfs_send_no_prefetch_queue_length Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq uint 2144The maximum number of bytes allowed in 2145.Nm zfs Cm send Ns 's 2146internal queues. 2147. 2148.It Sy zfs_send_queue_ff Ns = Ns Sy 20 Ns ^\-1 Pq uint 2149The fill fraction of the 2150.Nm zfs Cm send 2151prefetch queue. 2152The fill fraction controls the timing with which internal threads are woken up. 2153. 2154.It Sy zfs_send_queue_length Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq uint 2155The maximum number of bytes allowed that will be prefetched by 2156.Nm zfs Cm send . 2157This value must be at least twice the maximum block size in use. 2158. 2159.It Sy zfs_recv_queue_ff Ns = Ns Sy 20 Ns ^\-1 Pq uint 2160The fill fraction of the 2161.Nm zfs Cm receive 2162queue. 2163The fill fraction controls the timing with which internal threads are woken up. 2164. 2165.It Sy zfs_recv_queue_length Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq uint 2166The maximum number of bytes allowed in the 2167.Nm zfs Cm receive 2168queue. 2169This value must be at least twice the maximum block size in use. 2170. 2171.It Sy zfs_recv_write_batch_size Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq uint 2172The maximum amount of data, in bytes, that 2173.Nm zfs Cm receive 2174will write in one DMU transaction. 2175This is the uncompressed size, even when receiving a compressed send stream. 2176This setting will not reduce the write size below a single block. 2177Capped at a maximum of 2178.Sy 32 MiB . 2179. 2180.It Sy zfs_recv_best_effort_corrective Ns = Ns Sy 0 Pq int 2181When this variable is set to non-zero a corrective receive: 2182.Bl -enum -compact -offset 4n -width "1." 2183.It 2184Does not enforce the restriction of source & destination snapshot GUIDs 2185matching. 2186.It 2187If there is an error during healing, the healing receive is not 2188terminated instead it moves on to the next record. 2189.El 2190. 2191.It Sy zfs_override_estimate_recordsize Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2192Setting this variable overrides the default logic for estimating block 2193sizes when doing a 2194.Nm zfs Cm send . 2195The default heuristic is that the average block size 2196will be the current recordsize. 2197Override this value if most data in your dataset is not of that size 2198and you require accurate zfs send size estimates. 2199. 2200.It Sy zfs_sync_pass_deferred_free Ns = Ns Sy 2 Pq uint 2201Flushing of data to disk is done in passes. 2202Defer frees starting in this pass. 2203. 2204.It Sy zfs_spa_discard_memory_limit Ns = Ns Sy 16777216 Ns B Po 16 MiB Pc Pq int 2205Maximum memory used for prefetching a checkpoint's space map on each 2206vdev while discarding the checkpoint. 2207. 2208.It Sy zfs_special_class_metadata_reserve_pct Ns = Ns Sy 25 Ns % Pq uint 2209Only allow small data blocks to be allocated on the special and dedup vdev 2210types when the available free space percentage on these vdevs exceeds this 2211value. 2212This ensures reserved space is available for pool metadata as the 2213special vdevs approach capacity. 2214. 2215.It Sy zfs_sync_pass_dont_compress Ns = Ns Sy 8 Pq uint 2216Starting in this sync pass, disable compression (including of metadata). 2217With the default setting, in practice, we don't have this many sync passes, 2218so this has no effect. 2219.Pp 2220The original intent was that disabling compression would help the sync passes 2221to converge. 2222However, in practice, disabling compression increases 2223the average number of sync passes; because when we turn compression off, 2224many blocks' size will change, and thus we have to re-allocate 2225(not overwrite) them. 2226It also increases the number of 2227.Em 128 KiB 2228allocations (e.g. for indirect blocks and spacemaps) 2229because these will not be compressed. 2230The 2231.Em 128 KiB 2232allocations are especially detrimental to performance 2233on highly fragmented systems, which may have very few free segments of this 2234size, 2235and may need to load new metaslabs to satisfy these allocations. 2236. 2237.It Sy zfs_sync_pass_rewrite Ns = Ns Sy 2 Pq uint 2238Rewrite new block pointers starting in this pass. 2239. 2240.It Sy zfs_trim_extent_bytes_max Ns = Ns Sy 134217728 Ns B Po 128 MiB Pc Pq uint 2241Maximum size of TRIM command. 2242Larger ranges will be split into chunks no larger than this value before 2243issuing. 2244. 2245.It Sy zfs_trim_extent_bytes_min Ns = Ns Sy 32768 Ns B Po 32 KiB Pc Pq uint 2246Minimum size of TRIM commands. 2247TRIM ranges smaller than this will be skipped, 2248unless they're part of a larger range which was chunked. 2249This is done because it's common for these small TRIMs 2250to negatively impact overall performance. 2251. 2252.It Sy zfs_trim_metaslab_skip Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2253Skip uninitialized metaslabs during the TRIM process. 2254This option is useful for pools constructed from large thinly-provisioned 2255devices 2256where TRIM operations are slow. 2257As a pool ages, an increasing fraction of the pool's metaslabs 2258will be initialized, progressively degrading the usefulness of this option. 2259This setting is stored when starting a manual TRIM and will 2260persist for the duration of the requested TRIM. 2261. 2262.It Sy zfs_trim_queue_limit Ns = Ns Sy 10 Pq uint 2263Maximum number of queued TRIMs outstanding per leaf vdev. 2264The number of concurrent TRIM commands issued to the device is controlled by 2265.Sy zfs_vdev_trim_min_active No and Sy zfs_vdev_trim_max_active . 2266. 2267.It Sy zfs_trim_txg_batch Ns = Ns Sy 32 Pq uint 2268The number of transaction groups' worth of frees which should be aggregated 2269before TRIM operations are issued to the device. 2270This setting represents a trade-off between issuing larger, 2271more efficient TRIM operations and the delay 2272before the recently trimmed space is available for use by the device. 2273.Pp 2274Increasing this value will allow frees to be aggregated for a longer time. 2275This will result is larger TRIM operations and potentially increased memory 2276usage. 2277Decreasing this value will have the opposite effect. 2278The default of 2279.Sy 32 2280was determined to be a reasonable compromise. 2281. 2282.It Sy zfs_txg_history Ns = Ns Sy 100 Pq uint 2283Historical statistics for this many latest TXGs will be available in 2284.Pa /proc/spl/kstat/zfs/ Ns Ao Ar pool Ac Ns Pa /TXGs . 2285. 2286.It Sy zfs_txg_timeout Ns = Ns Sy 5 Ns s Pq uint 2287Flush dirty data to disk at least every this many seconds (maximum TXG 2288duration). 2289. 2290.It Sy zfs_vdev_aggregation_limit Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq uint 2291Max vdev I/O aggregation size. 2292. 2293.It Sy zfs_vdev_aggregation_limit_non_rotating Ns = Ns Sy 131072 Ns B Po 128 KiB Pc Pq uint 2294Max vdev I/O aggregation size for non-rotating media. 2295. 2296.It Sy zfs_vdev_mirror_rotating_inc Ns = Ns Sy 0 Pq int 2297A number by which the balancing algorithm increments the load calculation for 2298the purpose of selecting the least busy mirror member when an I/O operation 2299immediately follows its predecessor on rotational vdevs 2300for the purpose of making decisions based on load. 2301. 2302.It Sy zfs_vdev_mirror_rotating_seek_inc Ns = Ns Sy 5 Pq int 2303A number by which the balancing algorithm increments the load calculation for 2304the purpose of selecting the least busy mirror member when an I/O operation 2305lacks locality as defined by 2306.Sy zfs_vdev_mirror_rotating_seek_offset . 2307Operations within this that are not immediately following the previous operation 2308are incremented by half. 2309. 2310.It Sy zfs_vdev_mirror_rotating_seek_offset Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq int 2311The maximum distance for the last queued I/O operation in which 2312the balancing algorithm considers an operation to have locality. 2313.No See Sx ZFS I/O SCHEDULER . 2314. 2315.It Sy zfs_vdev_mirror_non_rotating_inc Ns = Ns Sy 0 Pq int 2316A number by which the balancing algorithm increments the load calculation for 2317the purpose of selecting the least busy mirror member on non-rotational vdevs 2318when I/O operations do not immediately follow one another. 2319. 2320.It Sy zfs_vdev_mirror_non_rotating_seek_inc Ns = Ns Sy 1 Pq int 2321A number by which the balancing algorithm increments the load calculation for 2322the purpose of selecting the least busy mirror member when an I/O operation 2323lacks 2324locality as defined by the 2325.Sy zfs_vdev_mirror_rotating_seek_offset . 2326Operations within this that are not immediately following the previous operation 2327are incremented by half. 2328. 2329.It Sy zfs_vdev_read_gap_limit Ns = Ns Sy 32768 Ns B Po 32 KiB Pc Pq uint 2330Aggregate read I/O operations if the on-disk gap between them is within this 2331threshold. 2332. 2333.It Sy zfs_vdev_write_gap_limit Ns = Ns Sy 4096 Ns B Po 4 KiB Pc Pq uint 2334Aggregate write I/O operations if the on-disk gap between them is within this 2335threshold. 2336. 2337.It Sy zfs_vdev_raidz_impl Ns = Ns Sy fastest Pq string 2338Select the raidz parity implementation to use. 2339.Pp 2340Variants that don't depend on CPU-specific features 2341may be selected on module load, as they are supported on all systems. 2342The remaining options may only be set after the module is loaded, 2343as they are available only if the implementations are compiled in 2344and supported on the running system. 2345.Pp 2346Once the module is loaded, 2347.Pa /sys/module/zfs/parameters/zfs_vdev_raidz_impl 2348will show the available options, 2349with the currently selected one enclosed in square brackets. 2350.Pp 2351.TS 2352lb l l . 2353fastest selected by built-in benchmark 2354original original implementation 2355scalar scalar implementation 2356sse2 SSE2 instruction set 64-bit x86 2357ssse3 SSSE3 instruction set 64-bit x86 2358avx2 AVX2 instruction set 64-bit x86 2359avx512f AVX512F instruction set 64-bit x86 2360avx512bw AVX512F & AVX512BW instruction sets 64-bit x86 2361aarch64_neon NEON Aarch64/64-bit ARMv8 2362aarch64_neonx2 NEON with more unrolling Aarch64/64-bit ARMv8 2363powerpc_altivec Altivec PowerPC 2364.TE 2365. 2366.It Sy zfs_vdev_scheduler Pq charp 2367.Sy DEPRECATED . 2368Prints warning to kernel log for compatibility. 2369. 2370.It Sy zfs_zevent_len_max Ns = Ns Sy 512 Pq uint 2371Max event queue length. 2372Events in the queue can be viewed with 2373.Xr zpool-events 8 . 2374. 2375.It Sy zfs_zevent_retain_max Ns = Ns Sy 2000 Pq int 2376Maximum recent zevent records to retain for duplicate checking. 2377Setting this to 2378.Sy 0 2379disables duplicate detection. 2380. 2381.It Sy zfs_zevent_retain_expire_secs Ns = Ns Sy 900 Ns s Po 15 min Pc Pq int 2382Lifespan for a recent ereport that was retained for duplicate checking. 2383. 2384.It Sy zfs_zil_clean_taskq_maxalloc Ns = Ns Sy 1048576 Pq int 2385The maximum number of taskq entries that are allowed to be cached. 2386When this limit is exceeded transaction records (itxs) 2387will be cleaned synchronously. 2388. 2389.It Sy zfs_zil_clean_taskq_minalloc Ns = Ns Sy 1024 Pq int 2390The number of taskq entries that are pre-populated when the taskq is first 2391created and are immediately available for use. 2392. 2393.It Sy zfs_zil_clean_taskq_nthr_pct Ns = Ns Sy 100 Ns % Pq int 2394This controls the number of threads used by 2395.Sy dp_zil_clean_taskq . 2396The default value of 2397.Sy 100% 2398will create a maximum of one thread per cpu. 2399. 2400.It Sy zil_maxblocksize Ns = Ns Sy 131072 Ns B Po 128 KiB Pc Pq uint 2401This sets the maximum block size used by the ZIL. 2402On very fragmented pools, lowering this 2403.Pq typically to Sy 36 KiB 2404can improve performance. 2405. 2406.It Sy zil_maxcopied Ns = Ns Sy 7680 Ns B Po 7.5 KiB Pc Pq uint 2407This sets the maximum number of write bytes logged via WR_COPIED. 2408It tunes a tradeoff between additional memory copy and possibly worse log 2409space efficiency vs additional range lock/unlock. 2410. 2411.It Sy zil_nocacheflush Ns = Ns Sy 0 Ns | Ns 1 Pq int 2412Disable the cache flush commands that are normally sent to disk by 2413the ZIL after an LWB write has completed. 2414Setting this will cause ZIL corruption on power loss 2415if a volatile out-of-order write cache is enabled. 2416. 2417.It Sy zil_replay_disable Ns = Ns Sy 0 Ns | Ns 1 Pq int 2418Disable intent logging replay. 2419Can be disabled for recovery from corrupted ZIL. 2420. 2421.It Sy zil_slog_bulk Ns = Ns Sy 67108864 Ns B Po 64 MiB Pc Pq u64 2422Limit SLOG write size per commit executed with synchronous priority. 2423Any writes above that will be executed with lower (asynchronous) priority 2424to limit potential SLOG device abuse by single active ZIL writer. 2425. 2426.It Sy zfs_zil_saxattr Ns = Ns Sy 1 Ns | Ns 0 Pq int 2427Setting this tunable to zero disables ZIL logging of new 2428.Sy xattr Ns = Ns Sy sa 2429records if the 2430.Sy org.openzfs:zilsaxattr 2431feature is enabled on the pool. 2432This would only be necessary to work around bugs in the ZIL logging or replay 2433code for this record type. 2434The tunable has no effect if the feature is disabled. 2435. 2436.It Sy zfs_embedded_slog_min_ms Ns = Ns Sy 64 Pq uint 2437Usually, one metaslab from each normal-class vdev is dedicated for use by 2438the ZIL to log synchronous writes. 2439However, if there are fewer than 2440.Sy zfs_embedded_slog_min_ms 2441metaslabs in the vdev, this functionality is disabled. 2442This ensures that we don't set aside an unreasonable amount of space for the 2443ZIL. 2444. 2445.It Sy zstd_earlyabort_pass Ns = Ns Sy 1 Pq uint 2446Whether heuristic for detection of incompressible data with zstd levels >= 3 2447using LZ4 and zstd-1 passes is enabled. 2448. 2449.It Sy zstd_abort_size Ns = Ns Sy 131072 Pq uint 2450Minimal uncompressed size (inclusive) of a record before the early abort 2451heuristic will be attempted. 2452. 2453.It Sy zio_deadman_log_all Ns = Ns Sy 0 Ns | Ns 1 Pq int 2454If non-zero, the zio deadman will produce debugging messages 2455.Pq see Sy zfs_dbgmsg_enable 2456for all zios, rather than only for leaf zios possessing a vdev. 2457This is meant to be used by developers to gain 2458diagnostic information for hang conditions which don't involve a mutex 2459or other locking primitive: typically conditions in which a thread in 2460the zio pipeline is looping indefinitely. 2461. 2462.It Sy zio_slow_io_ms Ns = Ns Sy 30000 Ns ms Po 30 s Pc Pq int 2463When an I/O operation takes more than this much time to complete, 2464it's marked as slow. 2465Each slow operation causes a delay zevent. 2466Slow I/O counters can be seen with 2467.Nm zpool Cm status Fl s . 2468. 2469.It Sy zio_dva_throttle_enabled Ns = Ns Sy 1 Ns | Ns 0 Pq int 2470Throttle block allocations in the I/O pipeline. 2471This allows for dynamic allocation distribution when devices are imbalanced. 2472When enabled, the maximum number of pending allocations per top-level vdev 2473is limited by 2474.Sy zfs_vdev_queue_depth_pct . 2475. 2476.It Sy zfs_xattr_compat Ns = Ns 0 Ns | Ns 1 Pq int 2477Control the naming scheme used when setting new xattrs in the user namespace. 2478If 2479.Sy 0 2480.Pq the default on Linux , 2481user namespace xattr names are prefixed with the namespace, to be backwards 2482compatible with previous versions of ZFS on Linux. 2483If 2484.Sy 1 2485.Pq the default on Fx , 2486user namespace xattr names are not prefixed, to be backwards compatible with 2487previous versions of ZFS on illumos and 2488.Fx . 2489.Pp 2490Either naming scheme can be read on this and future versions of ZFS, regardless 2491of this tunable, but legacy ZFS on illumos or 2492.Fx 2493are unable to read user namespace xattrs written in the Linux format, and 2494legacy versions of ZFS on Linux are unable to read user namespace xattrs written 2495in the legacy ZFS format. 2496.Pp 2497An existing xattr with the alternate naming scheme is removed when overwriting 2498the xattr so as to not accumulate duplicates. 2499. 2500.It Sy zio_requeue_io_start_cut_in_line Ns = Ns Sy 0 Ns | Ns 1 Pq int 2501Prioritize requeued I/O. 2502. 2503.It Sy zio_taskq_batch_pct Ns = Ns Sy 80 Ns % Pq uint 2504Percentage of online CPUs which will run a worker thread for I/O. 2505These workers are responsible for I/O work such as compression, encryption, 2506checksum and parity calculations. 2507Fractional number of CPUs will be rounded down. 2508.Pp 2509The default value of 2510.Sy 80% 2511was chosen to avoid using all CPUs which can result in 2512latency issues and inconsistent application performance, 2513especially when slower compression and/or checksumming is enabled. 2514Set value only applies to pools imported/created after that. 2515. 2516.It Sy zio_taskq_batch_tpq Ns = Ns Sy 0 Pq uint 2517Number of worker threads per taskq. 2518Higher values improve I/O ordering and CPU utilization, 2519while lower reduce lock contention. 2520Set value only applies to pools imported/created after that. 2521.Pp 2522If 2523.Sy 0 , 2524generate a system-dependent value close to 6 threads per taskq. 2525Set value only applies to pools imported/created after that. 2526. 2527.It Sy zio_taskq_write_tpq Ns = Ns Sy 16 Pq uint 2528Determines the minumum number of threads per write issue taskq. 2529Higher values improve CPU utilization on high throughput, 2530while lower reduce taskq locks contention on high IOPS. 2531Set value only applies to pools imported/created after that. 2532. 2533.It Sy zio_taskq_read Ns = Ns Sy fixed,1,8 null scale null Pq charp 2534Set the queue and thread configuration for the IO read queues. 2535This is an advanced debugging parameter. 2536Don't change this unless you understand what it does. 2537Set values only apply to pools imported/created after that. 2538. 2539.It Sy zio_taskq_write Ns = Ns Sy sync null scale null Pq charp 2540Set the queue and thread configuration for the IO write queues. 2541This is an advanced debugging parameter. 2542Don't change this unless you understand what it does. 2543Set values only apply to pools imported/created after that. 2544. 2545.It Sy zvol_inhibit_dev Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2546Do not create zvol device nodes. 2547This may slightly improve startup time on 2548systems with a very large number of zvols. 2549. 2550.It Sy zvol_major Ns = Ns Sy 230 Pq uint 2551Major number for zvol block devices. 2552. 2553.It Sy zvol_max_discard_blocks Ns = Ns Sy 16384 Pq long 2554Discard (TRIM) operations done on zvols will be done in batches of this 2555many blocks, where block size is determined by the 2556.Sy volblocksize 2557property of a zvol. 2558. 2559.It Sy zvol_prefetch_bytes Ns = Ns Sy 131072 Ns B Po 128 KiB Pc Pq uint 2560When adding a zvol to the system, prefetch this many bytes 2561from the start and end of the volume. 2562Prefetching these regions of the volume is desirable, 2563because they are likely to be accessed immediately by 2564.Xr blkid 8 2565or the kernel partitioner. 2566. 2567.It Sy zvol_request_sync Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2568When processing I/O requests for a zvol, submit them synchronously. 2569This effectively limits the queue depth to 2570.Em 1 2571for each I/O submitter. 2572When unset, requests are handled asynchronously by a thread pool. 2573The number of requests which can be handled concurrently is controlled by 2574.Sy zvol_threads . 2575.Sy zvol_request_sync 2576is ignored when running on a kernel that supports block multiqueue 2577.Pq Li blk-mq . 2578. 2579.It Sy zvol_num_taskqs Ns = Ns Sy 0 Pq uint 2580Number of zvol taskqs. 2581If 2582.Sy 0 2583(the default) then scaling is done internally to prefer 6 threads per taskq. 2584This only applies on Linux. 2585. 2586.It Sy zvol_threads Ns = Ns Sy 0 Pq uint 2587The number of system wide threads to use for processing zvol block IOs. 2588If 2589.Sy 0 2590(the default) then internally set 2591.Sy zvol_threads 2592to the number of CPUs present or 32 (whichever is greater). 2593. 2594.It Sy zvol_blk_mq_threads Ns = Ns Sy 0 Pq uint 2595The number of threads per zvol to use for queuing IO requests. 2596This parameter will only appear if your kernel supports 2597.Li blk-mq 2598and is only read and assigned to a zvol at zvol load time. 2599If 2600.Sy 0 2601(the default) then internally set 2602.Sy zvol_blk_mq_threads 2603to the number of CPUs present. 2604. 2605.It Sy zvol_use_blk_mq Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2606Set to 2607.Sy 1 2608to use the 2609.Li blk-mq 2610API for zvols. 2611Set to 2612.Sy 0 2613(the default) to use the legacy zvol APIs. 2614This setting can give better or worse zvol performance depending on 2615the workload. 2616This parameter will only appear if your kernel supports 2617.Li blk-mq 2618and is only read and assigned to a zvol at zvol load time. 2619. 2620.It Sy zvol_blk_mq_blocks_per_thread Ns = Ns Sy 8 Pq uint 2621If 2622.Sy zvol_use_blk_mq 2623is enabled, then process this number of 2624.Sy volblocksize Ns -sized blocks per zvol thread. 2625This tunable can be use to favor better performance for zvol reads (lower 2626values) or writes (higher values). 2627If set to 2628.Sy 0 , 2629then the zvol layer will process the maximum number of blocks 2630per thread that it can. 2631This parameter will only appear if your kernel supports 2632.Li blk-mq 2633and is only applied at each zvol's load time. 2634. 2635.It Sy zvol_blk_mq_queue_depth Ns = Ns Sy 0 Pq uint 2636The queue_depth value for the zvol 2637.Li blk-mq 2638interface. 2639This parameter will only appear if your kernel supports 2640.Li blk-mq 2641and is only applied at each zvol's load time. 2642If 2643.Sy 0 2644(the default) then use the kernel's default queue depth. 2645Values are clamped to the kernel's 2646.Dv BLKDEV_MIN_RQ 2647and 2648.Dv BLKDEV_MAX_RQ Ns / Ns Dv BLKDEV_DEFAULT_RQ 2649limits. 2650. 2651.It Sy zvol_volmode Ns = Ns Sy 1 Pq uint 2652Defines zvol block devices behaviour when 2653.Sy volmode Ns = Ns Sy default : 2654.Bl -tag -compact -offset 4n -width "a" 2655.It Sy 1 2656.No equivalent to Sy full 2657.It Sy 2 2658.No equivalent to Sy dev 2659.It Sy 3 2660.No equivalent to Sy none 2661.El 2662. 2663.It Sy zvol_enforce_quotas Ns = Ns Sy 0 Ns | Ns 1 Pq uint 2664Enable strict ZVOL quota enforcement. 2665The strict quota enforcement may have a performance impact. 2666.El 2667. 2668.Sh ZFS I/O SCHEDULER 2669ZFS issues I/O operations to leaf vdevs to satisfy and complete I/O operations. 2670The scheduler determines when and in what order those operations are issued. 2671The scheduler divides operations into five I/O classes, 2672prioritized in the following order: sync read, sync write, async read, 2673async write, and scrub/resilver. 2674Each queue defines the minimum and maximum number of concurrent operations 2675that may be issued to the device. 2676In addition, the device has an aggregate maximum, 2677.Sy zfs_vdev_max_active . 2678Note that the sum of the per-queue minima must not exceed the aggregate maximum. 2679If the sum of the per-queue maxima exceeds the aggregate maximum, 2680then the number of active operations may reach 2681.Sy zfs_vdev_max_active , 2682in which case no further operations will be issued, 2683regardless of whether all per-queue minima have been met. 2684.Pp 2685For many physical devices, throughput increases with the number of 2686concurrent operations, but latency typically suffers. 2687Furthermore, physical devices typically have a limit 2688at which more concurrent operations have no 2689effect on throughput or can actually cause it to decrease. 2690.Pp 2691The scheduler selects the next operation to issue by first looking for an 2692I/O class whose minimum has not been satisfied. 2693Once all are satisfied and the aggregate maximum has not been hit, 2694the scheduler looks for classes whose maximum has not been satisfied. 2695Iteration through the I/O classes is done in the order specified above. 2696No further operations are issued 2697if the aggregate maximum number of concurrent operations has been hit, 2698or if there are no operations queued for an I/O class that has not hit its 2699maximum. 2700Every time an I/O operation is queued or an operation completes, 2701the scheduler looks for new operations to issue. 2702.Pp 2703In general, smaller 2704.Sy max_active Ns s 2705will lead to lower latency of synchronous operations. 2706Larger 2707.Sy max_active Ns s 2708may lead to higher overall throughput, depending on underlying storage. 2709.Pp 2710The ratio of the queues' 2711.Sy max_active Ns s 2712determines the balance of performance between reads, writes, and scrubs. 2713For example, increasing 2714.Sy zfs_vdev_scrub_max_active 2715will cause the scrub or resilver to complete more quickly, 2716but reads and writes to have higher latency and lower throughput. 2717.Pp 2718All I/O classes have a fixed maximum number of outstanding operations, 2719except for the async write class. 2720Asynchronous writes represent the data that is committed to stable storage 2721during the syncing stage for transaction groups. 2722Transaction groups enter the syncing state periodically, 2723so the number of queued async writes will quickly burst up 2724and then bleed down to zero. 2725Rather than servicing them as quickly as possible, 2726the I/O scheduler changes the maximum number of active async write operations 2727according to the amount of dirty data in the pool. 2728Since both throughput and latency typically increase with the number of 2729concurrent operations issued to physical devices, reducing the 2730burstiness in the number of simultaneous operations also stabilizes the 2731response time of operations from other queues, in particular synchronous ones. 2732In broad strokes, the I/O scheduler will issue more concurrent operations 2733from the async write queue as there is more dirty data in the pool. 2734. 2735.Ss Async Writes 2736The number of concurrent operations issued for the async write I/O class 2737follows a piece-wise linear function defined by a few adjustable points: 2738.Bd -literal 2739 | o---------| <-- \fBzfs_vdev_async_write_max_active\fP 2740 ^ | /^ | 2741 | | / | | 2742active | / | | 2743 I/O | / | | 2744count | / | | 2745 | / | | 2746 |-------o | | <-- \fBzfs_vdev_async_write_min_active\fP 2747 0|_______^______|_________| 2748 0% | | 100% of \fBzfs_dirty_data_max\fP 2749 | | 2750 | `-- \fBzfs_vdev_async_write_active_max_dirty_percent\fP 2751 `--------- \fBzfs_vdev_async_write_active_min_dirty_percent\fP 2752.Ed 2753.Pp 2754Until the amount of dirty data exceeds a minimum percentage of the dirty 2755data allowed in the pool, the I/O scheduler will limit the number of 2756concurrent operations to the minimum. 2757As that threshold is crossed, the number of concurrent operations issued 2758increases linearly to the maximum at the specified maximum percentage 2759of the dirty data allowed in the pool. 2760.Pp 2761Ideally, the amount of dirty data on a busy pool will stay in the sloped 2762part of the function between 2763.Sy zfs_vdev_async_write_active_min_dirty_percent 2764and 2765.Sy zfs_vdev_async_write_active_max_dirty_percent . 2766If it exceeds the maximum percentage, 2767this indicates that the rate of incoming data is 2768greater than the rate that the backend storage can handle. 2769In this case, we must further throttle incoming writes, 2770as described in the next section. 2771. 2772.Sh ZFS TRANSACTION DELAY 2773We delay transactions when we've determined that the backend storage 2774isn't able to accommodate the rate of incoming writes. 2775.Pp 2776If there is already a transaction waiting, we delay relative to when 2777that transaction will finish waiting. 2778This way the calculated delay time 2779is independent of the number of threads concurrently executing transactions. 2780.Pp 2781If we are the only waiter, wait relative to when the transaction started, 2782rather than the current time. 2783This credits the transaction for "time already served", 2784e.g. reading indirect blocks. 2785.Pp 2786The minimum time for a transaction to take is calculated as 2787.D1 min_time = min( Ns Sy zfs_delay_scale No \(mu Po Sy dirty No \- Sy min Pc / Po Sy max No \- Sy dirty Pc , 100ms) 2788.Pp 2789The delay has two degrees of freedom that can be adjusted via tunables. 2790The percentage of dirty data at which we start to delay is defined by 2791.Sy zfs_delay_min_dirty_percent . 2792This should typically be at or above 2793.Sy zfs_vdev_async_write_active_max_dirty_percent , 2794so that we only start to delay after writing at full speed 2795has failed to keep up with the incoming write rate. 2796The scale of the curve is defined by 2797.Sy zfs_delay_scale . 2798Roughly speaking, this variable determines the amount of delay at the midpoint 2799of the curve. 2800.Bd -literal 2801delay 2802 10ms +-------------------------------------------------------------*+ 2803 | *| 2804 9ms + *+ 2805 | *| 2806 8ms + *+ 2807 | * | 2808 7ms + * + 2809 | * | 2810 6ms + * + 2811 | * | 2812 5ms + * + 2813 | * | 2814 4ms + * + 2815 | * | 2816 3ms + * + 2817 | * | 2818 2ms + (midpoint) * + 2819 | | ** | 2820 1ms + v *** + 2821 | \fBzfs_delay_scale\fP ----------> ******** | 2822 0 +-------------------------------------*********----------------+ 2823 0% <- \fBzfs_dirty_data_max\fP -> 100% 2824.Ed 2825.Pp 2826Note, that since the delay is added to the outstanding time remaining on the 2827most recent transaction it's effectively the inverse of IOPS. 2828Here, the midpoint of 2829.Em 500 us 2830translates to 2831.Em 2000 IOPS . 2832The shape of the curve 2833was chosen such that small changes in the amount of accumulated dirty data 2834in the first three quarters of the curve yield relatively small differences 2835in the amount of delay. 2836.Pp 2837The effects can be easier to understand when the amount of delay is 2838represented on a logarithmic scale: 2839.Bd -literal 2840delay 2841100ms +-------------------------------------------------------------++ 2842 + + 2843 | | 2844 + *+ 2845 10ms + *+ 2846 + ** + 2847 | (midpoint) ** | 2848 + | ** + 2849 1ms + v **** + 2850 + \fBzfs_delay_scale\fP ----------> ***** + 2851 | **** | 2852 + **** + 2853100us + ** + 2854 + * + 2855 | * | 2856 + * + 2857 10us + * + 2858 + + 2859 | | 2860 + + 2861 +--------------------------------------------------------------+ 2862 0% <- \fBzfs_dirty_data_max\fP -> 100% 2863.Ed 2864.Pp 2865Note here that only as the amount of dirty data approaches its limit does 2866the delay start to increase rapidly. 2867The goal of a properly tuned system should be to keep the amount of dirty data 2868out of that range by first ensuring that the appropriate limits are set 2869for the I/O scheduler to reach optimal throughput on the back-end storage, 2870and then by changing the value of 2871.Sy zfs_delay_scale 2872to increase the steepness of the curve. 2873