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 \fBzfetch_array_rd_sz\fR (ulong)
310 If prefetching is enabled, disable prefetching for reads larger than this size.
312 Default value: \fB1,048,576\fR.
318 \fBzfetch_block_cap\fR (uint)
321 Max number of blocks to prefetch at a time
323 Default value: \fB256\fR.
329 \fBzfetch_max_streams\fR (uint)
332 Max number of streams per zfetch (prefetch streams per file).
334 Default value: \fB8\fR.
340 \fBzfetch_min_sec_reap\fR (uint)
343 Min time before an active prefetch stream can be reclaimed
345 Default value: \fB2\fR.
351 \fBzfs_arc_average_blocksize\fR (int)
354 The ARC's buffer hash table is sized based on the assumption of an average
355 block size of \fBzfs_arc_average_blocksize\fR (default 8K). This works out
356 to roughly 1MB of hash table per 1GB of physical memory with 8-byte pointers.
357 For configurations with a known larger average block size this value can be
358 increased to reduce the memory footprint.
361 Default value: \fB8192\fR.
367 \fBzfs_arc_evict_batch_limit\fR (int)
370 Number ARC headers to evict per sub-list before proceeding to another sub-list.
371 This batch-style operation prevents entire sub-lists from being evicted at once
372 but comes at a cost of additional unlocking and locking.
374 Default value: \fB10\fR.
380 \fBzfs_arc_grow_retry\fR (int)
383 Seconds before growing arc size
385 Default value: \fB5\fR.
391 \fBzfs_arc_lotsfree_percent\fR (int)
394 Throttle I/O when free system memory drops below this percentage of total
395 system memory. Setting this value to 0 will disable the throttle.
397 Default value: \fB10\fR.
403 \fBzfs_arc_max\fR (ulong)
408 Default value: \fB0\fR.
414 \fBzfs_arc_meta_limit\fR (ulong)
417 The maximum allowed size in bytes that meta data buffers are allowed to
418 consume in the ARC. When this limit is reached meta data buffers will
419 be reclaimed even if the overall arc_c_max has not been reached. This
420 value defaults to 0 which indicates that 3/4 of the ARC may be used
423 Default value: \fB0\fR.
429 \fBzfs_arc_meta_min\fR (ulong)
432 The minimum allowed size in bytes that meta data buffers may consume in
433 the ARC. This value defaults to 0 which disables a floor on the amount
434 of the ARC devoted meta data.
436 Default value: \fB0\fR.
442 \fBzfs_arc_meta_prune\fR (int)
445 The number of dentries and inodes to be scanned looking for entries
446 which can be dropped. This may be required when the ARC reaches the
447 \fBzfs_arc_meta_limit\fR because dentries and inodes can pin buffers
448 in the ARC. Increasing this value will cause to dentry and inode caches
449 to be pruned more aggressively. Setting this value to 0 will disable
450 pruning the inode and dentry caches.
452 Default value: \fB10,000\fR.
458 \fBzfs_arc_meta_adjust_restarts\fR (ulong)
461 The number of restart passes to make while scanning the ARC attempting
462 the free buffers in order to stay below the \fBzfs_arc_meta_limit\fR.
463 This value should not need to be tuned but is available to facilitate
464 performance analysis.
466 Default value: \fB4096\fR.
472 \fBzfs_arc_min\fR (ulong)
477 Default value: \fB100\fR.
483 \fBzfs_arc_min_prefetch_lifespan\fR (int)
486 Min life of prefetch block
488 Default value: \fB100\fR.
494 \fBzfs_arc_num_sublists_per_state\fR (int)
497 To allow more fine-grained locking, each ARC state contains a series
498 of lists for both data and meta data objects. Locking is performed at
499 the level of these "sub-lists". This parameters controls the number of
500 sub-lists per ARC state.
502 Default value: 1 or the number of on-online CPUs, whichever is greater
508 \fBzfs_arc_overflow_shift\fR (int)
511 The ARC size is considered to be overflowing if it exceeds the current
512 ARC target size (arc_c) by a threshold determined by this parameter.
513 The threshold is calculated as a fraction of arc_c using the formula
514 "arc_c >> \fBzfs_arc_overflow_shift\fR".
516 The default value of 8 causes the ARC to be considered to be overflowing
517 if it exceeds the target size by 1/256th (0.3%) of the target size.
519 When the ARC is overflowing, new buffer allocations are stalled until
520 the reclaim thread catches up and the overflow condition no longer exists.
522 Default value: \fB8\fR.
529 \fBzfs_arc_p_min_shift\fR (int)
532 arc_c shift to calc min/max arc_p
534 Default value: \fB4\fR.
540 \fBzfs_arc_p_aggressive_disable\fR (int)
543 Disable aggressive arc_p growth
545 Use \fB1\fR for yes (default) and \fB0\fR to disable.
551 \fBzfs_arc_p_dampener_disable\fR (int)
554 Disable arc_p adapt dampener
556 Use \fB1\fR for yes (default) and \fB0\fR to disable.
562 \fBzfs_arc_shrink_shift\fR (int)
565 log2(fraction of arc to reclaim)
567 Default value: \fB5\fR.
573 \fBzfs_arc_sys_free\fR (ulong)
576 The target number of bytes the ARC should leave as free memory on the system.
577 Defaults to the larger of 1/64 of physical memory or 512K. Setting this
578 option to a non-zero value will override the default.
580 Default value: \fB0\fR.
586 \fBzfs_autoimport_disable\fR (int)
589 Disable pool import at module load by ignoring the cache file (typically \fB/etc/zfs/zpool.cache\fR).
591 Use \fB1\fR for yes (default) and \fB0\fR for no.
597 \fBzfs_dbuf_state_index\fR (int)
600 Calculate arc header index
602 Default value: \fB0\fR.
608 \fBzfs_deadman_enabled\fR (int)
613 Use \fB1\fR for yes (default) and \fB0\fR to disable.
619 \fBzfs_deadman_synctime_ms\fR (ulong)
622 Expiration time in milliseconds. This value has two meanings. First it is
623 used to determine when the spa_deadman() logic should fire. By default the
624 spa_deadman() will fire if spa_sync() has not completed in 1000 seconds.
625 Secondly, the value determines if an I/O is considered "hung". Any I/O that
626 has not completed in zfs_deadman_synctime_ms is considered "hung" resulting
627 in a zevent being logged.
629 Default value: \fB1,000,000\fR.
635 \fBzfs_dedup_prefetch\fR (int)
638 Enable prefetching dedup-ed blks
640 Use \fB1\fR for yes and \fB0\fR to disable (default).
646 \fBzfs_delay_min_dirty_percent\fR (int)
649 Start to delay each transaction once there is this amount of dirty data,
650 expressed as a percentage of \fBzfs_dirty_data_max\fR.
651 This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
652 See the section "ZFS TRANSACTION DELAY".
654 Default value: \fB60\fR.
660 \fBzfs_delay_scale\fR (int)
663 This controls how quickly the transaction delay approaches infinity.
664 Larger values cause longer delays for a given amount of dirty data.
666 For the smoothest delay, this value should be about 1 billion divided
667 by the maximum number of operations per second. This will smoothly
668 handle between 10x and 1/10th this number.
670 See the section "ZFS TRANSACTION DELAY".
672 Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
674 Default value: \fB500,000\fR.
680 \fBzfs_dirty_data_max\fR (int)
683 Determines the dirty space limit in bytes. Once this limit is exceeded, new
684 writes are halted until space frees up. This parameter takes precedence
685 over \fBzfs_dirty_data_max_percent\fR.
686 See the section "ZFS TRANSACTION DELAY".
688 Default value: 10 percent of all memory, capped at \fBzfs_dirty_data_max_max\fR.
694 \fBzfs_dirty_data_max_max\fR (int)
697 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
698 This limit is only enforced at module load time, and will be ignored if
699 \fBzfs_dirty_data_max\fR is later changed. This parameter takes
700 precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
701 "ZFS TRANSACTION DELAY".
703 Default value: 25% of physical RAM.
709 \fBzfs_dirty_data_max_max_percent\fR (int)
712 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
713 percentage of physical RAM. This limit is only enforced at module load
714 time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
715 The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
716 one. See the section "ZFS TRANSACTION DELAY".
724 \fBzfs_dirty_data_max_percent\fR (int)
727 Determines the dirty space limit, expressed as a percentage of all
728 memory. Once this limit is exceeded, new writes are halted until space frees
729 up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
730 one. See the section "ZFS TRANSACTION DELAY".
732 Default value: 10%, subject to \fBzfs_dirty_data_max_max\fR.
738 \fBzfs_dirty_data_sync\fR (int)
741 Start syncing out a transaction group if there is at least this much dirty data.
743 Default value: \fB67,108,864\fR.
749 \fBzfs_free_max_blocks\fR (ulong)
752 Maximum number of blocks freed in a single txg.
754 Default value: \fB100,000\fR.
760 \fBzfs_vdev_async_read_max_active\fR (int)
763 Maxium asynchronous read I/Os active to each device.
764 See the section "ZFS I/O SCHEDULER".
766 Default value: \fB3\fR.
772 \fBzfs_vdev_async_read_min_active\fR (int)
775 Minimum asynchronous read I/Os active to each device.
776 See the section "ZFS I/O SCHEDULER".
778 Default value: \fB1\fR.
784 \fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
787 When the pool has more than
788 \fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
789 \fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
790 the dirty data is between min and max, the active I/O limit is linearly
791 interpolated. See the section "ZFS I/O SCHEDULER".
793 Default value: \fB60\fR.
799 \fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
802 When the pool has less than
803 \fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
804 \fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
805 the dirty data is between min and max, the active I/O limit is linearly
806 interpolated. See the section "ZFS I/O SCHEDULER".
808 Default value: \fB30\fR.
814 \fBzfs_vdev_async_write_max_active\fR (int)
817 Maxium asynchronous write I/Os active to each device.
818 See the section "ZFS I/O SCHEDULER".
820 Default value: \fB10\fR.
826 \fBzfs_vdev_async_write_min_active\fR (int)
829 Minimum asynchronous write I/Os active to each device.
830 See the section "ZFS I/O SCHEDULER".
832 Default value: \fB1\fR.
838 \fBzfs_vdev_max_active\fR (int)
841 The maximum number of I/Os active to each device. Ideally, this will be >=
842 the sum of each queue's max_active. It must be at least the sum of each
843 queue's min_active. See the section "ZFS I/O SCHEDULER".
845 Default value: \fB1,000\fR.
851 \fBzfs_vdev_scrub_max_active\fR (int)
854 Maxium scrub I/Os active to each device.
855 See the section "ZFS I/O SCHEDULER".
857 Default value: \fB2\fR.
863 \fBzfs_vdev_scrub_min_active\fR (int)
866 Minimum scrub I/Os active to each device.
867 See the section "ZFS I/O SCHEDULER".
869 Default value: \fB1\fR.
875 \fBzfs_vdev_sync_read_max_active\fR (int)
878 Maxium synchronous read I/Os active to each device.
879 See the section "ZFS I/O SCHEDULER".
881 Default value: \fB10\fR.
887 \fBzfs_vdev_sync_read_min_active\fR (int)
890 Minimum synchronous read I/Os active to each device.
891 See the section "ZFS I/O SCHEDULER".
893 Default value: \fB10\fR.
899 \fBzfs_vdev_sync_write_max_active\fR (int)
902 Maxium synchronous write I/Os active to each device.
903 See the section "ZFS I/O SCHEDULER".
905 Default value: \fB10\fR.
911 \fBzfs_vdev_sync_write_min_active\fR (int)
914 Minimum synchronous write I/Os active to each device.
915 See the section "ZFS I/O SCHEDULER".
917 Default value: \fB10\fR.
923 \fBzfs_disable_dup_eviction\fR (int)
926 Disable duplicate buffer eviction
928 Use \fB1\fR for yes and \fB0\fR for no (default).
934 \fBzfs_expire_snapshot\fR (int)
937 Seconds to expire .zfs/snapshot
939 Default value: \fB300\fR.
945 \fBzfs_flags\fR (int)
948 Set additional debugging flags. The following flags may be bitwise-or'd
960 Enable dprintf entries in the debug log.
962 2 ZFS_DEBUG_DBUF_VERIFY *
963 Enable extra dbuf verifications.
965 4 ZFS_DEBUG_DNODE_VERIFY *
966 Enable extra dnode verifications.
968 8 ZFS_DEBUG_SNAPNAMES
969 Enable snapshot name verification.
972 Check for illegally modified ARC buffers.
975 Enable spa_dbgmsg entries in the debug log.
977 64 ZFS_DEBUG_ZIO_FREE
978 Enable verification of block frees.
980 128 ZFS_DEBUG_HISTOGRAM_VERIFY
981 Enable extra spacemap histogram verifications.
984 * Requires debug build.
986 Default value: \fB0\fR.
992 \fBzfs_free_leak_on_eio\fR (int)
995 If destroy encounters an EIO while reading metadata (e.g. indirect
996 blocks), space referenced by the missing metadata can not be freed.
997 Normally this causes the background destroy to become "stalled", as
998 it is unable to make forward progress. While in this stalled state,
999 all remaining space to free from the error-encountering filesystem is
1000 "temporarily leaked". Set this flag to cause it to ignore the EIO,
1001 permanently leak the space from indirect blocks that can not be read,
1002 and continue to free everything else that it can.
1004 The default, "stalling" behavior is useful if the storage partially
1005 fails (i.e. some but not all i/os fail), and then later recovers. In
1006 this case, we will be able to continue pool operations while it is
1007 partially failed, and when it recovers, we can continue to free the
1008 space, with no leaks. However, note that this case is actually
1011 Typically pools either (a) fail completely (but perhaps temporarily,
1012 e.g. a top-level vdev going offline), or (b) have localized,
1013 permanent errors (e.g. disk returns the wrong data due to bit flip or
1014 firmware bug). In case (a), this setting does not matter because the
1015 pool will be suspended and the sync thread will not be able to make
1016 forward progress regardless. In case (b), because the error is
1017 permanent, the best we can do is leak the minimum amount of space,
1018 which is what setting this flag will do. Therefore, it is reasonable
1019 for this flag to normally be set, but we chose the more conservative
1020 approach of not setting it, so that there is no possibility of
1021 leaking space in the "partial temporary" failure case.
1023 Default value: \fB0\fR.
1029 \fBzfs_free_min_time_ms\fR (int)
1032 Min millisecs to free per txg
1034 Default value: \fB1,000\fR.
1040 \fBzfs_immediate_write_sz\fR (long)
1043 Largest data block to write to zil
1045 Default value: \fB32,768\fR.
1051 \fBzfs_max_recordsize\fR (int)
1054 We currently support block sizes from 512 bytes to 16MB. The benefits of
1055 larger blocks, and thus larger IO, need to be weighed against the cost of
1056 COWing a giant block to modify one byte. Additionally, very large blocks
1057 can have an impact on i/o latency, and also potentially on the memory
1058 allocator. Therefore, we do not allow the recordsize to be set larger than
1059 zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1060 this tunable, and pools with larger blocks can always be imported and used,
1061 regardless of this setting.
1063 Default value: \fB1,048,576\fR.
1069 \fBzfs_mdcomp_disable\fR (int)
1072 Disable meta data compression
1074 Use \fB1\fR for yes and \fB0\fR for no (default).
1080 \fBzfs_metaslab_fragmentation_threshold\fR (int)
1083 Allow metaslabs to keep their active state as long as their fragmentation
1084 percentage is less than or equal to this value. An active metaslab that
1085 exceeds this threshold will no longer keep its active status allowing
1086 better metaslabs to be selected.
1088 Default value: \fB70\fR.
1094 \fBzfs_mg_fragmentation_threshold\fR (int)
1097 Metaslab groups are considered eligible for allocations if their
1098 fragmenation metric (measured as a percentage) is less than or equal to
1099 this value. If a metaslab group exceeds this threshold then it will be
1100 skipped unless all metaslab groups within the metaslab class have also
1101 crossed this threshold.
1103 Default value: \fB85\fR.
1109 \fBzfs_mg_noalloc_threshold\fR (int)
1112 Defines a threshold at which metaslab groups should be eligible for
1113 allocations. The value is expressed as a percentage of free space
1114 beyond which a metaslab group is always eligible for allocations.
1115 If a metaslab group's free space is less than or equal to the
1116 the threshold, the allocator will avoid allocating to that group
1117 unless all groups in the pool have reached the threshold. Once all
1118 groups have reached the threshold, all groups are allowed to accept
1119 allocations. The default value of 0 disables the feature and causes
1120 all metaslab groups to be eligible for allocations.
1122 This parameter allows to deal with pools having heavily imbalanced
1123 vdevs such as would be the case when a new vdev has been added.
1124 Setting the threshold to a non-zero percentage will stop allocations
1125 from being made to vdevs that aren't filled to the specified percentage
1126 and allow lesser filled vdevs to acquire more allocations than they
1127 otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1129 Default value: \fB0\fR.
1135 \fBzfs_no_scrub_io\fR (int)
1138 Set for no scrub I/O
1140 Use \fB1\fR for yes and \fB0\fR for no (default).
1146 \fBzfs_no_scrub_prefetch\fR (int)
1149 Set for no scrub prefetching
1151 Use \fB1\fR for yes and \fB0\fR for no (default).
1157 \fBzfs_nocacheflush\fR (int)
1160 Disable cache flushes
1162 Use \fB1\fR for yes and \fB0\fR for no (default).
1168 \fBzfs_nopwrite_enabled\fR (int)
1173 Use \fB1\fR for yes (default) and \fB0\fR to disable.
1179 \fBzfs_pd_bytes_max\fR (int)
1182 The number of bytes which should be prefetched.
1184 Default value: \fB52,428,800\fR.
1190 \fBzfs_prefetch_disable\fR (int)
1193 Disable all ZFS prefetching
1195 Use \fB1\fR for yes and \fB0\fR for no (default).
1201 \fBzfs_read_chunk_size\fR (long)
1204 Bytes to read per chunk
1206 Default value: \fB1,048,576\fR.
1212 \fBzfs_read_history\fR (int)
1215 Historic statistics for the last N reads
1217 Default value: \fB0\fR.
1223 \fBzfs_read_history_hits\fR (int)
1226 Include cache hits in read history
1228 Use \fB1\fR for yes and \fB0\fR for no (default).
1234 \fBzfs_recover\fR (int)
1237 Set to attempt to recover from fatal errors. This should only be used as a
1238 last resort, as it typically results in leaked space, or worse.
1240 Use \fB1\fR for yes and \fB0\fR for no (default).
1246 \fBzfs_resilver_delay\fR (int)
1249 Number of ticks to delay prior to issuing a resilver I/O operation when
1250 a non-resilver or non-scrub I/O operation has occurred within the past
1251 \fBzfs_scan_idle\fR ticks.
1253 Default value: \fB2\fR.
1259 \fBzfs_resilver_min_time_ms\fR (int)
1262 Min millisecs to resilver per txg
1264 Default value: \fB3,000\fR.
1270 \fBzfs_scan_idle\fR (int)
1273 Idle window in clock ticks. During a scrub or a resilver, if
1274 a non-scrub or non-resilver I/O operation has occurred during this
1275 window, the next scrub or resilver operation is delayed by, respectively
1276 \fBzfs_scrub_delay\fR or \fBzfs_resilver_delay\fR ticks.
1278 Default value: \fB50\fR.
1284 \fBzfs_scan_min_time_ms\fR (int)
1287 Min millisecs to scrub per txg
1289 Default value: \fB1,000\fR.
1295 \fBzfs_scrub_delay\fR (int)
1298 Number of ticks to delay prior to issuing a scrub I/O operation when
1299 a non-scrub or non-resilver I/O operation has occurred within the past
1300 \fBzfs_scan_idle\fR ticks.
1302 Default value: \fB4\fR.
1308 \fBzfs_send_corrupt_data\fR (int)
1311 Allow to send corrupt data (ignore read/checksum errors when sending data)
1313 Use \fB1\fR for yes and \fB0\fR for no (default).
1319 \fBzfs_sync_pass_deferred_free\fR (int)
1322 Defer frees starting in this pass
1324 Default value: \fB2\fR.
1330 \fBzfs_sync_pass_dont_compress\fR (int)
1333 Don't compress starting in this pass
1335 Default value: \fB5\fR.
1341 \fBzfs_sync_pass_rewrite\fR (int)
1344 Rewrite new bps starting in this pass
1346 Default value: \fB2\fR.
1352 \fBzfs_top_maxinflight\fR (int)
1355 Max I/Os per top-level vdev during scrub or resilver operations.
1357 Default value: \fB32\fR.
1363 \fBzfs_txg_history\fR (int)
1366 Historic statistics for the last N txgs
1368 Default value: \fB0\fR.
1374 \fBzfs_txg_timeout\fR (int)
1377 Max seconds worth of delta per txg
1379 Default value: \fB5\fR.
1385 \fBzfs_vdev_aggregation_limit\fR (int)
1388 Max vdev I/O aggregation size
1390 Default value: \fB131,072\fR.
1396 \fBzfs_vdev_cache_bshift\fR (int)
1399 Shift size to inflate reads too
1401 Default value: \fB16\fR.
1407 \fBzfs_vdev_cache_max\fR (int)
1410 Inflate reads small than max
1416 \fBzfs_vdev_cache_size\fR (int)
1419 Total size of the per-disk cache
1421 Default value: \fB0\fR.
1427 \fBzfs_vdev_mirror_switch_us\fR (int)
1430 Switch mirrors every N usecs
1432 Default value: \fB10,000\fR.
1438 \fBzfs_vdev_read_gap_limit\fR (int)
1441 Aggregate read I/O over gap
1443 Default value: \fB32,768\fR.
1449 \fBzfs_vdev_scheduler\fR (charp)
1454 Default value: \fBnoop\fR.
1460 \fBzfs_vdev_write_gap_limit\fR (int)
1463 Aggregate write I/O over gap
1465 Default value: \fB4,096\fR.
1471 \fBzfs_zevent_cols\fR (int)
1474 Max event column width
1476 Default value: \fB80\fR.
1482 \fBzfs_zevent_console\fR (int)
1485 Log events to the console
1487 Use \fB1\fR for yes and \fB0\fR for no (default).
1493 \fBzfs_zevent_len_max\fR (int)
1496 Max event queue length
1498 Default value: \fB0\fR.
1504 \fBzil_replay_disable\fR (int)
1507 Disable intent logging replay
1509 Use \fB1\fR for yes and \fB0\fR for no (default).
1515 \fBzil_slog_limit\fR (ulong)
1518 Max commit bytes to separate log device
1520 Default value: \fB1,048,576\fR.
1526 \fBzio_delay_max\fR (int)
1529 Max zio millisec delay before posting event
1531 Default value: \fB30,000\fR.
1537 \fBzio_requeue_io_start_cut_in_line\fR (int)
1540 Prioritize requeued I/O
1542 Default value: \fB0\fR.
1548 \fBzvol_inhibit_dev\fR (uint)
1551 Do not create zvol device nodes
1553 Use \fB1\fR for yes and \fB0\fR for no (default).
1559 \fBzvol_major\fR (uint)
1562 Major number for zvol device
1564 Default value: \fB230\fR.
1570 \fBzvol_max_discard_blocks\fR (ulong)
1573 Max number of blocks to discard at once
1575 Default value: \fB16,384\fR.
1581 \fBzvol_threads\fR (uint)
1584 Max number of threads to handle zvol I/O requests
1586 Default value: \fB32\fR.
1589 .SH ZFS I/O SCHEDULER
1590 ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
1591 The I/O scheduler determines when and in what order those operations are
1592 issued. The I/O scheduler divides operations into five I/O classes
1593 prioritized in the following order: sync read, sync write, async read,
1594 async write, and scrub/resilver. Each queue defines the minimum and
1595 maximum number of concurrent operations that may be issued to the
1596 device. In addition, the device has an aggregate maximum,
1597 \fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
1598 must not exceed the aggregate maximum. If the sum of the per-queue
1599 maximums exceeds the aggregate maximum, then the number of active I/Os
1600 may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
1601 be issued regardless of whether all per-queue minimums have been met.
1603 For many physical devices, throughput increases with the number of
1604 concurrent operations, but latency typically suffers. Further, physical
1605 devices typically have a limit at which more concurrent operations have no
1606 effect on throughput or can actually cause it to decrease.
1608 The scheduler selects the next operation to issue by first looking for an
1609 I/O class whose minimum has not been satisfied. Once all are satisfied and
1610 the aggregate maximum has not been hit, the scheduler looks for classes
1611 whose maximum has not been satisfied. Iteration through the I/O classes is
1612 done in the order specified above. No further operations are issued if the
1613 aggregate maximum number of concurrent operations has been hit or if there
1614 are no operations queued for an I/O class that has not hit its maximum.
1615 Every time an I/O is queued or an operation completes, the I/O scheduler
1616 looks for new operations to issue.
1618 In general, smaller max_active's will lead to lower latency of synchronous
1619 operations. Larger max_active's may lead to higher overall throughput,
1620 depending on underlying storage.
1622 The ratio of the queues' max_actives determines the balance of performance
1623 between reads, writes, and scrubs. E.g., increasing
1624 \fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
1625 more quickly, but reads and writes to have higher latency and lower throughput.
1627 All I/O classes have a fixed maximum number of outstanding operations
1628 except for the async write class. Asynchronous writes represent the data
1629 that is committed to stable storage during the syncing stage for
1630 transaction groups. Transaction groups enter the syncing state
1631 periodically so the number of queued async writes will quickly burst up
1632 and then bleed down to zero. Rather than servicing them as quickly as
1633 possible, the I/O scheduler changes the maximum number of active async
1634 write I/Os according to the amount of dirty data in the pool. Since
1635 both throughput and latency typically increase with the number of
1636 concurrent operations issued to physical devices, reducing the
1637 burstiness in the number of concurrent operations also stabilizes the
1638 response time of operations from other -- and in particular synchronous
1639 -- queues. In broad strokes, the I/O scheduler will issue more
1640 concurrent operations from the async write queue as there's more dirty
1645 The number of concurrent operations issued for the async write I/O class
1646 follows a piece-wise linear function defined by a few adjustable points.
1649 | o---------| <-- zfs_vdev_async_write_max_active
1656 |-------o | | <-- zfs_vdev_async_write_min_active
1657 0|_______^______|_________|
1658 0% | | 100% of zfs_dirty_data_max
1660 | `-- zfs_vdev_async_write_active_max_dirty_percent
1661 `--------- zfs_vdev_async_write_active_min_dirty_percent
1664 Until the amount of dirty data exceeds a minimum percentage of the dirty
1665 data allowed in the pool, the I/O scheduler will limit the number of
1666 concurrent operations to the minimum. As that threshold is crossed, the
1667 number of concurrent operations issued increases linearly to the maximum at
1668 the specified maximum percentage of the dirty data allowed in the pool.
1670 Ideally, the amount of dirty data on a busy pool will stay in the sloped
1671 part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
1672 and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
1673 maximum percentage, this indicates that the rate of incoming data is
1674 greater than the rate that the backend storage can handle. In this case, we
1675 must further throttle incoming writes, as described in the next section.
1677 .SH ZFS TRANSACTION DELAY
1678 We delay transactions when we've determined that the backend storage
1679 isn't able to accommodate the rate of incoming writes.
1681 If there is already a transaction waiting, we delay relative to when
1682 that transaction will finish waiting. This way the calculated delay time
1683 is independent of the number of threads concurrently executing
1686 If we are the only waiter, wait relative to when the transaction
1687 started, rather than the current time. This credits the transaction for
1688 "time already served", e.g. reading indirect blocks.
1690 The minimum time for a transaction to take is calculated as:
1692 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
1693 min_time is then capped at 100 milliseconds.
1696 The delay has two degrees of freedom that can be adjusted via tunables. The
1697 percentage of dirty data at which we start to delay is defined by
1698 \fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
1699 \fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
1700 delay after writing at full speed has failed to keep up with the incoming write
1701 rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
1702 this variable determines the amount of delay at the midpoint of the curve.
1706 10ms +-------------------------------------------------------------*+
1722 2ms + (midpoint) * +
1725 | zfs_delay_scale ----------> ******** |
1726 0 +-------------------------------------*********----------------+
1727 0% <- zfs_dirty_data_max -> 100%
1730 Note that since the delay is added to the outstanding time remaining on the
1731 most recent transaction, the delay is effectively the inverse of IOPS.
1732 Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
1733 was chosen such that small changes in the amount of accumulated dirty data
1734 in the first 3/4 of the curve yield relatively small differences in the
1737 The effects can be easier to understand when the amount of delay is
1738 represented on a log scale:
1742 100ms +-------------------------------------------------------------++
1751 + zfs_delay_scale ----------> ***** +
1762 +--------------------------------------------------------------+
1763 0% <- zfs_dirty_data_max -> 100%
1766 Note here that only as the amount of dirty data approaches its limit does
1767 the delay start to increase rapidly. The goal of a properly tuned system
1768 should be to keep the amount of dirty data out of that range by first
1769 ensuring that the appropriate limits are set for the I/O scheduler to reach
1770 optimal throughput on the backend storage, and then by changing the value
1771 of \fBzfs_delay_scale\fR to increase the steepness of the curve.