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_dbuf_state_index\fR (int)
616 Calculate arc header index
618 Default value: \fB0\fR.
624 \fBzfs_deadman_enabled\fR (int)
629 Use \fB1\fR for yes (default) and \fB0\fR to disable.
635 \fBzfs_deadman_synctime_ms\fR (ulong)
638 Expiration time in milliseconds. This value has two meanings. First it is
639 used to determine when the spa_deadman() logic should fire. By default the
640 spa_deadman() will fire if spa_sync() has not completed in 1000 seconds.
641 Secondly, the value determines if an I/O is considered "hung". Any I/O that
642 has not completed in zfs_deadman_synctime_ms is considered "hung" resulting
643 in a zevent being logged.
645 Default value: \fB1,000,000\fR.
651 \fBzfs_dedup_prefetch\fR (int)
654 Enable prefetching dedup-ed blks
656 Use \fB1\fR for yes and \fB0\fR to disable (default).
662 \fBzfs_delay_min_dirty_percent\fR (int)
665 Start to delay each transaction once there is this amount of dirty data,
666 expressed as a percentage of \fBzfs_dirty_data_max\fR.
667 This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
668 See the section "ZFS TRANSACTION DELAY".
670 Default value: \fB60\fR.
676 \fBzfs_delay_scale\fR (int)
679 This controls how quickly the transaction delay approaches infinity.
680 Larger values cause longer delays for a given amount of dirty data.
682 For the smoothest delay, this value should be about 1 billion divided
683 by the maximum number of operations per second. This will smoothly
684 handle between 10x and 1/10th this number.
686 See the section "ZFS TRANSACTION DELAY".
688 Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
690 Default value: \fB500,000\fR.
696 \fBzfs_dirty_data_max\fR (int)
699 Determines the dirty space limit in bytes. Once this limit is exceeded, new
700 writes are halted until space frees up. This parameter takes precedence
701 over \fBzfs_dirty_data_max_percent\fR.
702 See the section "ZFS TRANSACTION DELAY".
704 Default value: 10 percent of all memory, capped at \fBzfs_dirty_data_max_max\fR.
710 \fBzfs_dirty_data_max_max\fR (int)
713 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
714 This limit is only enforced at module load time, and will be ignored if
715 \fBzfs_dirty_data_max\fR is later changed. This parameter takes
716 precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
717 "ZFS TRANSACTION DELAY".
719 Default value: 25% of physical RAM.
725 \fBzfs_dirty_data_max_max_percent\fR (int)
728 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
729 percentage of physical RAM. This limit is only enforced at module load
730 time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
731 The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
732 one. See the section "ZFS TRANSACTION DELAY".
740 \fBzfs_dirty_data_max_percent\fR (int)
743 Determines the dirty space limit, expressed as a percentage of all
744 memory. Once this limit is exceeded, new writes are halted until space frees
745 up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
746 one. See the section "ZFS TRANSACTION DELAY".
748 Default value: 10%, subject to \fBzfs_dirty_data_max_max\fR.
754 \fBzfs_dirty_data_sync\fR (int)
757 Start syncing out a transaction group if there is at least this much dirty data.
759 Default value: \fB67,108,864\fR.
765 \fBzfs_free_max_blocks\fR (ulong)
768 Maximum number of blocks freed in a single txg.
770 Default value: \fB100,000\fR.
776 \fBzfs_vdev_async_read_max_active\fR (int)
779 Maxium asynchronous read I/Os active to each device.
780 See the section "ZFS I/O SCHEDULER".
782 Default value: \fB3\fR.
788 \fBzfs_vdev_async_read_min_active\fR (int)
791 Minimum asynchronous read I/Os active to each device.
792 See the section "ZFS I/O SCHEDULER".
794 Default value: \fB1\fR.
800 \fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
803 When the pool has more than
804 \fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
805 \fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
806 the dirty data is between min and max, the active I/O limit is linearly
807 interpolated. See the section "ZFS I/O SCHEDULER".
809 Default value: \fB60\fR.
815 \fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
818 When the pool has less than
819 \fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
820 \fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
821 the dirty data is between min and max, the active I/O limit is linearly
822 interpolated. See the section "ZFS I/O SCHEDULER".
824 Default value: \fB30\fR.
830 \fBzfs_vdev_async_write_max_active\fR (int)
833 Maxium asynchronous write I/Os active to each device.
834 See the section "ZFS I/O SCHEDULER".
836 Default value: \fB10\fR.
842 \fBzfs_vdev_async_write_min_active\fR (int)
845 Minimum asynchronous write I/Os active to each device.
846 See the section "ZFS I/O SCHEDULER".
848 Default value: \fB1\fR.
854 \fBzfs_vdev_max_active\fR (int)
857 The maximum number of I/Os active to each device. Ideally, this will be >=
858 the sum of each queue's max_active. It must be at least the sum of each
859 queue's min_active. See the section "ZFS I/O SCHEDULER".
861 Default value: \fB1,000\fR.
867 \fBzfs_vdev_scrub_max_active\fR (int)
870 Maxium scrub I/Os active to each device.
871 See the section "ZFS I/O SCHEDULER".
873 Default value: \fB2\fR.
879 \fBzfs_vdev_scrub_min_active\fR (int)
882 Minimum scrub I/Os active to each device.
883 See the section "ZFS I/O SCHEDULER".
885 Default value: \fB1\fR.
891 \fBzfs_vdev_sync_read_max_active\fR (int)
894 Maxium synchronous read I/Os active to each device.
895 See the section "ZFS I/O SCHEDULER".
897 Default value: \fB10\fR.
903 \fBzfs_vdev_sync_read_min_active\fR (int)
906 Minimum synchronous read I/Os active to each device.
907 See the section "ZFS I/O SCHEDULER".
909 Default value: \fB10\fR.
915 \fBzfs_vdev_sync_write_max_active\fR (int)
918 Maxium synchronous write I/Os active to each device.
919 See the section "ZFS I/O SCHEDULER".
921 Default value: \fB10\fR.
927 \fBzfs_vdev_sync_write_min_active\fR (int)
930 Minimum synchronous write I/Os active to each device.
931 See the section "ZFS I/O SCHEDULER".
933 Default value: \fB10\fR.
939 \fBzfs_disable_dup_eviction\fR (int)
942 Disable duplicate buffer eviction
944 Use \fB1\fR for yes and \fB0\fR for no (default).
950 \fBzfs_expire_snapshot\fR (int)
953 Seconds to expire .zfs/snapshot
955 Default value: \fB300\fR.
961 \fBzfs_flags\fR (int)
964 Set additional debugging flags. The following flags may be bitwise-or'd
976 Enable dprintf entries in the debug log.
978 2 ZFS_DEBUG_DBUF_VERIFY *
979 Enable extra dbuf verifications.
981 4 ZFS_DEBUG_DNODE_VERIFY *
982 Enable extra dnode verifications.
984 8 ZFS_DEBUG_SNAPNAMES
985 Enable snapshot name verification.
988 Check for illegally modified ARC buffers.
991 Enable spa_dbgmsg entries in the debug log.
993 64 ZFS_DEBUG_ZIO_FREE
994 Enable verification of block frees.
996 128 ZFS_DEBUG_HISTOGRAM_VERIFY
997 Enable extra spacemap histogram verifications.
1000 * Requires debug build.
1002 Default value: \fB0\fR.
1008 \fBzfs_free_leak_on_eio\fR (int)
1011 If destroy encounters an EIO while reading metadata (e.g. indirect
1012 blocks), space referenced by the missing metadata can not be freed.
1013 Normally this causes the background destroy to become "stalled", as
1014 it is unable to make forward progress. While in this stalled state,
1015 all remaining space to free from the error-encountering filesystem is
1016 "temporarily leaked". Set this flag to cause it to ignore the EIO,
1017 permanently leak the space from indirect blocks that can not be read,
1018 and continue to free everything else that it can.
1020 The default, "stalling" behavior is useful if the storage partially
1021 fails (i.e. some but not all i/os fail), and then later recovers. In
1022 this case, we will be able to continue pool operations while it is
1023 partially failed, and when it recovers, we can continue to free the
1024 space, with no leaks. However, note that this case is actually
1027 Typically pools either (a) fail completely (but perhaps temporarily,
1028 e.g. a top-level vdev going offline), or (b) have localized,
1029 permanent errors (e.g. disk returns the wrong data due to bit flip or
1030 firmware bug). In case (a), this setting does not matter because the
1031 pool will be suspended and the sync thread will not be able to make
1032 forward progress regardless. In case (b), because the error is
1033 permanent, the best we can do is leak the minimum amount of space,
1034 which is what setting this flag will do. Therefore, it is reasonable
1035 for this flag to normally be set, but we chose the more conservative
1036 approach of not setting it, so that there is no possibility of
1037 leaking space in the "partial temporary" failure case.
1039 Default value: \fB0\fR.
1045 \fBzfs_free_min_time_ms\fR (int)
1048 Min millisecs to free per txg
1050 Default value: \fB1,000\fR.
1056 \fBzfs_immediate_write_sz\fR (long)
1059 Largest data block to write to zil
1061 Default value: \fB32,768\fR.
1067 \fBzfs_max_recordsize\fR (int)
1070 We currently support block sizes from 512 bytes to 16MB. The benefits of
1071 larger blocks, and thus larger IO, need to be weighed against the cost of
1072 COWing a giant block to modify one byte. Additionally, very large blocks
1073 can have an impact on i/o latency, and also potentially on the memory
1074 allocator. Therefore, we do not allow the recordsize to be set larger than
1075 zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1076 this tunable, and pools with larger blocks can always be imported and used,
1077 regardless of this setting.
1079 Default value: \fB1,048,576\fR.
1085 \fBzfs_mdcomp_disable\fR (int)
1088 Disable meta data compression
1090 Use \fB1\fR for yes and \fB0\fR for no (default).
1096 \fBzfs_metaslab_fragmentation_threshold\fR (int)
1099 Allow metaslabs to keep their active state as long as their fragmentation
1100 percentage is less than or equal to this value. An active metaslab that
1101 exceeds this threshold will no longer keep its active status allowing
1102 better metaslabs to be selected.
1104 Default value: \fB70\fR.
1110 \fBzfs_mg_fragmentation_threshold\fR (int)
1113 Metaslab groups are considered eligible for allocations if their
1114 fragmenation metric (measured as a percentage) is less than or equal to
1115 this value. If a metaslab group exceeds this threshold then it will be
1116 skipped unless all metaslab groups within the metaslab class have also
1117 crossed this threshold.
1119 Default value: \fB85\fR.
1125 \fBzfs_mg_noalloc_threshold\fR (int)
1128 Defines a threshold at which metaslab groups should be eligible for
1129 allocations. The value is expressed as a percentage of free space
1130 beyond which a metaslab group is always eligible for allocations.
1131 If a metaslab group's free space is less than or equal to the
1132 the threshold, the allocator will avoid allocating to that group
1133 unless all groups in the pool have reached the threshold. Once all
1134 groups have reached the threshold, all groups are allowed to accept
1135 allocations. The default value of 0 disables the feature and causes
1136 all metaslab groups to be eligible for allocations.
1138 This parameter allows to deal with pools having heavily imbalanced
1139 vdevs such as would be the case when a new vdev has been added.
1140 Setting the threshold to a non-zero percentage will stop allocations
1141 from being made to vdevs that aren't filled to the specified percentage
1142 and allow lesser filled vdevs to acquire more allocations than they
1143 otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1145 Default value: \fB0\fR.
1151 \fBzfs_no_scrub_io\fR (int)
1154 Set for no scrub I/O
1156 Use \fB1\fR for yes and \fB0\fR for no (default).
1162 \fBzfs_no_scrub_prefetch\fR (int)
1165 Set for no scrub prefetching
1167 Use \fB1\fR for yes and \fB0\fR for no (default).
1173 \fBzfs_nocacheflush\fR (int)
1176 Disable cache flushes
1178 Use \fB1\fR for yes and \fB0\fR for no (default).
1184 \fBzfs_nopwrite_enabled\fR (int)
1189 Use \fB1\fR for yes (default) and \fB0\fR to disable.
1195 \fBzfs_pd_bytes_max\fR (int)
1198 The number of bytes which should be prefetched.
1200 Default value: \fB52,428,800\fR.
1206 \fBzfs_prefetch_disable\fR (int)
1209 Disable all ZFS prefetching
1211 Use \fB1\fR for yes and \fB0\fR for no (default).
1217 \fBzfs_read_chunk_size\fR (long)
1220 Bytes to read per chunk
1222 Default value: \fB1,048,576\fR.
1228 \fBzfs_read_history\fR (int)
1231 Historic statistics for the last N reads
1233 Default value: \fB0\fR.
1239 \fBzfs_read_history_hits\fR (int)
1242 Include cache hits in read history
1244 Use \fB1\fR for yes and \fB0\fR for no (default).
1250 \fBzfs_recover\fR (int)
1253 Set to attempt to recover from fatal errors. This should only be used as a
1254 last resort, as it typically results in leaked space, or worse.
1256 Use \fB1\fR for yes and \fB0\fR for no (default).
1262 \fBzfs_resilver_delay\fR (int)
1265 Number of ticks to delay prior to issuing a resilver I/O operation when
1266 a non-resilver or non-scrub I/O operation has occurred within the past
1267 \fBzfs_scan_idle\fR ticks.
1269 Default value: \fB2\fR.
1275 \fBzfs_resilver_min_time_ms\fR (int)
1278 Min millisecs to resilver per txg
1280 Default value: \fB3,000\fR.
1286 \fBzfs_scan_idle\fR (int)
1289 Idle window in clock ticks. During a scrub or a resilver, if
1290 a non-scrub or non-resilver I/O operation has occurred during this
1291 window, the next scrub or resilver operation is delayed by, respectively
1292 \fBzfs_scrub_delay\fR or \fBzfs_resilver_delay\fR ticks.
1294 Default value: \fB50\fR.
1300 \fBzfs_scan_min_time_ms\fR (int)
1303 Min millisecs to scrub per txg
1305 Default value: \fB1,000\fR.
1311 \fBzfs_scrub_delay\fR (int)
1314 Number of ticks to delay prior to issuing a scrub I/O operation when
1315 a non-scrub or non-resilver I/O operation has occurred within the past
1316 \fBzfs_scan_idle\fR ticks.
1318 Default value: \fB4\fR.
1324 \fBzfs_send_corrupt_data\fR (int)
1327 Allow to send corrupt data (ignore read/checksum errors when sending data)
1329 Use \fB1\fR for yes and \fB0\fR for no (default).
1335 \fBzfs_sync_pass_deferred_free\fR (int)
1338 Defer frees starting in this pass
1340 Default value: \fB2\fR.
1346 \fBzfs_sync_pass_dont_compress\fR (int)
1349 Don't compress starting in this pass
1351 Default value: \fB5\fR.
1357 \fBzfs_sync_pass_rewrite\fR (int)
1360 Rewrite new bps starting in this pass
1362 Default value: \fB2\fR.
1368 \fBzfs_top_maxinflight\fR (int)
1371 Max I/Os per top-level vdev during scrub or resilver operations.
1373 Default value: \fB32\fR.
1379 \fBzfs_txg_history\fR (int)
1382 Historic statistics for the last N txgs
1384 Default value: \fB0\fR.
1390 \fBzfs_txg_timeout\fR (int)
1393 Max seconds worth of delta per txg
1395 Default value: \fB5\fR.
1401 \fBzfs_vdev_aggregation_limit\fR (int)
1404 Max vdev I/O aggregation size
1406 Default value: \fB131,072\fR.
1412 \fBzfs_vdev_cache_bshift\fR (int)
1415 Shift size to inflate reads too
1417 Default value: \fB16\fR.
1423 \fBzfs_vdev_cache_max\fR (int)
1426 Inflate reads small than max
1432 \fBzfs_vdev_cache_size\fR (int)
1435 Total size of the per-disk cache
1437 Default value: \fB0\fR.
1443 \fBzfs_vdev_mirror_switch_us\fR (int)
1446 Switch mirrors every N usecs
1448 Default value: \fB10,000\fR.
1454 \fBzfs_vdev_read_gap_limit\fR (int)
1457 Aggregate read I/O over gap
1459 Default value: \fB32,768\fR.
1465 \fBzfs_vdev_scheduler\fR (charp)
1470 Default value: \fBnoop\fR.
1476 \fBzfs_vdev_write_gap_limit\fR (int)
1479 Aggregate write I/O over gap
1481 Default value: \fB4,096\fR.
1487 \fBzfs_zevent_cols\fR (int)
1490 Max event column width
1492 Default value: \fB80\fR.
1498 \fBzfs_zevent_console\fR (int)
1501 Log events to the console
1503 Use \fB1\fR for yes and \fB0\fR for no (default).
1509 \fBzfs_zevent_len_max\fR (int)
1512 Max event queue length
1514 Default value: \fB0\fR.
1520 \fBzil_replay_disable\fR (int)
1523 Disable intent logging replay
1525 Use \fB1\fR for yes and \fB0\fR for no (default).
1531 \fBzil_slog_limit\fR (ulong)
1534 Max commit bytes to separate log device
1536 Default value: \fB1,048,576\fR.
1542 \fBzio_delay_max\fR (int)
1545 Max zio millisec delay before posting event
1547 Default value: \fB30,000\fR.
1553 \fBzio_requeue_io_start_cut_in_line\fR (int)
1556 Prioritize requeued I/O
1558 Default value: \fB0\fR.
1564 \fBzvol_inhibit_dev\fR (uint)
1567 Do not create zvol device nodes
1569 Use \fB1\fR for yes and \fB0\fR for no (default).
1575 \fBzvol_major\fR (uint)
1578 Major number for zvol device
1580 Default value: \fB230\fR.
1586 \fBzvol_max_discard_blocks\fR (ulong)
1589 Max number of blocks to discard at once
1591 Default value: \fB16,384\fR.
1594 .SH ZFS I/O SCHEDULER
1595 ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
1596 The I/O scheduler determines when and in what order those operations are
1597 issued. The I/O scheduler divides operations into five I/O classes
1598 prioritized in the following order: sync read, sync write, async read,
1599 async write, and scrub/resilver. Each queue defines the minimum and
1600 maximum number of concurrent operations that may be issued to the
1601 device. In addition, the device has an aggregate maximum,
1602 \fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
1603 must not exceed the aggregate maximum. If the sum of the per-queue
1604 maximums exceeds the aggregate maximum, then the number of active I/Os
1605 may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
1606 be issued regardless of whether all per-queue minimums have been met.
1608 For many physical devices, throughput increases with the number of
1609 concurrent operations, but latency typically suffers. Further, physical
1610 devices typically have a limit at which more concurrent operations have no
1611 effect on throughput or can actually cause it to decrease.
1613 The scheduler selects the next operation to issue by first looking for an
1614 I/O class whose minimum has not been satisfied. Once all are satisfied and
1615 the aggregate maximum has not been hit, the scheduler looks for classes
1616 whose maximum has not been satisfied. Iteration through the I/O classes is
1617 done in the order specified above. No further operations are issued if the
1618 aggregate maximum number of concurrent operations has been hit or if there
1619 are no operations queued for an I/O class that has not hit its maximum.
1620 Every time an I/O is queued or an operation completes, the I/O scheduler
1621 looks for new operations to issue.
1623 In general, smaller max_active's will lead to lower latency of synchronous
1624 operations. Larger max_active's may lead to higher overall throughput,
1625 depending on underlying storage.
1627 The ratio of the queues' max_actives determines the balance of performance
1628 between reads, writes, and scrubs. E.g., increasing
1629 \fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
1630 more quickly, but reads and writes to have higher latency and lower throughput.
1632 All I/O classes have a fixed maximum number of outstanding operations
1633 except for the async write class. Asynchronous writes represent the data
1634 that is committed to stable storage during the syncing stage for
1635 transaction groups. Transaction groups enter the syncing state
1636 periodically so the number of queued async writes will quickly burst up
1637 and then bleed down to zero. Rather than servicing them as quickly as
1638 possible, the I/O scheduler changes the maximum number of active async
1639 write I/Os according to the amount of dirty data in the pool. Since
1640 both throughput and latency typically increase with the number of
1641 concurrent operations issued to physical devices, reducing the
1642 burstiness in the number of concurrent operations also stabilizes the
1643 response time of operations from other -- and in particular synchronous
1644 -- queues. In broad strokes, the I/O scheduler will issue more
1645 concurrent operations from the async write queue as there's more dirty
1650 The number of concurrent operations issued for the async write I/O class
1651 follows a piece-wise linear function defined by a few adjustable points.
1654 | o---------| <-- zfs_vdev_async_write_max_active
1661 |-------o | | <-- zfs_vdev_async_write_min_active
1662 0|_______^______|_________|
1663 0% | | 100% of zfs_dirty_data_max
1665 | `-- zfs_vdev_async_write_active_max_dirty_percent
1666 `--------- zfs_vdev_async_write_active_min_dirty_percent
1669 Until the amount of dirty data exceeds a minimum percentage of the dirty
1670 data allowed in the pool, the I/O scheduler will limit the number of
1671 concurrent operations to the minimum. As that threshold is crossed, the
1672 number of concurrent operations issued increases linearly to the maximum at
1673 the specified maximum percentage of the dirty data allowed in the pool.
1675 Ideally, the amount of dirty data on a busy pool will stay in the sloped
1676 part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
1677 and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
1678 maximum percentage, this indicates that the rate of incoming data is
1679 greater than the rate that the backend storage can handle. In this case, we
1680 must further throttle incoming writes, as described in the next section.
1682 .SH ZFS TRANSACTION DELAY
1683 We delay transactions when we've determined that the backend storage
1684 isn't able to accommodate the rate of incoming writes.
1686 If there is already a transaction waiting, we delay relative to when
1687 that transaction will finish waiting. This way the calculated delay time
1688 is independent of the number of threads concurrently executing
1691 If we are the only waiter, wait relative to when the transaction
1692 started, rather than the current time. This credits the transaction for
1693 "time already served", e.g. reading indirect blocks.
1695 The minimum time for a transaction to take is calculated as:
1697 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
1698 min_time is then capped at 100 milliseconds.
1701 The delay has two degrees of freedom that can be adjusted via tunables. The
1702 percentage of dirty data at which we start to delay is defined by
1703 \fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
1704 \fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
1705 delay after writing at full speed has failed to keep up with the incoming write
1706 rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
1707 this variable determines the amount of delay at the midpoint of the curve.
1711 10ms +-------------------------------------------------------------*+
1727 2ms + (midpoint) * +
1730 | zfs_delay_scale ----------> ******** |
1731 0 +-------------------------------------*********----------------+
1732 0% <- zfs_dirty_data_max -> 100%
1735 Note that since the delay is added to the outstanding time remaining on the
1736 most recent transaction, the delay is effectively the inverse of IOPS.
1737 Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
1738 was chosen such that small changes in the amount of accumulated dirty data
1739 in the first 3/4 of the curve yield relatively small differences in the
1742 The effects can be easier to understand when the amount of delay is
1743 represented on a log scale:
1747 100ms +-------------------------------------------------------------++
1756 + zfs_delay_scale ----------> ***** +
1767 +--------------------------------------------------------------+
1768 0% <- zfs_dirty_data_max -> 100%
1771 Note here that only as the amount of dirty data approaches its limit does
1772 the delay start to increase rapidly. The goal of a properly tuned system
1773 should be to keep the amount of dirty data out of that range by first
1774 ensuring that the appropriate limits are set for the I/O scheduler to reach
1775 optimal throughput on the backend storage, and then by changing the value
1776 of \fBzfs_delay_scale\fR to increase the steepness of the curve.