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)
33 Turbo L2ARC warm-up. When the L2ARC is cold the fill interval will be set as
36 Use \fB1\fR for yes (default) and \fB0\fR to disable.
42 \fBl2arc_feed_min_ms\fR (ulong)
45 Min feed interval in milliseconds. Requires \fBl2arc_feed_again=1\fR and only
46 applicable in related situations.
48 Default value: \fB200\fR.
54 \fBl2arc_feed_secs\fR (ulong)
57 Seconds between L2ARC writing
59 Default value: \fB1\fR.
65 \fBl2arc_headroom\fR (ulong)
68 How far through the ARC lists to search for L2ARC cacheable content, expressed
69 as a multiplier of \fBl2arc_write_max\fR
71 Default value: \fB2\fR.
77 \fBl2arc_headroom_boost\fR (ulong)
80 Scales \fBl2arc_headroom\fR by this percentage when L2ARC contents are being
81 successfully compressed before writing. A value of 100 disables this feature.
83 Default value: \fB200\fR.
89 \fBl2arc_max_block_size\fR (ulong)
92 The maximum block size which may be written to an L2ARC device, after
93 compression and other factors. This setting is used to prevent a small
94 number of large blocks from pushing a larger number of small blocks out
97 Default value: \fB16,777,216\fR.
103 \fBl2arc_nocompress\fR (int)
106 Skip compressing L2ARC buffers
108 Use \fB1\fR for yes and \fB0\fR for no (default).
114 \fBl2arc_noprefetch\fR (int)
117 Do not write buffers to L2ARC if they were prefetched but not used by
120 Use \fB1\fR for yes (default) and \fB0\fR to disable.
126 \fBl2arc_norw\fR (int)
129 No reads during writes
131 Use \fB1\fR for yes and \fB0\fR for no (default).
137 \fBl2arc_write_boost\fR (ulong)
140 Cold L2ARC devices will have \fBl2arc_write_nax\fR increased by this amount
141 while they remain cold.
143 Default value: \fB8,388,608\fR.
149 \fBl2arc_write_max\fR (ulong)
152 Max write bytes per interval
154 Default value: \fB8,388,608\fR.
160 \fBmetaslab_aliquot\fR (ulong)
163 Metaslab granularity, in bytes. This is roughly similar to what would be
164 referred to as the "stripe size" in traditional RAID arrays. In normal
165 operation, ZFS will try to write this amount of data to a top-level vdev
166 before moving on to the next one.
168 Default value: \fB524,288\fR.
174 \fBmetaslab_bias_enabled\fR (int)
177 Enable metaslab group biasing based on its vdev's over- or under-utilization
178 relative to the pool.
180 Use \fB1\fR for yes (default) and \fB0\fR for no.
186 \fBmetaslab_debug_load\fR (int)
189 Load all metaslabs during pool import.
191 Use \fB1\fR for yes and \fB0\fR for no (default).
197 \fBmetaslab_debug_unload\fR (int)
200 Prevent metaslabs from being unloaded.
202 Use \fB1\fR for yes and \fB0\fR for no (default).
208 \fBmetaslab_fragmentation_factor_enabled\fR (int)
211 Enable use of the fragmentation metric in computing metaslab weights.
213 Use \fB1\fR for yes (default) and \fB0\fR for no.
219 \fBmetaslabs_per_vdev\fR (int)
222 When a vdev is added, it will be divided into approximately (but no more than) this number of metaslabs.
224 Default value: \fB200\fR.
230 \fBmetaslab_preload_enabled\fR (int)
233 Enable metaslab group preloading.
235 Use \fB1\fR for yes (default) and \fB0\fR for no.
241 \fBmetaslab_lba_weighting_enabled\fR (int)
244 Give more weight to metaslabs with lower LBAs, assuming they have
245 greater bandwidth as is typically the case on a modern constant
246 angular velocity disk drive.
248 Use \fB1\fR for yes (default) and \fB0\fR for no.
254 \fBspa_config_path\fR (charp)
259 Default value: \fB/etc/zfs/zpool.cache\fR.
265 \fBspa_asize_inflation\fR (int)
268 Multiplication factor used to estimate actual disk consumption from the
269 size of data being written. The default value is a worst case estimate,
270 but lower values may be valid for a given pool depending on its
271 configuration. Pool administrators who understand the factors involved
272 may wish to specify a more realistic inflation factor, particularly if
273 they operate close to quota or capacity limits.
275 Default value: \fB24\fR.
281 \fBspa_load_verify_data\fR (int)
284 Whether to traverse data blocks during an "extreme rewind" (\fB-X\fR)
285 import. Use 0 to disable and 1 to enable.
287 An extreme rewind import normally performs a full traversal of all
288 blocks in the pool for verification. If this parameter is set to 0,
289 the traversal skips non-metadata blocks. It can be toggled once the
290 import has started to stop or start the traversal of non-metadata blocks.
292 Default value: \fB1\fR.
298 \fBspa_load_verify_metadata\fR (int)
301 Whether to traverse blocks during an "extreme rewind" (\fB-X\fR)
302 pool import. Use 0 to disable and 1 to enable.
304 An extreme rewind import normally performs a full traversal of all
305 blocks in the pool for verification. If this parameter is set to 0,
306 the traversal is not performed. It can be toggled once the import has
307 started to stop or start the traversal.
309 Default value: \fB1\fR.
315 \fBspa_load_verify_maxinflight\fR (int)
318 Maximum concurrent I/Os during the traversal performed during an "extreme
319 rewind" (\fB-X\fR) pool import.
321 Default value: \fB10000\fR.
327 \fBspa_slop_shift\fR (int)
330 Normally, we don't allow the last 3.2% (1/(2^spa_slop_shift)) of space
331 in the pool to be consumed. This ensures that we don't run the pool
332 completely out of space, due to unaccounted changes (e.g. to the MOS).
333 It also limits the worst-case time to allocate space. If we have
334 less than this amount of free space, most ZPL operations (e.g. write,
335 create) will return ENOSPC.
337 Default value: \fB5\fR.
343 \fBzfetch_array_rd_sz\fR (ulong)
346 If prefetching is enabled, disable prefetching for reads larger than this size.
348 Default value: \fB1,048,576\fR.
354 \fBzfetch_max_distance\fR (uint)
357 Max bytes to prefetch per stream (default 8MB).
359 Default value: \fB8,388,608\fR.
365 \fBzfetch_max_streams\fR (uint)
368 Max number of streams per zfetch (prefetch streams per file).
370 Default value: \fB8\fR.
376 \fBzfetch_min_sec_reap\fR (uint)
379 Min time before an active prefetch stream can be reclaimed
381 Default value: \fB2\fR.
387 \fBzfs_arc_average_blocksize\fR (int)
390 The ARC's buffer hash table is sized based on the assumption of an average
391 block size of \fBzfs_arc_average_blocksize\fR (default 8K). This works out
392 to roughly 1MB of hash table per 1GB of physical memory with 8-byte pointers.
393 For configurations with a known larger average block size this value can be
394 increased to reduce the memory footprint.
397 Default value: \fB8192\fR.
403 \fBzfs_arc_evict_batch_limit\fR (int)
406 Number ARC headers to evict per sub-list before proceeding to another sub-list.
407 This batch-style operation prevents entire sub-lists from being evicted at once
408 but comes at a cost of additional unlocking and locking.
410 Default value: \fB10\fR.
416 \fBzfs_arc_grow_retry\fR (int)
419 After a memory pressure event the ARC will wait this many seconds before trying
422 Default value: \fB5\fR.
428 \fBzfs_arc_lotsfree_percent\fR (int)
431 Throttle I/O when free system memory drops below this percentage of total
432 system memory. Setting this value to 0 will disable the throttle.
434 Default value: \fB10\fR.
440 \fBzfs_arc_max\fR (ulong)
443 Max arc size of ARC in bytes. If set to 0 then it will consume 1/2 of system
444 RAM. This value must be at least 67108864 (64 megabytes).
446 This value can be changed dynamically with some caveats. It cannot be set back
447 to 0 while running and reducing it below the current ARC size will not cause
448 the ARC to shrink without memory pressure to induce shrinking.
450 Default value: \fB0\fR.
456 \fBzfs_arc_meta_limit\fR (ulong)
459 The maximum allowed size in bytes that meta data buffers are allowed to
460 consume in the ARC. When this limit is reached meta data buffers will
461 be reclaimed even if the overall arc_c_max has not been reached. This
462 value defaults to 0 which indicates that 3/4 of the ARC may be used
465 This value my be changed dynamically except that it cannot be set back to 0
466 for 3/4 of the ARC; it must be set to an explicit value.
468 Default value: \fB0\fR.
474 \fBzfs_arc_meta_min\fR (ulong)
477 The minimum allowed size in bytes that meta data buffers may consume in
478 the ARC. This value defaults to 0 which disables a floor on the amount
479 of the ARC devoted meta data.
481 Default value: \fB0\fR.
487 \fBzfs_arc_meta_prune\fR (int)
490 The number of dentries and inodes to be scanned looking for entries
491 which can be dropped. This may be required when the ARC reaches the
492 \fBzfs_arc_meta_limit\fR because dentries and inodes can pin buffers
493 in the ARC. Increasing this value will cause to dentry and inode caches
494 to be pruned more aggressively. Setting this value to 0 will disable
495 pruning the inode and dentry caches.
497 Default value: \fB10,000\fR.
503 \fBzfs_arc_meta_adjust_restarts\fR (ulong)
506 The number of restart passes to make while scanning the ARC attempting
507 the free buffers in order to stay below the \fBzfs_arc_meta_limit\fR.
508 This value should not need to be tuned but is available to facilitate
509 performance analysis.
511 Default value: \fB4096\fR.
517 \fBzfs_arc_min\fR (ulong)
522 Default value: \fB100\fR.
528 \fBzfs_arc_min_prefetch_lifespan\fR (int)
531 Minimum time prefetched blocks are locked in the ARC, specified in jiffies.
532 A value of 0 will default to 1 second.
534 Default value: \fB0\fR.
540 \fBzfs_arc_num_sublists_per_state\fR (int)
543 To allow more fine-grained locking, each ARC state contains a series
544 of lists for both data and meta data objects. Locking is performed at
545 the level of these "sub-lists". This parameters controls the number of
546 sub-lists per ARC state.
548 Default value: \fR1\fB or the number of online CPUs, whichever is greater
554 \fBzfs_arc_overflow_shift\fR (int)
557 The ARC size is considered to be overflowing if it exceeds the current
558 ARC target size (arc_c) by a threshold determined by this parameter.
559 The threshold is calculated as a fraction of arc_c using the formula
560 "arc_c >> \fBzfs_arc_overflow_shift\fR".
562 The default value of 8 causes the ARC to be considered to be overflowing
563 if it exceeds the target size by 1/256th (0.3%) of the target size.
565 When the ARC is overflowing, new buffer allocations are stalled until
566 the reclaim thread catches up and the overflow condition no longer exists.
568 Default value: \fB8\fR.
575 \fBzfs_arc_p_min_shift\fR (int)
578 arc_c shift to calc min/max arc_p
580 Default value: \fB4\fR.
586 \fBzfs_arc_p_aggressive_disable\fR (int)
589 Disable aggressive arc_p growth
591 Use \fB1\fR for yes (default) and \fB0\fR to disable.
597 \fBzfs_arc_p_dampener_disable\fR (int)
600 Disable arc_p adapt dampener
602 Use \fB1\fR for yes (default) and \fB0\fR to disable.
608 \fBzfs_arc_shrink_shift\fR (int)
611 log2(fraction of arc to reclaim)
613 Default value: \fB5\fR.
619 \fBzfs_arc_sys_free\fR (ulong)
622 The target number of bytes the ARC should leave as free memory on the system.
623 Defaults to the larger of 1/64 of physical memory or 512K. Setting this
624 option to a non-zero value will override the default.
626 Default value: \fB0\fR.
632 \fBzfs_autoimport_disable\fR (int)
635 Disable pool import at module load by ignoring the cache file (typically \fB/etc/zfs/zpool.cache\fR).
637 Use \fB1\fR for yes (default) and \fB0\fR for no.
643 \fBzfs_dbgmsg_enable\fR (int)
646 Internally ZFS keeps a small log to facilitate debugging. By default the log
647 is disabled, to enable it set this option to 1. The contents of the log can
648 be accessed by reading the /proc/spl/kstat/zfs/dbgmsg file. Writing 0 to
649 this proc file clears the log.
651 Default value: \fB0\fR.
657 \fBzfs_dbgmsg_maxsize\fR (int)
660 The maximum size in bytes of the internal ZFS debug log.
662 Default value: \fB4M\fR.
668 \fBzfs_dbuf_state_index\fR (int)
671 This feature is currently unused. It is normally used for controlling what
672 reporting is available under /proc/spl/kstat/zfs.
674 Default value: \fB0\fR.
680 \fBzfs_deadman_enabled\fR (int)
683 Enable deadman timer. See description below.
685 Use \fB1\fR for yes (default) and \fB0\fR to disable.
691 \fBzfs_deadman_synctime_ms\fR (ulong)
694 Expiration time in milliseconds. This value has two meanings. First it is
695 used to determine when the spa_deadman() logic should fire. By default the
696 spa_deadman() will fire if spa_sync() has not completed in 1000 seconds.
697 Secondly, the value determines if an I/O is considered "hung". Any I/O that
698 has not completed in zfs_deadman_synctime_ms is considered "hung" resulting
699 in a zevent being logged.
701 Default value: \fB1,000,000\fR.
707 \fBzfs_dedup_prefetch\fR (int)
710 Enable prefetching dedup-ed blks
712 Use \fB1\fR for yes and \fB0\fR to disable (default).
718 \fBzfs_delay_min_dirty_percent\fR (int)
721 Start to delay each transaction once there is this amount of dirty data,
722 expressed as a percentage of \fBzfs_dirty_data_max\fR.
723 This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
724 See the section "ZFS TRANSACTION DELAY".
726 Default value: \fB60\fR.
732 \fBzfs_delay_scale\fR (int)
735 This controls how quickly the transaction delay approaches infinity.
736 Larger values cause longer delays for a given amount of dirty data.
738 For the smoothest delay, this value should be about 1 billion divided
739 by the maximum number of operations per second. This will smoothly
740 handle between 10x and 1/10th this number.
742 See the section "ZFS TRANSACTION DELAY".
744 Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
746 Default value: \fB500,000\fR.
752 \fBzfs_delete_blocks\fR (ulong)
755 This is the used to define a large file for the purposes of delete. Files
756 containing more than \fBzfs_delete_blocks\fR will be deleted asynchronously
757 while smaller files are deleted synchronously. Decreasing this value will
758 reduce the time spent in an unlink(2) system call at the expense of a longer
759 delay before the freed space is available.
761 Default value: \fB20,480\fR.
767 \fBzfs_dirty_data_max\fR (int)
770 Determines the dirty space limit in bytes. Once this limit is exceeded, new
771 writes are halted until space frees up. This parameter takes precedence
772 over \fBzfs_dirty_data_max_percent\fR.
773 See the section "ZFS TRANSACTION DELAY".
775 Default value: 10 percent of all memory, capped at \fBzfs_dirty_data_max_max\fR.
781 \fBzfs_dirty_data_max_max\fR (int)
784 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
785 This limit is only enforced at module load time, and will be ignored if
786 \fBzfs_dirty_data_max\fR is later changed. This parameter takes
787 precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
788 "ZFS TRANSACTION DELAY".
790 Default value: 25% of physical RAM.
796 \fBzfs_dirty_data_max_max_percent\fR (int)
799 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
800 percentage of physical RAM. This limit is only enforced at module load
801 time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
802 The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
803 one. See the section "ZFS TRANSACTION DELAY".
805 Default value: \fN25\fR.
811 \fBzfs_dirty_data_max_percent\fR (int)
814 Determines the dirty space limit, expressed as a percentage of all
815 memory. Once this limit is exceeded, new writes are halted until space frees
816 up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
817 one. See the section "ZFS TRANSACTION DELAY".
819 Default value: 10%, subject to \fBzfs_dirty_data_max_max\fR.
825 \fBzfs_dirty_data_sync\fR (int)
828 Start syncing out a transaction group if there is at least this much dirty data.
830 Default value: \fB67,108,864\fR.
836 \fBzfs_fletcher_4_impl\fR (string)
839 Select a fletcher 4 implementation.
841 Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
842 and \fBavx2\fR. All of the selectors except \fBfastest\fR and \fBscalar\fR
843 require instruction set extensions to be available and will only appear if ZFS
844 detects that they are present at runtime. If multiple implementations of
845 fletcher 4 are available, the \fBfastest\fR will be chosen using a micro
846 benchmark. Selecting \fBscalar\fR results in the original CPU based calculation
847 being used. Selecting any option other than \fBfastest\fR and \fBscalar\fR
848 results in vector instructions from the respective CPU instruction set being
851 Default value: \fBfastest\fR.
857 \fBzfs_free_bpobj_enabled\fR (int)
860 Enable/disable the processing of the free_bpobj object.
862 Default value: \fB1\fR.
868 \fBzfs_free_max_blocks\fR (ulong)
871 Maximum number of blocks freed in a single txg.
873 Default value: \fB100,000\fR.
879 \fBzfs_vdev_async_read_max_active\fR (int)
882 Maximum asynchronous read I/Os active to each device.
883 See the section "ZFS I/O SCHEDULER".
885 Default value: \fB3\fR.
891 \fBzfs_vdev_async_read_min_active\fR (int)
894 Minimum asynchronous read I/Os active to each device.
895 See the section "ZFS I/O SCHEDULER".
897 Default value: \fB1\fR.
903 \fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
906 When the pool has more than
907 \fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
908 \fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
909 the dirty data is between min and max, the active I/O limit is linearly
910 interpolated. See the section "ZFS I/O SCHEDULER".
912 Default value: \fB60\fR.
918 \fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
921 When the pool has less than
922 \fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
923 \fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
924 the dirty data is between min and max, the active I/O limit is linearly
925 interpolated. See the section "ZFS I/O SCHEDULER".
927 Default value: \fB30\fR.
933 \fBzfs_vdev_async_write_max_active\fR (int)
936 Maximum asynchronous write I/Os active to each device.
937 See the section "ZFS I/O SCHEDULER".
939 Default value: \fB10\fR.
945 \fBzfs_vdev_async_write_min_active\fR (int)
948 Minimum asynchronous write I/Os active to each device.
949 See the section "ZFS I/O SCHEDULER".
951 Default value: \fB1\fR.
957 \fBzfs_vdev_max_active\fR (int)
960 The maximum number of I/Os active to each device. Ideally, this will be >=
961 the sum of each queue's max_active. It must be at least the sum of each
962 queue's min_active. See the section "ZFS I/O SCHEDULER".
964 Default value: \fB1,000\fR.
970 \fBzfs_vdev_scrub_max_active\fR (int)
973 Maximum scrub I/Os active to each device.
974 See the section "ZFS I/O SCHEDULER".
976 Default value: \fB2\fR.
982 \fBzfs_vdev_scrub_min_active\fR (int)
985 Minimum scrub I/Os active to each device.
986 See the section "ZFS I/O SCHEDULER".
988 Default value: \fB1\fR.
994 \fBzfs_vdev_sync_read_max_active\fR (int)
997 Maximum synchronous read I/Os active to each device.
998 See the section "ZFS I/O SCHEDULER".
1000 Default value: \fB10\fR.
1006 \fBzfs_vdev_sync_read_min_active\fR (int)
1009 Minimum synchronous read I/Os active to each device.
1010 See the section "ZFS I/O SCHEDULER".
1012 Default value: \fB10\fR.
1018 \fBzfs_vdev_sync_write_max_active\fR (int)
1021 Maximum synchronous write I/Os active to each device.
1022 See the section "ZFS I/O SCHEDULER".
1024 Default value: \fB10\fR.
1030 \fBzfs_vdev_sync_write_min_active\fR (int)
1033 Minimum synchronous write I/Os active to each device.
1034 See the section "ZFS I/O SCHEDULER".
1036 Default value: \fB10\fR.
1042 \fBzfs_disable_dup_eviction\fR (int)
1045 Disable duplicate buffer eviction
1047 Use \fB1\fR for yes and \fB0\fR for no (default).
1053 \fBzfs_expire_snapshot\fR (int)
1056 Seconds to expire .zfs/snapshot
1058 Default value: \fB300\fR.
1064 \fBzfs_admin_snapshot\fR (int)
1067 Allow the creation, removal, or renaming of entries in the .zfs/snapshot
1068 directory to cause the creation, destruction, or renaming of snapshots.
1069 When enabled this functionality works both locally and over NFS exports
1070 which have the 'no_root_squash' option set. This functionality is disabled
1073 Use \fB1\fR for yes and \fB0\fR for no (default).
1079 \fBzfs_flags\fR (int)
1082 Set additional debugging flags. The following flags may be bitwise-or'd
1094 Enable dprintf entries in the debug log.
1096 2 ZFS_DEBUG_DBUF_VERIFY *
1097 Enable extra dbuf verifications.
1099 4 ZFS_DEBUG_DNODE_VERIFY *
1100 Enable extra dnode verifications.
1102 8 ZFS_DEBUG_SNAPNAMES
1103 Enable snapshot name verification.
1106 Check for illegally modified ARC buffers.
1109 Enable spa_dbgmsg entries in the debug log.
1111 64 ZFS_DEBUG_ZIO_FREE
1112 Enable verification of block frees.
1114 128 ZFS_DEBUG_HISTOGRAM_VERIFY
1115 Enable extra spacemap histogram verifications.
1118 * Requires debug build.
1120 Default value: \fB0\fR.
1126 \fBzfs_free_leak_on_eio\fR (int)
1129 If destroy encounters an EIO while reading metadata (e.g. indirect
1130 blocks), space referenced by the missing metadata can not be freed.
1131 Normally this causes the background destroy to become "stalled", as
1132 it is unable to make forward progress. While in this stalled state,
1133 all remaining space to free from the error-encountering filesystem is
1134 "temporarily leaked". Set this flag to cause it to ignore the EIO,
1135 permanently leak the space from indirect blocks that can not be read,
1136 and continue to free everything else that it can.
1138 The default, "stalling" behavior is useful if the storage partially
1139 fails (i.e. some but not all i/os fail), and then later recovers. In
1140 this case, we will be able to continue pool operations while it is
1141 partially failed, and when it recovers, we can continue to free the
1142 space, with no leaks. However, note that this case is actually
1145 Typically pools either (a) fail completely (but perhaps temporarily,
1146 e.g. a top-level vdev going offline), or (b) have localized,
1147 permanent errors (e.g. disk returns the wrong data due to bit flip or
1148 firmware bug). In case (a), this setting does not matter because the
1149 pool will be suspended and the sync thread will not be able to make
1150 forward progress regardless. In case (b), because the error is
1151 permanent, the best we can do is leak the minimum amount of space,
1152 which is what setting this flag will do. Therefore, it is reasonable
1153 for this flag to normally be set, but we chose the more conservative
1154 approach of not setting it, so that there is no possibility of
1155 leaking space in the "partial temporary" failure case.
1157 Default value: \fB0\fR.
1163 \fBzfs_free_min_time_ms\fR (int)
1166 During a \fRzfs destroy\fB operation using \fRfeature@async_destroy\fB a minimum
1167 of this much time will be spent working on freeing blocks per txg.
1169 Default value: \fB1,000\fR.
1175 \fBzfs_immediate_write_sz\fR (long)
1178 Largest data block to write to zil. Larger blocks will be treated as if the
1179 dataset being written to had the property setting \fRlogbias=throughput\fB.
1181 Default value: \fB32,768\fR.
1187 \fBzfs_max_recordsize\fR (int)
1190 We currently support block sizes from 512 bytes to 16MB. The benefits of
1191 larger blocks, and thus larger IO, need to be weighed against the cost of
1192 COWing a giant block to modify one byte. Additionally, very large blocks
1193 can have an impact on i/o latency, and also potentially on the memory
1194 allocator. Therefore, we do not allow the recordsize to be set larger than
1195 zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1196 this tunable, and pools with larger blocks can always be imported and used,
1197 regardless of this setting.
1199 Default value: \fB1,048,576\fR.
1205 \fBzfs_mdcomp_disable\fR (int)
1208 Disable meta data compression
1210 Use \fB1\fR for yes and \fB0\fR for no (default).
1216 \fBzfs_metaslab_fragmentation_threshold\fR (int)
1219 Allow metaslabs to keep their active state as long as their fragmentation
1220 percentage is less than or equal to this value. An active metaslab that
1221 exceeds this threshold will no longer keep its active status allowing
1222 better metaslabs to be selected.
1224 Default value: \fB70\fR.
1230 \fBzfs_mg_fragmentation_threshold\fR (int)
1233 Metaslab groups are considered eligible for allocations if their
1234 fragmentation metric (measured as a percentage) is less than or equal to
1235 this value. If a metaslab group exceeds this threshold then it will be
1236 skipped unless all metaslab groups within the metaslab class have also
1237 crossed this threshold.
1239 Default value: \fB85\fR.
1245 \fBzfs_mg_noalloc_threshold\fR (int)
1248 Defines a threshold at which metaslab groups should be eligible for
1249 allocations. The value is expressed as a percentage of free space
1250 beyond which a metaslab group is always eligible for allocations.
1251 If a metaslab group's free space is less than or equal to the
1252 threshold, the allocator will avoid allocating to that group
1253 unless all groups in the pool have reached the threshold. Once all
1254 groups have reached the threshold, all groups are allowed to accept
1255 allocations. The default value of 0 disables the feature and causes
1256 all metaslab groups to be eligible for allocations.
1258 This parameter allows to deal with pools having heavily imbalanced
1259 vdevs such as would be the case when a new vdev has been added.
1260 Setting the threshold to a non-zero percentage will stop allocations
1261 from being made to vdevs that aren't filled to the specified percentage
1262 and allow lesser filled vdevs to acquire more allocations than they
1263 otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1265 Default value: \fB0\fR.
1271 \fBzfs_no_scrub_io\fR (int)
1274 Set for no scrub I/O. This results in scrubs not actually scrubbing data and
1275 simply doing a metadata crawl of the pool instead.
1277 Use \fB1\fR for yes and \fB0\fR for no (default).
1283 \fBzfs_no_scrub_prefetch\fR (int)
1286 Set to disable block prefetching for scrubs.
1288 Use \fB1\fR for yes and \fB0\fR for no (default).
1294 \fBzfs_nocacheflush\fR (int)
1297 Disable cache flush operations on disks when writing. Beware, this may cause
1298 corruption if disks re-order writes.
1300 Use \fB1\fR for yes and \fB0\fR for no (default).
1306 \fBzfs_nopwrite_enabled\fR (int)
1311 Use \fB1\fR for yes (default) and \fB0\fR to disable.
1317 \fBzfs_pd_bytes_max\fR (int)
1320 The number of bytes which should be prefetched during a pool traversal
1321 (eg: \fRzfs send\fB or other data crawling operations)
1323 Default value: \fB52,428,800\fR.
1329 \fBzfs_prefetch_disable\fR (int)
1332 This tunable disables predictive prefetch. Note that it leaves "prescient"
1333 prefetch (e.g. prefetch for zfs send) intact. Unlike predictive prefetch,
1334 prescient prefetch never issues i/os that end up not being needed, so it
1335 can't hurt performance.
1337 Use \fB1\fR for yes and \fB0\fR for no (default).
1343 \fBzfs_read_chunk_size\fR (long)
1346 Bytes to read per chunk
1348 Default value: \fB1,048,576\fR.
1354 \fBzfs_read_history\fR (int)
1357 Historic statistics for the last N reads will be available in
1358 \fR/proc/spl/kstat/zfs/POOLNAME/reads\fB
1360 Default value: \fB0\fR (no data is kept).
1366 \fBzfs_read_history_hits\fR (int)
1369 Include cache hits in read history
1371 Use \fB1\fR for yes and \fB0\fR for no (default).
1377 \fBzfs_recover\fR (int)
1380 Set to attempt to recover from fatal errors. This should only be used as a
1381 last resort, as it typically results in leaked space, or worse.
1383 Use \fB1\fR for yes and \fB0\fR for no (default).
1389 \fBzfs_resilver_delay\fR (int)
1392 Number of ticks to delay prior to issuing a resilver I/O operation when
1393 a non-resilver or non-scrub I/O operation has occurred within the past
1394 \fBzfs_scan_idle\fR ticks.
1396 Default value: \fB2\fR.
1402 \fBzfs_resilver_min_time_ms\fR (int)
1405 Resilvers are processed by the sync thread. While resilvering it will spend
1406 at least this much time working on a resilver between txg flushes.
1408 Default value: \fB3,000\fR.
1414 \fBzfs_scan_idle\fR (int)
1417 Idle window in clock ticks. During a scrub or a resilver, if
1418 a non-scrub or non-resilver I/O operation has occurred during this
1419 window, the next scrub or resilver operation is delayed by, respectively
1420 \fBzfs_scrub_delay\fR or \fBzfs_resilver_delay\fR ticks.
1422 Default value: \fB50\fR.
1428 \fBzfs_scan_min_time_ms\fR (int)
1431 Scrubs are processed by the sync thread. While scrubbing it will spend
1432 at least this much time working on a scrub between txg flushes.
1434 Default value: \fB1,000\fR.
1440 \fBzfs_scrub_delay\fR (int)
1443 Number of ticks to delay prior to issuing a scrub I/O operation when
1444 a non-scrub or non-resilver I/O operation has occurred within the past
1445 \fBzfs_scan_idle\fR ticks.
1447 Default value: \fB4\fR.
1453 \fBzfs_send_corrupt_data\fR (int)
1456 Allow sending of corrupt data (ignore read/checksum errors when sending data)
1458 Use \fB1\fR for yes and \fB0\fR for no (default).
1464 \fBzfs_sync_pass_deferred_free\fR (int)
1467 Flushing of data to disk is done in passes. Defer frees starting in this pass
1469 Default value: \fB2\fR.
1475 \fBzfs_sync_pass_dont_compress\fR (int)
1478 Don't compress starting in this pass
1480 Default value: \fB5\fR.
1486 \fBzfs_sync_pass_rewrite\fR (int)
1489 Rewrite new block pointers starting in this pass
1491 Default value: \fB2\fR.
1497 \fBzfs_top_maxinflight\fR (int)
1500 Max concurrent I/Os per top-level vdev (mirrors or raidz arrays) allowed during
1501 scrub or resilver operations.
1503 Default value: \fB32\fR.
1509 \fBzfs_txg_history\fR (int)
1512 Historic statistics for the last N txgs will be available in
1513 \fR/proc/spl/kstat/zfs/POOLNAME/txgs\fB
1515 Default value: \fB0\fR.
1521 \fBzfs_txg_timeout\fR (int)
1524 Flush dirty data to disk at least every N seconds (maximum txg duration)
1526 Default value: \fB5\fR.
1532 \fBzfs_vdev_aggregation_limit\fR (int)
1535 Max vdev I/O aggregation size
1537 Default value: \fB131,072\fR.
1543 \fBzfs_vdev_cache_bshift\fR (int)
1546 Shift size to inflate reads too
1548 Default value: \fB16\fR (effectively 65536).
1554 \fBzfs_vdev_cache_max\fR (int)
1557 Inflate reads small than this value to meet the \fBzfs_vdev_cache_bshift\fR
1560 Default value: \fB16384\fR.
1566 \fBzfs_vdev_cache_size\fR (int)
1569 Total size of the per-disk cache in bytes.
1571 Currently this feature is disabled as it has been found to not be helpful
1572 for performance and in some cases harmful.
1574 Default value: \fB0\fR.
1580 \fBzfs_vdev_mirror_rotating_inc\fR (int)
1583 A number by which the balancing algorithm increments the load calculation for
1584 the purpose of selecting the least busy mirror member when an I/O immediately
1585 follows its predecessor on rotational vdevs for the purpose of making decisions
1588 Default value: \fB0\fR.
1594 \fBzfs_vdev_mirror_rotating_seek_inc\fR (int)
1597 A number by which the balancing algorithm increments the load calculation for
1598 the purpose of selecting the least busy mirror member when an I/O lacks
1599 locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1600 this that are not immediately following the previous I/O are incremented by
1603 Default value: \fB5\fR.
1609 \fBzfs_vdev_mirror_rotating_seek_offset\fR (int)
1612 The maximum distance for the last queued I/O in which the balancing algorithm
1613 considers an I/O to have locality.
1614 See the section "ZFS I/O SCHEDULER".
1616 Default value: \fB1048576\fR.
1622 \fBzfs_vdev_mirror_non_rotating_inc\fR (int)
1625 A number by which the balancing algorithm increments the load calculation for
1626 the purpose of selecting the least busy mirror member on non-rotational vdevs
1627 when I/Os do not immediately follow one another.
1629 Default value: \fB0\fR.
1635 \fBzfs_vdev_mirror_non_rotating_seek_inc\fR (int)
1638 A number by which the balancing algorithm increments the load calculation for
1639 the purpose of selecting the least busy mirror member when an I/O lacks
1640 locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1641 this that are not immediately following the previous I/O are incremented by
1644 Default value: \fB1\fR.
1650 \fBzfs_vdev_read_gap_limit\fR (int)
1653 Aggregate read I/O operations if the gap on-disk between them is within this
1656 Default value: \fB32,768\fR.
1662 \fBzfs_vdev_scheduler\fR (charp)
1665 Set the Linux I/O scheduler on whole disk vdevs to this scheduler
1667 Default value: \fBnoop\fR.
1673 \fBzfs_vdev_write_gap_limit\fR (int)
1676 Aggregate write I/O over gap
1678 Default value: \fB4,096\fR.
1684 \fBzfs_vdev_raidz_impl\fR (string)
1687 Parameter for selecting raidz parity implementation to use.
1689 Options marked (always) below may be selected on module load as they are
1690 supported on all systems.
1691 The remaining options may only be set after the module is loaded, as they
1692 are available only if the implementations are compiled in and supported
1693 on the running system.
1695 Once the module is loaded, the content of
1696 /sys/module/zfs/parameters/zfs_vdev_raidz_impl will show available options
1697 with the currently selected one enclosed in [].
1698 Possible options are:
1699 fastest - (always) implementation selected using built-in benchmark
1700 original - (always) original raidz implementation
1701 scalar - (always) scalar raidz implementation
1702 sse2 - implementation using SSE2 instruction set (64bit x86 only)
1703 ssse3 - implementation using SSSE3 instruction set (64bit x86 only)
1704 avx2 - implementation using AVX2 instruction set (64bit x86 only)
1706 Default value: \fBfastest\fR.
1712 \fBzfs_zevent_cols\fR (int)
1715 When zevents are logged to the console use this as the word wrap width.
1717 Default value: \fB80\fR.
1723 \fBzfs_zevent_console\fR (int)
1726 Log events to the console
1728 Use \fB1\fR for yes and \fB0\fR for no (default).
1734 \fBzfs_zevent_len_max\fR (int)
1737 Max event queue length. A value of 0 will result in a calculated value which
1738 increases with the number of CPUs in the system (minimum 64 events). Events
1739 in the queue can be viewed with the \fBzpool events\fR command.
1741 Default value: \fB0\fR.
1747 \fBzil_replay_disable\fR (int)
1750 Disable intent logging replay. Can be disabled for recovery from corrupted
1753 Use \fB1\fR for yes and \fB0\fR for no (default).
1759 \fBzil_slog_limit\fR (ulong)
1762 Max commit bytes to separate log device
1764 Default value: \fB1,048,576\fR.
1770 \fBzio_delay_max\fR (int)
1773 A zevent will be logged if a ZIO operation takes more than N milliseconds to
1774 complete. Note that this is only a logging facility, not a timeout on
1777 Default value: \fB30,000\fR.
1783 \fBzio_requeue_io_start_cut_in_line\fR (int)
1786 Prioritize requeued I/O
1788 Default value: \fB0\fR.
1794 \fBzio_taskq_batch_pct\fR (uint)
1797 Percentage of online CPUs (or CPU cores, etc) which will run a worker thread
1798 for IO. These workers are responsible for IO work such as compression and
1799 checksum calculations. Fractional number of CPUs will be rounded down.
1801 The default value of 75 was chosen to avoid using all CPUs which can result in
1802 latency issues and inconsistent application performance, especially when high
1803 compression is enabled.
1805 Default value: \fB75\fR.
1811 \fBzvol_inhibit_dev\fR (uint)
1814 Do not create zvol device nodes. This may slightly improve startup time on
1815 systems with a very large number of zvols.
1817 Use \fB1\fR for yes and \fB0\fR for no (default).
1823 \fBzvol_major\fR (uint)
1826 Major number for zvol block devices
1828 Default value: \fB230\fR.
1834 \fBzvol_max_discard_blocks\fR (ulong)
1837 Discard (aka TRIM) operations done on zvols will be done in batches of this
1838 many blocks, where block size is determined by the \fBvolblocksize\fR property
1841 Default value: \fB16,384\fR.
1847 \fBzvol_prefetch_bytes\fR (uint)
1850 When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
1851 from the start and end of the volume. Prefetching these regions
1852 of the volume is desirable because they are likely to be accessed
1853 immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
1856 Default value: \fB131,072\fR.
1859 .SH ZFS I/O SCHEDULER
1860 ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
1861 The I/O scheduler determines when and in what order those operations are
1862 issued. The I/O scheduler divides operations into five I/O classes
1863 prioritized in the following order: sync read, sync write, async read,
1864 async write, and scrub/resilver. Each queue defines the minimum and
1865 maximum number of concurrent operations that may be issued to the
1866 device. In addition, the device has an aggregate maximum,
1867 \fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
1868 must not exceed the aggregate maximum. If the sum of the per-queue
1869 maximums exceeds the aggregate maximum, then the number of active I/Os
1870 may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
1871 be issued regardless of whether all per-queue minimums have been met.
1873 For many physical devices, throughput increases with the number of
1874 concurrent operations, but latency typically suffers. Further, physical
1875 devices typically have a limit at which more concurrent operations have no
1876 effect on throughput or can actually cause it to decrease.
1878 The scheduler selects the next operation to issue by first looking for an
1879 I/O class whose minimum has not been satisfied. Once all are satisfied and
1880 the aggregate maximum has not been hit, the scheduler looks for classes
1881 whose maximum has not been satisfied. Iteration through the I/O classes is
1882 done in the order specified above. No further operations are issued if the
1883 aggregate maximum number of concurrent operations has been hit or if there
1884 are no operations queued for an I/O class that has not hit its maximum.
1885 Every time an I/O is queued or an operation completes, the I/O scheduler
1886 looks for new operations to issue.
1888 In general, smaller max_active's will lead to lower latency of synchronous
1889 operations. Larger max_active's may lead to higher overall throughput,
1890 depending on underlying storage.
1892 The ratio of the queues' max_actives determines the balance of performance
1893 between reads, writes, and scrubs. E.g., increasing
1894 \fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
1895 more quickly, but reads and writes to have higher latency and lower throughput.
1897 All I/O classes have a fixed maximum number of outstanding operations
1898 except for the async write class. Asynchronous writes represent the data
1899 that is committed to stable storage during the syncing stage for
1900 transaction groups. Transaction groups enter the syncing state
1901 periodically so the number of queued async writes will quickly burst up
1902 and then bleed down to zero. Rather than servicing them as quickly as
1903 possible, the I/O scheduler changes the maximum number of active async
1904 write I/Os according to the amount of dirty data in the pool. Since
1905 both throughput and latency typically increase with the number of
1906 concurrent operations issued to physical devices, reducing the
1907 burstiness in the number of concurrent operations also stabilizes the
1908 response time of operations from other -- and in particular synchronous
1909 -- queues. In broad strokes, the I/O scheduler will issue more
1910 concurrent operations from the async write queue as there's more dirty
1915 The number of concurrent operations issued for the async write I/O class
1916 follows a piece-wise linear function defined by a few adjustable points.
1919 | o---------| <-- zfs_vdev_async_write_max_active
1926 |-------o | | <-- zfs_vdev_async_write_min_active
1927 0|_______^______|_________|
1928 0% | | 100% of zfs_dirty_data_max
1930 | `-- zfs_vdev_async_write_active_max_dirty_percent
1931 `--------- zfs_vdev_async_write_active_min_dirty_percent
1934 Until the amount of dirty data exceeds a minimum percentage of the dirty
1935 data allowed in the pool, the I/O scheduler will limit the number of
1936 concurrent operations to the minimum. As that threshold is crossed, the
1937 number of concurrent operations issued increases linearly to the maximum at
1938 the specified maximum percentage of the dirty data allowed in the pool.
1940 Ideally, the amount of dirty data on a busy pool will stay in the sloped
1941 part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
1942 and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
1943 maximum percentage, this indicates that the rate of incoming data is
1944 greater than the rate that the backend storage can handle. In this case, we
1945 must further throttle incoming writes, as described in the next section.
1947 .SH ZFS TRANSACTION DELAY
1948 We delay transactions when we've determined that the backend storage
1949 isn't able to accommodate the rate of incoming writes.
1951 If there is already a transaction waiting, we delay relative to when
1952 that transaction will finish waiting. This way the calculated delay time
1953 is independent of the number of threads concurrently executing
1956 If we are the only waiter, wait relative to when the transaction
1957 started, rather than the current time. This credits the transaction for
1958 "time already served", e.g. reading indirect blocks.
1960 The minimum time for a transaction to take is calculated as:
1962 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
1963 min_time is then capped at 100 milliseconds.
1966 The delay has two degrees of freedom that can be adjusted via tunables. The
1967 percentage of dirty data at which we start to delay is defined by
1968 \fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
1969 \fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
1970 delay after writing at full speed has failed to keep up with the incoming write
1971 rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
1972 this variable determines the amount of delay at the midpoint of the curve.
1976 10ms +-------------------------------------------------------------*+
1992 2ms + (midpoint) * +
1995 | zfs_delay_scale ----------> ******** |
1996 0 +-------------------------------------*********----------------+
1997 0% <- zfs_dirty_data_max -> 100%
2000 Note that since the delay is added to the outstanding time remaining on the
2001 most recent transaction, the delay is effectively the inverse of IOPS.
2002 Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
2003 was chosen such that small changes in the amount of accumulated dirty data
2004 in the first 3/4 of the curve yield relatively small differences in the
2007 The effects can be easier to understand when the amount of delay is
2008 represented on a log scale:
2012 100ms +-------------------------------------------------------------++
2021 + zfs_delay_scale ----------> ***** +
2032 +--------------------------------------------------------------+
2033 0% <- zfs_dirty_data_max -> 100%
2036 Note here that only as the amount of dirty data approaches its limit does
2037 the delay start to increase rapidly. The goal of a properly tuned system
2038 should be to keep the amount of dirty data out of that range by first
2039 ensuring that the appropriate limits are set for the I/O scheduler to reach
2040 optimal throughput on the backend storage, and then by changing the value
2041 of \fBzfs_delay_scale\fR to increase the steepness of the curve.