2 .\" Copyright (c) 2013 by Turbo Fredriksson <turbo@bayour.com>. All rights reserved.
3 .\" The contents of this file are subject to the terms of the Common Development
4 .\" and Distribution License (the "License"). You may not use this file except
5 .\" in compliance with the License. You can obtain a copy of the license at
6 .\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
8 .\" See the License for the specific language governing permissions and
9 .\" limitations under the License. When distributing Covered Code, include this
10 .\" CDDL HEADER in each file and include the License file at
11 .\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this
12 .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
13 .\" own identifying information:
14 .\" Portions Copyright [yyyy] [name of copyright owner]
15 .TH ZFS-MODULE-PARAMETERS 5 "Nov 16, 2013"
17 zfs\-module\-parameters \- ZFS module parameters
21 Description of the different parameters to the ZFS module.
23 .SS "Module parameters"
30 \fBl2arc_feed_again\fR (int)
35 Use \fB1\fR for yes (default) and \fB0\fR to disable.
41 \fBl2arc_feed_min_ms\fR (ulong)
44 Min feed interval in milliseconds
46 Default value: \fB200\fR.
52 \fBl2arc_feed_secs\fR (ulong)
55 Seconds between L2ARC writing
57 Default value: \fB1\fR.
63 \fBl2arc_headroom\fR (ulong)
66 Number of max device writes to precache
68 Default value: \fB2\fR.
74 \fBl2arc_headroom_boost\fR (ulong)
77 Compressed l2arc_headroom multiplier
79 Default value: \fB200\fR.
85 \fBl2arc_nocompress\fR (int)
88 Skip compressing L2ARC buffers
90 Use \fB1\fR for yes and \fB0\fR for no (default).
96 \fBl2arc_noprefetch\fR (int)
99 Skip caching prefetched buffers
101 Use \fB1\fR for yes (default) and \fB0\fR to disable.
107 \fBl2arc_norw\fR (int)
110 No reads during writes
112 Use \fB1\fR for yes and \fB0\fR for no (default).
118 \fBl2arc_write_boost\fR (ulong)
121 Extra write bytes during device warmup
123 Default value: \fB8,388,608\fR.
129 \fBl2arc_write_max\fR (ulong)
132 Max write bytes per interval
134 Default value: \fB8,388,608\fR.
140 \fBmetaslab_aliquot\fR (ulong)
143 Metaslab granularity, in bytes. This is roughly similar to what would be
144 referred to as the "stripe size" in traditional RAID arrays. In normal
145 operation, ZFS will try to write this amount of data to a top-level vdev
146 before moving on to the next one.
148 Default value: \fB524,288\fR.
154 \fBmetaslab_bias_enabled\fR (int)
157 Enable metaslab group biasing based on its vdev's over- or under-utilization
158 relative to the pool.
160 Use \fB1\fR for yes (default) and \fB0\fR for no.
166 \fBmetaslab_debug_load\fR (int)
169 Load all metaslabs during pool import.
171 Use \fB1\fR for yes and \fB0\fR for no (default).
177 \fBmetaslab_debug_unload\fR (int)
180 Prevent metaslabs from being unloaded.
182 Use \fB1\fR for yes and \fB0\fR for no (default).
188 \fBmetaslab_fragmentation_factor_enabled\fR (int)
191 Enable use of the fragmentation metric in computing metaslab weights.
193 Use \fB1\fR for yes (default) and \fB0\fR for no.
199 \fBmetaslabs_per_vdev\fR (int)
202 When a vdev is added, it will be divided into approximately (but no more than) this number of metaslabs.
204 Default value: \fB200\fR.
210 \fBmetaslab_preload_enabled\fR (int)
213 Enable metaslab group preloading.
215 Use \fB1\fR for yes (default) and \fB0\fR for no.
221 \fBmetaslab_lba_weighting_enabled\fR (int)
224 Give more weight to metaslabs with lower LBAs, assuming they have
225 greater bandwidth as is typically the case on a modern constant
226 angular velocity disk drive.
228 Use \fB1\fR for yes (default) and \fB0\fR for no.
234 \fBspa_config_path\fR (charp)
239 Default value: \fB/etc/zfs/zpool.cache\fR.
245 \fBspa_asize_inflation\fR (int)
248 Multiplication factor used to estimate actual disk consumption from the
249 size of data being written. The default value is a worst case estimate,
250 but lower values may be valid for a given pool depending on its
251 configuration. Pool administrators who understand the factors involved
252 may wish to specify a more realistic inflation factor, particularly if
253 they operate close to quota or capacity limits.
261 \fBspa_load_verify_data\fR (int)
264 Whether to traverse data blocks during an "extreme rewind" (\fB-X\fR)
265 import. Use 0 to disable and 1 to enable.
267 An extreme rewind import normally performs a full traversal of all
268 blocks in the pool for verification. If this parameter is set to 0,
269 the traversal skips non-metadata blocks. It can be toggled once the
270 import has started to stop or start the traversal of non-metadata blocks.
278 \fBspa_load_verify_metadata\fR (int)
281 Whether to traverse blocks during an "extreme rewind" (\fB-X\fR)
282 pool import. Use 0 to disable and 1 to enable.
284 An extreme rewind import normally performs a full traversal of all
285 blocks in the pool for verification. If this parameter is set to 1,
286 the traversal is not performed. It can be toggled once the import has
287 started to stop or start the traversal.
295 \fBspa_load_verify_maxinflight\fR (int)
298 Maximum concurrent I/Os during the traversal performed during an "extreme
299 rewind" (\fB-X\fR) pool import.
307 \fBspa_slop_shift\fR (int)
310 Normally, we don't allow the last 3.2% (1/(2^spa_slop_shift)) of space
311 in the pool to be consumed. This ensures that we don't run the pool
312 completely out of space, due to unaccounted changes (e.g. to the MOS).
313 It also limits the worst-case time to allocate space. If we have
314 less than this amount of free space, most ZPL operations (e.g. write,
315 create) will return ENOSPC.
323 \fBzfetch_array_rd_sz\fR (ulong)
326 If prefetching is enabled, disable prefetching for reads larger than this size.
328 Default value: \fB1,048,576\fR.
334 \fBzfetch_block_cap\fR (uint)
337 Max number of blocks to prefetch at a time
339 Default value: \fB256\fR.
345 \fBzfetch_max_streams\fR (uint)
348 Max number of streams per zfetch (prefetch streams per file).
350 Default value: \fB8\fR.
356 \fBzfetch_min_sec_reap\fR (uint)
359 Min time before an active prefetch stream can be reclaimed
361 Default value: \fB2\fR.
367 \fBzfs_arc_average_blocksize\fR (int)
370 The ARC's buffer hash table is sized based on the assumption of an average
371 block size of \fBzfs_arc_average_blocksize\fR (default 8K). This works out
372 to roughly 1MB of hash table per 1GB of physical memory with 8-byte pointers.
373 For configurations with a known larger average block size this value can be
374 increased to reduce the memory footprint.
377 Default value: \fB8192\fR.
383 \fBzfs_arc_evict_batch_limit\fR (int)
386 Number ARC headers to evict per sub-list before proceeding to another sub-list.
387 This batch-style operation prevents entire sub-lists from being evicted at once
388 but comes at a cost of additional unlocking and locking.
390 Default value: \fB10\fR.
396 \fBzfs_arc_grow_retry\fR (int)
399 Seconds before growing arc size
401 Default value: \fB5\fR.
407 \fBzfs_arc_lotsfree_percent\fR (int)
410 Throttle I/O when free system memory drops below this percentage of total
411 system memory. Setting this value to 0 will disable the throttle.
413 Default value: \fB10\fR.
419 \fBzfs_arc_max\fR (ulong)
424 Default value: \fB0\fR.
430 \fBzfs_arc_meta_limit\fR (ulong)
433 The maximum allowed size in bytes that meta data buffers are allowed to
434 consume in the ARC. When this limit is reached meta data buffers will
435 be reclaimed even if the overall arc_c_max has not been reached. This
436 value defaults to 0 which indicates that 3/4 of the ARC may be used
439 Default value: \fB0\fR.
445 \fBzfs_arc_meta_min\fR (ulong)
448 The minimum allowed size in bytes that meta data buffers may consume in
449 the ARC. This value defaults to 0 which disables a floor on the amount
450 of the ARC devoted meta data.
452 Default value: \fB0\fR.
458 \fBzfs_arc_meta_prune\fR (int)
461 The number of dentries and inodes to be scanned looking for entries
462 which can be dropped. This may be required when the ARC reaches the
463 \fBzfs_arc_meta_limit\fR because dentries and inodes can pin buffers
464 in the ARC. Increasing this value will cause to dentry and inode caches
465 to be pruned more aggressively. Setting this value to 0 will disable
466 pruning the inode and dentry caches.
468 Default value: \fB10,000\fR.
474 \fBzfs_arc_meta_adjust_restarts\fR (ulong)
477 The number of restart passes to make while scanning the ARC attempting
478 the free buffers in order to stay below the \fBzfs_arc_meta_limit\fR.
479 This value should not need to be tuned but is available to facilitate
480 performance analysis.
482 Default value: \fB4096\fR.
488 \fBzfs_arc_min\fR (ulong)
493 Default value: \fB100\fR.
499 \fBzfs_arc_min_prefetch_lifespan\fR (int)
502 Min life of prefetch block
504 Default value: \fB100\fR.
510 \fBzfs_arc_num_sublists_per_state\fR (int)
513 To allow more fine-grained locking, each ARC state contains a series
514 of lists for both data and meta data objects. Locking is performed at
515 the level of these "sub-lists". This parameters controls the number of
516 sub-lists per ARC state.
518 Default value: 1 or the number of on-online CPUs, whichever is greater
524 \fBzfs_arc_overflow_shift\fR (int)
527 The ARC size is considered to be overflowing if it exceeds the current
528 ARC target size (arc_c) by a threshold determined by this parameter.
529 The threshold is calculated as a fraction of arc_c using the formula
530 "arc_c >> \fBzfs_arc_overflow_shift\fR".
532 The default value of 8 causes the ARC to be considered to be overflowing
533 if it exceeds the target size by 1/256th (0.3%) of the target size.
535 When the ARC is overflowing, new buffer allocations are stalled until
536 the reclaim thread catches up and the overflow condition no longer exists.
538 Default value: \fB8\fR.
545 \fBzfs_arc_p_min_shift\fR (int)
548 arc_c shift to calc min/max arc_p
550 Default value: \fB4\fR.
556 \fBzfs_arc_p_aggressive_disable\fR (int)
559 Disable aggressive arc_p growth
561 Use \fB1\fR for yes (default) and \fB0\fR to disable.
567 \fBzfs_arc_p_dampener_disable\fR (int)
570 Disable arc_p adapt dampener
572 Use \fB1\fR for yes (default) and \fB0\fR to disable.
578 \fBzfs_arc_shrink_shift\fR (int)
581 log2(fraction of arc to reclaim)
583 Default value: \fB5\fR.
589 \fBzfs_arc_sys_free\fR (ulong)
592 The target number of bytes the ARC should leave as free memory on the system.
593 Defaults to the larger of 1/64 of physical memory or 512K. Setting this
594 option to a non-zero value will override the default.
596 Default value: \fB0\fR.
602 \fBzfs_autoimport_disable\fR (int)
605 Disable pool import at module load by ignoring the cache file (typically \fB/etc/zfs/zpool.cache\fR).
607 Use \fB1\fR for yes (default) and \fB0\fR for no.
613 \fBzfs_dbgmsg_enable\fR (int)
616 Internally ZFS keeps a small log to facilitate debugging. By default the log
617 is disabled, to enable it set this option to 1. The contents of the log can
618 be accessed by reading the /proc/spl/kstat/zfs/dbgmsg file. Writing 0 to
619 this proc file clears the log.
621 Default value: \fB0\fR.
627 \fBzfs_dbgmsg_maxsize\fR (int)
630 The maximum size in bytes of the internal ZFS debug log.
632 Default value: \fB4M\fR.
638 \fBzfs_dbuf_state_index\fR (int)
641 Calculate arc header index
643 Default value: \fB0\fR.
649 \fBzfs_deadman_enabled\fR (int)
654 Use \fB1\fR for yes (default) and \fB0\fR to disable.
660 \fBzfs_deadman_synctime_ms\fR (ulong)
663 Expiration time in milliseconds. This value has two meanings. First it is
664 used to determine when the spa_deadman() logic should fire. By default the
665 spa_deadman() will fire if spa_sync() has not completed in 1000 seconds.
666 Secondly, the value determines if an I/O is considered "hung". Any I/O that
667 has not completed in zfs_deadman_synctime_ms is considered "hung" resulting
668 in a zevent being logged.
670 Default value: \fB1,000,000\fR.
676 \fBzfs_dedup_prefetch\fR (int)
679 Enable prefetching dedup-ed blks
681 Use \fB1\fR for yes and \fB0\fR to disable (default).
687 \fBzfs_delay_min_dirty_percent\fR (int)
690 Start to delay each transaction once there is this amount of dirty data,
691 expressed as a percentage of \fBzfs_dirty_data_max\fR.
692 This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
693 See the section "ZFS TRANSACTION DELAY".
695 Default value: \fB60\fR.
701 \fBzfs_delay_scale\fR (int)
704 This controls how quickly the transaction delay approaches infinity.
705 Larger values cause longer delays for a given amount of dirty data.
707 For the smoothest delay, this value should be about 1 billion divided
708 by the maximum number of operations per second. This will smoothly
709 handle between 10x and 1/10th this number.
711 See the section "ZFS TRANSACTION DELAY".
713 Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
715 Default value: \fB500,000\fR.
721 \fBzfs_dirty_data_max\fR (int)
724 Determines the dirty space limit in bytes. Once this limit is exceeded, new
725 writes are halted until space frees up. This parameter takes precedence
726 over \fBzfs_dirty_data_max_percent\fR.
727 See the section "ZFS TRANSACTION DELAY".
729 Default value: 10 percent of all memory, capped at \fBzfs_dirty_data_max_max\fR.
735 \fBzfs_dirty_data_max_max\fR (int)
738 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
739 This limit is only enforced at module load time, and will be ignored if
740 \fBzfs_dirty_data_max\fR is later changed. This parameter takes
741 precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
742 "ZFS TRANSACTION DELAY".
744 Default value: 25% of physical RAM.
750 \fBzfs_dirty_data_max_max_percent\fR (int)
753 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
754 percentage of physical RAM. This limit is only enforced at module load
755 time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
756 The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
757 one. See the section "ZFS TRANSACTION DELAY".
765 \fBzfs_dirty_data_max_percent\fR (int)
768 Determines the dirty space limit, expressed as a percentage of all
769 memory. Once this limit is exceeded, new writes are halted until space frees
770 up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
771 one. See the section "ZFS TRANSACTION DELAY".
773 Default value: 10%, subject to \fBzfs_dirty_data_max_max\fR.
779 \fBzfs_dirty_data_sync\fR (int)
782 Start syncing out a transaction group if there is at least this much dirty data.
784 Default value: \fB67,108,864\fR.
790 \fBzfs_free_max_blocks\fR (ulong)
793 Maximum number of blocks freed in a single txg.
795 Default value: \fB100,000\fR.
801 \fBzfs_vdev_async_read_max_active\fR (int)
804 Maxium asynchronous read I/Os active to each device.
805 See the section "ZFS I/O SCHEDULER".
807 Default value: \fB3\fR.
813 \fBzfs_vdev_async_read_min_active\fR (int)
816 Minimum asynchronous read I/Os active to each device.
817 See the section "ZFS I/O SCHEDULER".
819 Default value: \fB1\fR.
825 \fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
828 When the pool has more than
829 \fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
830 \fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
831 the dirty data is between min and max, the active I/O limit is linearly
832 interpolated. See the section "ZFS I/O SCHEDULER".
834 Default value: \fB60\fR.
840 \fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
843 When the pool has less than
844 \fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
845 \fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
846 the dirty data is between min and max, the active I/O limit is linearly
847 interpolated. See the section "ZFS I/O SCHEDULER".
849 Default value: \fB30\fR.
855 \fBzfs_vdev_async_write_max_active\fR (int)
858 Maxium asynchronous write I/Os active to each device.
859 See the section "ZFS I/O SCHEDULER".
861 Default value: \fB10\fR.
867 \fBzfs_vdev_async_write_min_active\fR (int)
870 Minimum asynchronous write I/Os active to each device.
871 See the section "ZFS I/O SCHEDULER".
873 Default value: \fB1\fR.
879 \fBzfs_vdev_max_active\fR (int)
882 The maximum number of I/Os active to each device. Ideally, this will be >=
883 the sum of each queue's max_active. It must be at least the sum of each
884 queue's min_active. See the section "ZFS I/O SCHEDULER".
886 Default value: \fB1,000\fR.
892 \fBzfs_vdev_scrub_max_active\fR (int)
895 Maxium scrub I/Os active to each device.
896 See the section "ZFS I/O SCHEDULER".
898 Default value: \fB2\fR.
904 \fBzfs_vdev_scrub_min_active\fR (int)
907 Minimum scrub I/Os active to each device.
908 See the section "ZFS I/O SCHEDULER".
910 Default value: \fB1\fR.
916 \fBzfs_vdev_sync_read_max_active\fR (int)
919 Maxium synchronous read I/Os active to each device.
920 See the section "ZFS I/O SCHEDULER".
922 Default value: \fB10\fR.
928 \fBzfs_vdev_sync_read_min_active\fR (int)
931 Minimum synchronous read I/Os active to each device.
932 See the section "ZFS I/O SCHEDULER".
934 Default value: \fB10\fR.
940 \fBzfs_vdev_sync_write_max_active\fR (int)
943 Maxium synchronous write I/Os active to each device.
944 See the section "ZFS I/O SCHEDULER".
946 Default value: \fB10\fR.
952 \fBzfs_vdev_sync_write_min_active\fR (int)
955 Minimum synchronous write I/Os active to each device.
956 See the section "ZFS I/O SCHEDULER".
958 Default value: \fB10\fR.
964 \fBzfs_disable_dup_eviction\fR (int)
967 Disable duplicate buffer eviction
969 Use \fB1\fR for yes and \fB0\fR for no (default).
975 \fBzfs_expire_snapshot\fR (int)
978 Seconds to expire .zfs/snapshot
980 Default value: \fB300\fR.
986 \fBzfs_admin_snapshot\fR (int)
989 Allow the creation, removal, or renaming of entries in the .zfs/snapshot
990 directory to cause the creation, destruction, or renaming of snapshots.
991 When enabled this functionality works both locally and over NFS exports
992 which have the 'no_root_squash' option set. This functionality is disabled
995 Use \fB1\fR for yes and \fB0\fR for no (default).
1001 \fBzfs_flags\fR (int)
1004 Set additional debugging flags. The following flags may be bitwise-or'd
1016 Enable dprintf entries in the debug log.
1018 2 ZFS_DEBUG_DBUF_VERIFY *
1019 Enable extra dbuf verifications.
1021 4 ZFS_DEBUG_DNODE_VERIFY *
1022 Enable extra dnode verifications.
1024 8 ZFS_DEBUG_SNAPNAMES
1025 Enable snapshot name verification.
1028 Check for illegally modified ARC buffers.
1031 Enable spa_dbgmsg entries in the debug log.
1033 64 ZFS_DEBUG_ZIO_FREE
1034 Enable verification of block frees.
1036 128 ZFS_DEBUG_HISTOGRAM_VERIFY
1037 Enable extra spacemap histogram verifications.
1040 * Requires debug build.
1042 Default value: \fB0\fR.
1048 \fBzfs_free_leak_on_eio\fR (int)
1051 If destroy encounters an EIO while reading metadata (e.g. indirect
1052 blocks), space referenced by the missing metadata can not be freed.
1053 Normally this causes the background destroy to become "stalled", as
1054 it is unable to make forward progress. While in this stalled state,
1055 all remaining space to free from the error-encountering filesystem is
1056 "temporarily leaked". Set this flag to cause it to ignore the EIO,
1057 permanently leak the space from indirect blocks that can not be read,
1058 and continue to free everything else that it can.
1060 The default, "stalling" behavior is useful if the storage partially
1061 fails (i.e. some but not all i/os fail), and then later recovers. In
1062 this case, we will be able to continue pool operations while it is
1063 partially failed, and when it recovers, we can continue to free the
1064 space, with no leaks. However, note that this case is actually
1067 Typically pools either (a) fail completely (but perhaps temporarily,
1068 e.g. a top-level vdev going offline), or (b) have localized,
1069 permanent errors (e.g. disk returns the wrong data due to bit flip or
1070 firmware bug). In case (a), this setting does not matter because the
1071 pool will be suspended and the sync thread will not be able to make
1072 forward progress regardless. In case (b), because the error is
1073 permanent, the best we can do is leak the minimum amount of space,
1074 which is what setting this flag will do. Therefore, it is reasonable
1075 for this flag to normally be set, but we chose the more conservative
1076 approach of not setting it, so that there is no possibility of
1077 leaking space in the "partial temporary" failure case.
1079 Default value: \fB0\fR.
1085 \fBzfs_free_min_time_ms\fR (int)
1088 Min millisecs to free per txg
1090 Default value: \fB1,000\fR.
1096 \fBzfs_immediate_write_sz\fR (long)
1099 Largest data block to write to zil
1101 Default value: \fB32,768\fR.
1107 \fBzfs_max_recordsize\fR (int)
1110 We currently support block sizes from 512 bytes to 16MB. The benefits of
1111 larger blocks, and thus larger IO, need to be weighed against the cost of
1112 COWing a giant block to modify one byte. Additionally, very large blocks
1113 can have an impact on i/o latency, and also potentially on the memory
1114 allocator. Therefore, we do not allow the recordsize to be set larger than
1115 zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1116 this tunable, and pools with larger blocks can always be imported and used,
1117 regardless of this setting.
1119 Default value: \fB1,048,576\fR.
1125 \fBzfs_mdcomp_disable\fR (int)
1128 Disable meta data compression
1130 Use \fB1\fR for yes and \fB0\fR for no (default).
1136 \fBzfs_metaslab_fragmentation_threshold\fR (int)
1139 Allow metaslabs to keep their active state as long as their fragmentation
1140 percentage is less than or equal to this value. An active metaslab that
1141 exceeds this threshold will no longer keep its active status allowing
1142 better metaslabs to be selected.
1144 Default value: \fB70\fR.
1150 \fBzfs_mg_fragmentation_threshold\fR (int)
1153 Metaslab groups are considered eligible for allocations if their
1154 fragmenation metric (measured as a percentage) is less than or equal to
1155 this value. If a metaslab group exceeds this threshold then it will be
1156 skipped unless all metaslab groups within the metaslab class have also
1157 crossed this threshold.
1159 Default value: \fB85\fR.
1165 \fBzfs_mg_noalloc_threshold\fR (int)
1168 Defines a threshold at which metaslab groups should be eligible for
1169 allocations. The value is expressed as a percentage of free space
1170 beyond which a metaslab group is always eligible for allocations.
1171 If a metaslab group's free space is less than or equal to the
1172 the threshold, the allocator will avoid allocating to that group
1173 unless all groups in the pool have reached the threshold. Once all
1174 groups have reached the threshold, all groups are allowed to accept
1175 allocations. The default value of 0 disables the feature and causes
1176 all metaslab groups to be eligible for allocations.
1178 This parameter allows to deal with pools having heavily imbalanced
1179 vdevs such as would be the case when a new vdev has been added.
1180 Setting the threshold to a non-zero percentage will stop allocations
1181 from being made to vdevs that aren't filled to the specified percentage
1182 and allow lesser filled vdevs to acquire more allocations than they
1183 otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1185 Default value: \fB0\fR.
1191 \fBzfs_no_scrub_io\fR (int)
1194 Set for no scrub I/O
1196 Use \fB1\fR for yes and \fB0\fR for no (default).
1202 \fBzfs_no_scrub_prefetch\fR (int)
1205 Set for no scrub prefetching
1207 Use \fB1\fR for yes and \fB0\fR for no (default).
1213 \fBzfs_nocacheflush\fR (int)
1216 Disable cache flushes
1218 Use \fB1\fR for yes and \fB0\fR for no (default).
1224 \fBzfs_nopwrite_enabled\fR (int)
1229 Use \fB1\fR for yes (default) and \fB0\fR to disable.
1235 \fBzfs_pd_bytes_max\fR (int)
1238 The number of bytes which should be prefetched.
1240 Default value: \fB52,428,800\fR.
1246 \fBzfs_prefetch_disable\fR (int)
1249 Disable all ZFS prefetching
1251 Use \fB1\fR for yes and \fB0\fR for no (default).
1257 \fBzfs_read_chunk_size\fR (long)
1260 Bytes to read per chunk
1262 Default value: \fB1,048,576\fR.
1268 \fBzfs_read_history\fR (int)
1271 Historic statistics for the last N reads
1273 Default value: \fB0\fR.
1279 \fBzfs_read_history_hits\fR (int)
1282 Include cache hits in read history
1284 Use \fB1\fR for yes and \fB0\fR for no (default).
1290 \fBzfs_recover\fR (int)
1293 Set to attempt to recover from fatal errors. This should only be used as a
1294 last resort, as it typically results in leaked space, or worse.
1296 Use \fB1\fR for yes and \fB0\fR for no (default).
1302 \fBzfs_resilver_delay\fR (int)
1305 Number of ticks to delay prior to issuing a resilver I/O operation when
1306 a non-resilver or non-scrub I/O operation has occurred within the past
1307 \fBzfs_scan_idle\fR ticks.
1309 Default value: \fB2\fR.
1315 \fBzfs_resilver_min_time_ms\fR (int)
1318 Min millisecs to resilver per txg
1320 Default value: \fB3,000\fR.
1326 \fBzfs_scan_idle\fR (int)
1329 Idle window in clock ticks. During a scrub or a resilver, if
1330 a non-scrub or non-resilver I/O operation has occurred during this
1331 window, the next scrub or resilver operation is delayed by, respectively
1332 \fBzfs_scrub_delay\fR or \fBzfs_resilver_delay\fR ticks.
1334 Default value: \fB50\fR.
1340 \fBzfs_scan_min_time_ms\fR (int)
1343 Min millisecs to scrub per txg
1345 Default value: \fB1,000\fR.
1351 \fBzfs_scrub_delay\fR (int)
1354 Number of ticks to delay prior to issuing a scrub I/O operation when
1355 a non-scrub or non-resilver I/O operation has occurred within the past
1356 \fBzfs_scan_idle\fR ticks.
1358 Default value: \fB4\fR.
1364 \fBzfs_send_corrupt_data\fR (int)
1367 Allow to send corrupt data (ignore read/checksum errors when sending data)
1369 Use \fB1\fR for yes and \fB0\fR for no (default).
1375 \fBzfs_sync_pass_deferred_free\fR (int)
1378 Defer frees starting in this pass
1380 Default value: \fB2\fR.
1386 \fBzfs_sync_pass_dont_compress\fR (int)
1389 Don't compress starting in this pass
1391 Default value: \fB5\fR.
1397 \fBzfs_sync_pass_rewrite\fR (int)
1400 Rewrite new bps starting in this pass
1402 Default value: \fB2\fR.
1408 \fBzfs_top_maxinflight\fR (int)
1411 Max I/Os per top-level vdev during scrub or resilver operations.
1413 Default value: \fB32\fR.
1419 \fBzfs_txg_history\fR (int)
1422 Historic statistics for the last N txgs
1424 Default value: \fB0\fR.
1430 \fBzfs_txg_timeout\fR (int)
1433 Max seconds worth of delta per txg
1435 Default value: \fB5\fR.
1441 \fBzfs_vdev_aggregation_limit\fR (int)
1444 Max vdev I/O aggregation size
1446 Default value: \fB131,072\fR.
1452 \fBzfs_vdev_cache_bshift\fR (int)
1455 Shift size to inflate reads too
1457 Default value: \fB16\fR.
1463 \fBzfs_vdev_cache_max\fR (int)
1466 Inflate reads small than max
1472 \fBzfs_vdev_cache_size\fR (int)
1475 Total size of the per-disk cache
1477 Default value: \fB0\fR.
1483 \fBzfs_vdev_mirror_switch_us\fR (int)
1486 Switch mirrors every N usecs
1488 Default value: \fB10,000\fR.
1494 \fBzfs_vdev_read_gap_limit\fR (int)
1497 Aggregate read I/O over gap
1499 Default value: \fB32,768\fR.
1505 \fBzfs_vdev_scheduler\fR (charp)
1510 Default value: \fBnoop\fR.
1516 \fBzfs_vdev_write_gap_limit\fR (int)
1519 Aggregate write I/O over gap
1521 Default value: \fB4,096\fR.
1527 \fBzfs_zevent_cols\fR (int)
1530 Max event column width
1532 Default value: \fB80\fR.
1538 \fBzfs_zevent_console\fR (int)
1541 Log events to the console
1543 Use \fB1\fR for yes and \fB0\fR for no (default).
1549 \fBzfs_zevent_len_max\fR (int)
1552 Max event queue length
1554 Default value: \fB0\fR.
1560 \fBzil_replay_disable\fR (int)
1563 Disable intent logging replay
1565 Use \fB1\fR for yes and \fB0\fR for no (default).
1571 \fBzil_slog_limit\fR (ulong)
1574 Max commit bytes to separate log device
1576 Default value: \fB1,048,576\fR.
1582 \fBzio_delay_max\fR (int)
1585 Max zio millisec delay before posting event
1587 Default value: \fB30,000\fR.
1593 \fBzio_requeue_io_start_cut_in_line\fR (int)
1596 Prioritize requeued I/O
1598 Default value: \fB0\fR.
1604 \fBzvol_inhibit_dev\fR (uint)
1607 Do not create zvol device nodes
1609 Use \fB1\fR for yes and \fB0\fR for no (default).
1615 \fBzvol_major\fR (uint)
1618 Major number for zvol device
1620 Default value: \fB230\fR.
1626 \fBzvol_max_discard_blocks\fR (ulong)
1629 Max number of blocks to discard at once
1631 Default value: \fB16,384\fR.
1637 \fBzvol_prefetch_bytes\fR (uint)
1640 When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
1641 from the start and end of the volume. Prefetching these regions
1642 of the volume is desirable because they are likely to be accessed
1643 immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
1646 Default value: \fB131,072\fR.
1649 .SH ZFS I/O SCHEDULER
1650 ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
1651 The I/O scheduler determines when and in what order those operations are
1652 issued. The I/O scheduler divides operations into five I/O classes
1653 prioritized in the following order: sync read, sync write, async read,
1654 async write, and scrub/resilver. Each queue defines the minimum and
1655 maximum number of concurrent operations that may be issued to the
1656 device. In addition, the device has an aggregate maximum,
1657 \fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
1658 must not exceed the aggregate maximum. If the sum of the per-queue
1659 maximums exceeds the aggregate maximum, then the number of active I/Os
1660 may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
1661 be issued regardless of whether all per-queue minimums have been met.
1663 For many physical devices, throughput increases with the number of
1664 concurrent operations, but latency typically suffers. Further, physical
1665 devices typically have a limit at which more concurrent operations have no
1666 effect on throughput or can actually cause it to decrease.
1668 The scheduler selects the next operation to issue by first looking for an
1669 I/O class whose minimum has not been satisfied. Once all are satisfied and
1670 the aggregate maximum has not been hit, the scheduler looks for classes
1671 whose maximum has not been satisfied. Iteration through the I/O classes is
1672 done in the order specified above. No further operations are issued if the
1673 aggregate maximum number of concurrent operations has been hit or if there
1674 are no operations queued for an I/O class that has not hit its maximum.
1675 Every time an I/O is queued or an operation completes, the I/O scheduler
1676 looks for new operations to issue.
1678 In general, smaller max_active's will lead to lower latency of synchronous
1679 operations. Larger max_active's may lead to higher overall throughput,
1680 depending on underlying storage.
1682 The ratio of the queues' max_actives determines the balance of performance
1683 between reads, writes, and scrubs. E.g., increasing
1684 \fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
1685 more quickly, but reads and writes to have higher latency and lower throughput.
1687 All I/O classes have a fixed maximum number of outstanding operations
1688 except for the async write class. Asynchronous writes represent the data
1689 that is committed to stable storage during the syncing stage for
1690 transaction groups. Transaction groups enter the syncing state
1691 periodically so the number of queued async writes will quickly burst up
1692 and then bleed down to zero. Rather than servicing them as quickly as
1693 possible, the I/O scheduler changes the maximum number of active async
1694 write I/Os according to the amount of dirty data in the pool. Since
1695 both throughput and latency typically increase with the number of
1696 concurrent operations issued to physical devices, reducing the
1697 burstiness in the number of concurrent operations also stabilizes the
1698 response time of operations from other -- and in particular synchronous
1699 -- queues. In broad strokes, the I/O scheduler will issue more
1700 concurrent operations from the async write queue as there's more dirty
1705 The number of concurrent operations issued for the async write I/O class
1706 follows a piece-wise linear function defined by a few adjustable points.
1709 | o---------| <-- zfs_vdev_async_write_max_active
1716 |-------o | | <-- zfs_vdev_async_write_min_active
1717 0|_______^______|_________|
1718 0% | | 100% of zfs_dirty_data_max
1720 | `-- zfs_vdev_async_write_active_max_dirty_percent
1721 `--------- zfs_vdev_async_write_active_min_dirty_percent
1724 Until the amount of dirty data exceeds a minimum percentage of the dirty
1725 data allowed in the pool, the I/O scheduler will limit the number of
1726 concurrent operations to the minimum. As that threshold is crossed, the
1727 number of concurrent operations issued increases linearly to the maximum at
1728 the specified maximum percentage of the dirty data allowed in the pool.
1730 Ideally, the amount of dirty data on a busy pool will stay in the sloped
1731 part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
1732 and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
1733 maximum percentage, this indicates that the rate of incoming data is
1734 greater than the rate that the backend storage can handle. In this case, we
1735 must further throttle incoming writes, as described in the next section.
1737 .SH ZFS TRANSACTION DELAY
1738 We delay transactions when we've determined that the backend storage
1739 isn't able to accommodate the rate of incoming writes.
1741 If there is already a transaction waiting, we delay relative to when
1742 that transaction will finish waiting. This way the calculated delay time
1743 is independent of the number of threads concurrently executing
1746 If we are the only waiter, wait relative to when the transaction
1747 started, rather than the current time. This credits the transaction for
1748 "time already served", e.g. reading indirect blocks.
1750 The minimum time for a transaction to take is calculated as:
1752 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
1753 min_time is then capped at 100 milliseconds.
1756 The delay has two degrees of freedom that can be adjusted via tunables. The
1757 percentage of dirty data at which we start to delay is defined by
1758 \fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
1759 \fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
1760 delay after writing at full speed has failed to keep up with the incoming write
1761 rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
1762 this variable determines the amount of delay at the midpoint of the curve.
1766 10ms +-------------------------------------------------------------*+
1782 2ms + (midpoint) * +
1785 | zfs_delay_scale ----------> ******** |
1786 0 +-------------------------------------*********----------------+
1787 0% <- zfs_dirty_data_max -> 100%
1790 Note that since the delay is added to the outstanding time remaining on the
1791 most recent transaction, the delay is effectively the inverse of IOPS.
1792 Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
1793 was chosen such that small changes in the amount of accumulated dirty data
1794 in the first 3/4 of the curve yield relatively small differences in the
1797 The effects can be easier to understand when the amount of delay is
1798 represented on a log scale:
1802 100ms +-------------------------------------------------------------++
1811 + zfs_delay_scale ----------> ***** +
1822 +--------------------------------------------------------------+
1823 0% <- zfs_dirty_data_max -> 100%
1826 Note here that only as the amount of dirty data approaches its limit does
1827 the delay start to increase rapidly. The goal of a properly tuned system
1828 should be to keep the amount of dirty data out of that range by first
1829 ensuring that the appropriate limits are set for the I/O scheduler to reach
1830 optimal throughput on the backend storage, and then by changing the value
1831 of \fBzfs_delay_scale\fR to increase the steepness of the curve.