]> git.proxmox.com Git - mirror_zfs.git/blame - man/man5/zfs-module-parameters.5
Add kernel module auto-loading
[mirror_zfs.git] / man / man5 / zfs-module-parameters.5
CommitLineData
29714574
TF
1'\" te
2.\" Copyright (c) 2013 by Turbo Fredriksson <turbo@bayour.com>. All rights reserved.
d4a72f23 3.\" Copyright (c) 2017 Datto Inc.
29714574
TF
4.\" The contents of this file are subject to the terms of the Common Development
5.\" and Distribution License (the "License"). You may not use this file except
6.\" in compliance with the License. You can obtain a copy of the license at
7.\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
8.\"
9.\" See the License for the specific language governing permissions and
10.\" limitations under the License. When distributing Covered Code, include this
11.\" CDDL HEADER in each file and include the License file at
12.\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this
13.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
14.\" own identifying information:
15.\" Portions Copyright [yyyy] [name of copyright owner]
d4a72f23 16.TH ZFS-MODULE-PARAMETERS 5 "Oct 28, 2017"
29714574
TF
17.SH NAME
18zfs\-module\-parameters \- ZFS module parameters
19.SH DESCRIPTION
20.sp
21.LP
22Description of the different parameters to the ZFS module.
23
24.SS "Module parameters"
25.sp
26.LP
27
6d836e6f
RE
28.sp
29.ne 2
30.na
31\fBignore_hole_birth\fR (int)
32.ad
33.RS 12n
34When set, the hole_birth optimization will not be used, and all holes will
35always be sent on zfs send. Useful if you suspect your datasets are affected
36by a bug in hole_birth.
37.sp
9ea9e0b9 38Use \fB1\fR for on (default) and \fB0\fR for off.
6d836e6f
RE
39.RE
40
29714574
TF
41.sp
42.ne 2
43.na
44\fBl2arc_feed_again\fR (int)
45.ad
46.RS 12n
83426735
D
47Turbo L2ARC warm-up. When the L2ARC is cold the fill interval will be set as
48fast as possible.
29714574
TF
49.sp
50Use \fB1\fR for yes (default) and \fB0\fR to disable.
51.RE
52
53.sp
54.ne 2
55.na
56\fBl2arc_feed_min_ms\fR (ulong)
57.ad
58.RS 12n
83426735
D
59Min feed interval in milliseconds. Requires \fBl2arc_feed_again=1\fR and only
60applicable in related situations.
29714574
TF
61.sp
62Default value: \fB200\fR.
63.RE
64
65.sp
66.ne 2
67.na
68\fBl2arc_feed_secs\fR (ulong)
69.ad
70.RS 12n
71Seconds between L2ARC writing
72.sp
73Default value: \fB1\fR.
74.RE
75
76.sp
77.ne 2
78.na
79\fBl2arc_headroom\fR (ulong)
80.ad
81.RS 12n
83426735
D
82How far through the ARC lists to search for L2ARC cacheable content, expressed
83as a multiplier of \fBl2arc_write_max\fR
29714574
TF
84.sp
85Default value: \fB2\fR.
86.RE
87
88.sp
89.ne 2
90.na
91\fBl2arc_headroom_boost\fR (ulong)
92.ad
93.RS 12n
83426735
D
94Scales \fBl2arc_headroom\fR by this percentage when L2ARC contents are being
95successfully compressed before writing. A value of 100 disables this feature.
29714574 96.sp
be54a13c 97Default value: \fB200\fR%.
29714574
TF
98.RE
99
29714574
TF
100.sp
101.ne 2
102.na
103\fBl2arc_noprefetch\fR (int)
104.ad
105.RS 12n
83426735
D
106Do not write buffers to L2ARC if they were prefetched but not used by
107applications
29714574
TF
108.sp
109Use \fB1\fR for yes (default) and \fB0\fR to disable.
110.RE
111
112.sp
113.ne 2
114.na
115\fBl2arc_norw\fR (int)
116.ad
117.RS 12n
118No reads during writes
119.sp
120Use \fB1\fR for yes and \fB0\fR for no (default).
121.RE
122
123.sp
124.ne 2
125.na
126\fBl2arc_write_boost\fR (ulong)
127.ad
128.RS 12n
603a1784 129Cold L2ARC devices will have \fBl2arc_write_max\fR increased by this amount
83426735 130while they remain cold.
29714574
TF
131.sp
132Default value: \fB8,388,608\fR.
133.RE
134
135.sp
136.ne 2
137.na
138\fBl2arc_write_max\fR (ulong)
139.ad
140.RS 12n
141Max write bytes per interval
142.sp
143Default value: \fB8,388,608\fR.
144.RE
145
99b14de4
ED
146.sp
147.ne 2
148.na
149\fBmetaslab_aliquot\fR (ulong)
150.ad
151.RS 12n
152Metaslab granularity, in bytes. This is roughly similar to what would be
153referred to as the "stripe size" in traditional RAID arrays. In normal
154operation, ZFS will try to write this amount of data to a top-level vdev
155before moving on to the next one.
156.sp
157Default value: \fB524,288\fR.
158.RE
159
f3a7f661
GW
160.sp
161.ne 2
162.na
163\fBmetaslab_bias_enabled\fR (int)
164.ad
165.RS 12n
166Enable metaslab group biasing based on its vdev's over- or under-utilization
167relative to the pool.
168.sp
169Use \fB1\fR for yes (default) and \fB0\fR for no.
170.RE
171
4e21fd06
DB
172.sp
173.ne 2
174.na
175\fBzfs_metaslab_segment_weight_enabled\fR (int)
176.ad
177.RS 12n
178Enable/disable segment-based metaslab selection.
179.sp
180Use \fB1\fR for yes (default) and \fB0\fR for no.
181.RE
182
183.sp
184.ne 2
185.na
186\fBzfs_metaslab_switch_threshold\fR (int)
187.ad
188.RS 12n
189When using segment-based metaslab selection, continue allocating
321204be 190from the active metaslab until \fBzfs_metaslab_switch_threshold\fR
4e21fd06
DB
191worth of buckets have been exhausted.
192.sp
193Default value: \fB2\fR.
194.RE
195
29714574
TF
196.sp
197.ne 2
198.na
aa7d06a9 199\fBmetaslab_debug_load\fR (int)
29714574
TF
200.ad
201.RS 12n
aa7d06a9
GW
202Load all metaslabs during pool import.
203.sp
204Use \fB1\fR for yes and \fB0\fR for no (default).
205.RE
206
207.sp
208.ne 2
209.na
210\fBmetaslab_debug_unload\fR (int)
211.ad
212.RS 12n
213Prevent metaslabs from being unloaded.
29714574
TF
214.sp
215Use \fB1\fR for yes and \fB0\fR for no (default).
216.RE
217
f3a7f661
GW
218.sp
219.ne 2
220.na
221\fBmetaslab_fragmentation_factor_enabled\fR (int)
222.ad
223.RS 12n
224Enable use of the fragmentation metric in computing metaslab weights.
225.sp
226Use \fB1\fR for yes (default) and \fB0\fR for no.
227.RE
228
b8bcca18
MA
229.sp
230.ne 2
231.na
232\fBmetaslabs_per_vdev\fR (int)
233.ad
234.RS 12n
235When a vdev is added, it will be divided into approximately (but no more than) this number of metaslabs.
236.sp
237Default value: \fB200\fR.
238.RE
239
f3a7f661
GW
240.sp
241.ne 2
242.na
243\fBmetaslab_preload_enabled\fR (int)
244.ad
245.RS 12n
246Enable metaslab group preloading.
247.sp
248Use \fB1\fR for yes (default) and \fB0\fR for no.
249.RE
250
251.sp
252.ne 2
253.na
254\fBmetaslab_lba_weighting_enabled\fR (int)
255.ad
256.RS 12n
257Give more weight to metaslabs with lower LBAs, assuming they have
258greater bandwidth as is typically the case on a modern constant
259angular velocity disk drive.
260.sp
261Use \fB1\fR for yes (default) and \fB0\fR for no.
262.RE
263
29714574
TF
264.sp
265.ne 2
266.na
267\fBspa_config_path\fR (charp)
268.ad
269.RS 12n
270SPA config file
271.sp
272Default value: \fB/etc/zfs/zpool.cache\fR.
273.RE
274
e8b96c60
MA
275.sp
276.ne 2
277.na
278\fBspa_asize_inflation\fR (int)
279.ad
280.RS 12n
281Multiplication factor used to estimate actual disk consumption from the
282size of data being written. The default value is a worst case estimate,
283but lower values may be valid for a given pool depending on its
284configuration. Pool administrators who understand the factors involved
285may wish to specify a more realistic inflation factor, particularly if
286they operate close to quota or capacity limits.
287.sp
83426735 288Default value: \fB24\fR.
e8b96c60
MA
289.RE
290
dea377c0
MA
291.sp
292.ne 2
293.na
294\fBspa_load_verify_data\fR (int)
295.ad
296.RS 12n
297Whether to traverse data blocks during an "extreme rewind" (\fB-X\fR)
298import. Use 0 to disable and 1 to enable.
299
300An extreme rewind import normally performs a full traversal of all
301blocks in the pool for verification. If this parameter is set to 0,
302the traversal skips non-metadata blocks. It can be toggled once the
303import has started to stop or start the traversal of non-metadata blocks.
304.sp
83426735 305Default value: \fB1\fR.
dea377c0
MA
306.RE
307
308.sp
309.ne 2
310.na
311\fBspa_load_verify_metadata\fR (int)
312.ad
313.RS 12n
314Whether to traverse blocks during an "extreme rewind" (\fB-X\fR)
315pool import. Use 0 to disable and 1 to enable.
316
317An extreme rewind import normally performs a full traversal of all
1c012083 318blocks in the pool for verification. If this parameter is set to 0,
dea377c0
MA
319the traversal is not performed. It can be toggled once the import has
320started to stop or start the traversal.
321.sp
83426735 322Default value: \fB1\fR.
dea377c0
MA
323.RE
324
325.sp
326.ne 2
327.na
328\fBspa_load_verify_maxinflight\fR (int)
329.ad
330.RS 12n
331Maximum concurrent I/Os during the traversal performed during an "extreme
332rewind" (\fB-X\fR) pool import.
333.sp
83426735 334Default value: \fB10000\fR.
dea377c0
MA
335.RE
336
6cde6435
BB
337.sp
338.ne 2
339.na
340\fBspa_slop_shift\fR (int)
341.ad
342.RS 12n
343Normally, we don't allow the last 3.2% (1/(2^spa_slop_shift)) of space
344in the pool to be consumed. This ensures that we don't run the pool
345completely out of space, due to unaccounted changes (e.g. to the MOS).
346It also limits the worst-case time to allocate space. If we have
347less than this amount of free space, most ZPL operations (e.g. write,
348create) will return ENOSPC.
349.sp
83426735 350Default value: \fB5\fR.
6cde6435
BB
351.RE
352
29714574
TF
353.sp
354.ne 2
355.na
356\fBzfetch_array_rd_sz\fR (ulong)
357.ad
358.RS 12n
27b293be 359If prefetching is enabled, disable prefetching for reads larger than this size.
29714574
TF
360.sp
361Default value: \fB1,048,576\fR.
362.RE
363
364.sp
365.ne 2
366.na
7f60329a 367\fBzfetch_max_distance\fR (uint)
29714574
TF
368.ad
369.RS 12n
7f60329a 370Max bytes to prefetch per stream (default 8MB).
29714574 371.sp
7f60329a 372Default value: \fB8,388,608\fR.
29714574
TF
373.RE
374
375.sp
376.ne 2
377.na
378\fBzfetch_max_streams\fR (uint)
379.ad
380.RS 12n
27b293be 381Max number of streams per zfetch (prefetch streams per file).
29714574
TF
382.sp
383Default value: \fB8\fR.
384.RE
385
386.sp
387.ne 2
388.na
389\fBzfetch_min_sec_reap\fR (uint)
390.ad
391.RS 12n
27b293be 392Min time before an active prefetch stream can be reclaimed
29714574
TF
393.sp
394Default value: \fB2\fR.
395.RE
396
25458cbe
TC
397.sp
398.ne 2
399.na
400\fBzfs_arc_dnode_limit\fR (ulong)
401.ad
402.RS 12n
403When the number of bytes consumed by dnodes in the ARC exceeds this number of
9907cc1c 404bytes, try to unpin some of it in response to demand for non-metadata. This
627791f3 405value acts as a ceiling to the amount of dnode metadata, and defaults to 0 which
9907cc1c
G
406indicates that a percent which is based on \fBzfs_arc_dnode_limit_percent\fR of
407the ARC meta buffers that may be used for dnodes.
25458cbe
TC
408
409See also \fBzfs_arc_meta_prune\fR which serves a similar purpose but is used
410when the amount of metadata in the ARC exceeds \fBzfs_arc_meta_limit\fR rather
411than in response to overall demand for non-metadata.
412
413.sp
9907cc1c
G
414Default value: \fB0\fR.
415.RE
416
417.sp
418.ne 2
419.na
420\fBzfs_arc_dnode_limit_percent\fR (ulong)
421.ad
422.RS 12n
423Percentage that can be consumed by dnodes of ARC meta buffers.
424.sp
425See also \fBzfs_arc_dnode_limit\fR which serves a similar purpose but has a
426higher priority if set to nonzero value.
427.sp
be54a13c 428Default value: \fB10\fR%.
25458cbe
TC
429.RE
430
431.sp
432.ne 2
433.na
434\fBzfs_arc_dnode_reduce_percent\fR (ulong)
435.ad
436.RS 12n
437Percentage of ARC dnodes to try to scan in response to demand for non-metadata
6146e17e 438when the number of bytes consumed by dnodes exceeds \fBzfs_arc_dnode_limit\fR.
25458cbe
TC
439
440.sp
be54a13c 441Default value: \fB10\fR% of the number of dnodes in the ARC.
25458cbe
TC
442.RE
443
49ddb315
MA
444.sp
445.ne 2
446.na
447\fBzfs_arc_average_blocksize\fR (int)
448.ad
449.RS 12n
450The ARC's buffer hash table is sized based on the assumption of an average
451block size of \fBzfs_arc_average_blocksize\fR (default 8K). This works out
452to roughly 1MB of hash table per 1GB of physical memory with 8-byte pointers.
453For configurations with a known larger average block size this value can be
454increased to reduce the memory footprint.
455
456.sp
457Default value: \fB8192\fR.
458.RE
459
ca0bf58d
PS
460.sp
461.ne 2
462.na
463\fBzfs_arc_evict_batch_limit\fR (int)
464.ad
465.RS 12n
8f343973 466Number ARC headers to evict per sub-list before proceeding to another sub-list.
ca0bf58d
PS
467This batch-style operation prevents entire sub-lists from being evicted at once
468but comes at a cost of additional unlocking and locking.
469.sp
470Default value: \fB10\fR.
471.RE
472
29714574
TF
473.sp
474.ne 2
475.na
476\fBzfs_arc_grow_retry\fR (int)
477.ad
478.RS 12n
ca85d690 479If set to a non zero value, it will replace the arc_grow_retry value with this value.
d4a72f23 480The arc_grow_retry value (default 5) is the number of seconds the ARC will wait before
ca85d690 481trying to resume growth after a memory pressure event.
29714574 482.sp
ca85d690 483Default value: \fB0\fR.
29714574
TF
484.RE
485
486.sp
487.ne 2
488.na
7e8bddd0 489\fBzfs_arc_lotsfree_percent\fR (int)
29714574
TF
490.ad
491.RS 12n
7e8bddd0
BB
492Throttle I/O when free system memory drops below this percentage of total
493system memory. Setting this value to 0 will disable the throttle.
29714574 494.sp
be54a13c 495Default value: \fB10\fR%.
29714574
TF
496.RE
497
498.sp
499.ne 2
500.na
7e8bddd0 501\fBzfs_arc_max\fR (ulong)
29714574
TF
502.ad
503.RS 12n
83426735
D
504Max arc size of ARC in bytes. If set to 0 then it will consume 1/2 of system
505RAM. This value must be at least 67108864 (64 megabytes).
506.sp
507This value can be changed dynamically with some caveats. It cannot be set back
508to 0 while running and reducing it below the current ARC size will not cause
509the ARC to shrink without memory pressure to induce shrinking.
29714574 510.sp
7e8bddd0 511Default value: \fB0\fR.
29714574
TF
512.RE
513
ca85d690 514.sp
515.ne 2
516.na
517\fBzfs_arc_meta_adjust_restarts\fR (ulong)
518.ad
519.RS 12n
520The number of restart passes to make while scanning the ARC attempting
521the free buffers in order to stay below the \fBzfs_arc_meta_limit\fR.
522This value should not need to be tuned but is available to facilitate
523performance analysis.
524.sp
525Default value: \fB4096\fR.
526.RE
527
29714574
TF
528.sp
529.ne 2
530.na
531\fBzfs_arc_meta_limit\fR (ulong)
532.ad
533.RS 12n
2cbb06b5
BB
534The maximum allowed size in bytes that meta data buffers are allowed to
535consume in the ARC. When this limit is reached meta data buffers will
536be reclaimed even if the overall arc_c_max has not been reached. This
9907cc1c
G
537value defaults to 0 which indicates that a percent which is based on
538\fBzfs_arc_meta_limit_percent\fR of the ARC may be used for meta data.
29714574 539.sp
83426735 540This value my be changed dynamically except that it cannot be set back to 0
9907cc1c 541for a specific percent of the ARC; it must be set to an explicit value.
83426735 542.sp
29714574
TF
543Default value: \fB0\fR.
544.RE
545
9907cc1c
G
546.sp
547.ne 2
548.na
549\fBzfs_arc_meta_limit_percent\fR (ulong)
550.ad
551.RS 12n
552Percentage of ARC buffers that can be used for meta data.
553
554See also \fBzfs_arc_meta_limit\fR which serves a similar purpose but has a
555higher priority if set to nonzero value.
556
557.sp
be54a13c 558Default value: \fB75\fR%.
9907cc1c
G
559.RE
560
ca0bf58d
PS
561.sp
562.ne 2
563.na
564\fBzfs_arc_meta_min\fR (ulong)
565.ad
566.RS 12n
567The minimum allowed size in bytes that meta data buffers may consume in
568the ARC. This value defaults to 0 which disables a floor on the amount
569of the ARC devoted meta data.
570.sp
571Default value: \fB0\fR.
572.RE
573
29714574
TF
574.sp
575.ne 2
576.na
577\fBzfs_arc_meta_prune\fR (int)
578.ad
579.RS 12n
2cbb06b5
BB
580The number of dentries and inodes to be scanned looking for entries
581which can be dropped. This may be required when the ARC reaches the
582\fBzfs_arc_meta_limit\fR because dentries and inodes can pin buffers
583in the ARC. Increasing this value will cause to dentry and inode caches
584to be pruned more aggressively. Setting this value to 0 will disable
585pruning the inode and dentry caches.
29714574 586.sp
2cbb06b5 587Default value: \fB10,000\fR.
29714574
TF
588.RE
589
bc888666
BB
590.sp
591.ne 2
592.na
ca85d690 593\fBzfs_arc_meta_strategy\fR (int)
bc888666
BB
594.ad
595.RS 12n
ca85d690 596Define the strategy for ARC meta data buffer eviction (meta reclaim strategy).
597A value of 0 (META_ONLY) will evict only the ARC meta data buffers.
d4a72f23 598A value of 1 (BALANCED) indicates that additional data buffers may be evicted if
ca85d690 599that is required to in order to evict the required number of meta data buffers.
bc888666 600.sp
ca85d690 601Default value: \fB1\fR.
bc888666
BB
602.RE
603
29714574
TF
604.sp
605.ne 2
606.na
607\fBzfs_arc_min\fR (ulong)
608.ad
609.RS 12n
ca85d690 610Min arc size of ARC in bytes. If set to 0 then arc_c_min will default to
611consuming the larger of 32M or 1/32 of total system memory.
29714574 612.sp
ca85d690 613Default value: \fB0\fR.
29714574
TF
614.RE
615
616.sp
617.ne 2
618.na
d4a72f23 619\fBzfs_arc_min_prefetch_ms\fR (int)
29714574
TF
620.ad
621.RS 12n
d4a72f23 622Minimum time prefetched blocks are locked in the ARC, specified in ms.
2b84817f 623A value of \fB0\fR will default to 1000 ms.
d4a72f23
TC
624.sp
625Default value: \fB0\fR.
626.RE
627
628.sp
629.ne 2
630.na
631\fBzfs_arc_min_prescient_prefetch_ms\fR (int)
632.ad
633.RS 12n
634Minimum time "prescient prefetched" blocks are locked in the ARC, specified
635in ms. These blocks are meant to be prefetched fairly aggresively ahead of
2b84817f 636the code that may use them. A value of \fB0\fR will default to 6000 ms.
29714574 637.sp
83426735 638Default value: \fB0\fR.
29714574
TF
639.RE
640
ca0bf58d
PS
641.sp
642.ne 2
643.na
c30e58c4 644\fBzfs_multilist_num_sublists\fR (int)
ca0bf58d
PS
645.ad
646.RS 12n
647To allow more fine-grained locking, each ARC state contains a series
648of lists for both data and meta data objects. Locking is performed at
649the level of these "sub-lists". This parameters controls the number of
c30e58c4
MA
650sub-lists per ARC state, and also applies to other uses of the
651multilist data structure.
ca0bf58d 652.sp
c30e58c4 653Default value: \fB4\fR or the number of online CPUs, whichever is greater
ca0bf58d
PS
654.RE
655
656.sp
657.ne 2
658.na
659\fBzfs_arc_overflow_shift\fR (int)
660.ad
661.RS 12n
662The ARC size is considered to be overflowing if it exceeds the current
663ARC target size (arc_c) by a threshold determined by this parameter.
664The threshold is calculated as a fraction of arc_c using the formula
665"arc_c >> \fBzfs_arc_overflow_shift\fR".
666
667The default value of 8 causes the ARC to be considered to be overflowing
668if it exceeds the target size by 1/256th (0.3%) of the target size.
669
670When the ARC is overflowing, new buffer allocations are stalled until
671the reclaim thread catches up and the overflow condition no longer exists.
672.sp
673Default value: \fB8\fR.
674.RE
675
728d6ae9
BB
676.sp
677.ne 2
678.na
679
680\fBzfs_arc_p_min_shift\fR (int)
681.ad
682.RS 12n
ca85d690 683If set to a non zero value, this will update arc_p_min_shift (default 4)
684with the new value.
d4a72f23 685arc_p_min_shift is used to shift of arc_c for calculating both min and max
ca85d690 686max arc_p
728d6ae9 687.sp
ca85d690 688Default value: \fB0\fR.
728d6ae9
BB
689.RE
690
62422785
PS
691.sp
692.ne 2
693.na
694\fBzfs_arc_p_dampener_disable\fR (int)
695.ad
696.RS 12n
697Disable arc_p adapt dampener
698.sp
699Use \fB1\fR for yes (default) and \fB0\fR to disable.
700.RE
701
29714574
TF
702.sp
703.ne 2
704.na
705\fBzfs_arc_shrink_shift\fR (int)
706.ad
707.RS 12n
ca85d690 708If set to a non zero value, this will update arc_shrink_shift (default 7)
709with the new value.
29714574 710.sp
ca85d690 711Default value: \fB0\fR.
29714574
TF
712.RE
713
03b60eee
DB
714.sp
715.ne 2
716.na
717\fBzfs_arc_pc_percent\fR (uint)
718.ad
719.RS 12n
720Percent of pagecache to reclaim arc to
721
722This tunable allows ZFS arc to play more nicely with the kernel's LRU
723pagecache. It can guarantee that the arc size won't collapse under scanning
724pressure on the pagecache, yet still allows arc to be reclaimed down to
725zfs_arc_min if necessary. This value is specified as percent of pagecache
726size (as measured by NR_FILE_PAGES) where that percent may exceed 100. This
727only operates during memory pressure/reclaim.
728.sp
be54a13c 729Default value: \fB0\fR% (disabled).
03b60eee
DB
730.RE
731
11f552fa
BB
732.sp
733.ne 2
734.na
735\fBzfs_arc_sys_free\fR (ulong)
736.ad
737.RS 12n
738The target number of bytes the ARC should leave as free memory on the system.
739Defaults to the larger of 1/64 of physical memory or 512K. Setting this
740option to a non-zero value will override the default.
741.sp
742Default value: \fB0\fR.
743.RE
744
29714574
TF
745.sp
746.ne 2
747.na
748\fBzfs_autoimport_disable\fR (int)
749.ad
750.RS 12n
27b293be 751Disable pool import at module load by ignoring the cache file (typically \fB/etc/zfs/zpool.cache\fR).
29714574 752.sp
70081096 753Use \fB1\fR for yes (default) and \fB0\fR for no.
29714574
TF
754.RE
755
80d52c39
TH
756.sp
757.ne 2
758.na
759\fBzfs_checksums_per_second\fR (int)
760.ad
761.RS 12n
762Rate limit checksum events to this many per second. Note that this should
763not be set below the zed thresholds (currently 10 checksums over 10 sec)
764or else zed may not trigger any action.
765.sp
766Default value: 20
767.RE
768
2fe61a7e
PS
769.sp
770.ne 2
771.na
772\fBzfs_commit_timeout_pct\fR (int)
773.ad
774.RS 12n
775This controls the amount of time that a ZIL block (lwb) will remain "open"
776when it isn't "full", and it has a thread waiting for it to be committed to
777stable storage. The timeout is scaled based on a percentage of the last lwb
778latency to avoid significantly impacting the latency of each individual
779transaction record (itx).
780.sp
be54a13c 781Default value: \fB5\fR%.
2fe61a7e
PS
782.RE
783
3b36f831
BB
784.sp
785.ne 2
786.na
787\fBzfs_dbgmsg_enable\fR (int)
788.ad
789.RS 12n
790Internally ZFS keeps a small log to facilitate debugging. By default the log
791is disabled, to enable it set this option to 1. The contents of the log can
792be accessed by reading the /proc/spl/kstat/zfs/dbgmsg file. Writing 0 to
793this proc file clears the log.
794.sp
795Default value: \fB0\fR.
796.RE
797
798.sp
799.ne 2
800.na
801\fBzfs_dbgmsg_maxsize\fR (int)
802.ad
803.RS 12n
804The maximum size in bytes of the internal ZFS debug log.
805.sp
806Default value: \fB4M\fR.
807.RE
808
29714574
TF
809.sp
810.ne 2
811.na
812\fBzfs_dbuf_state_index\fR (int)
813.ad
814.RS 12n
83426735
D
815This feature is currently unused. It is normally used for controlling what
816reporting is available under /proc/spl/kstat/zfs.
29714574
TF
817.sp
818Default value: \fB0\fR.
819.RE
820
821.sp
822.ne 2
823.na
824\fBzfs_deadman_enabled\fR (int)
825.ad
826.RS 12n
b81a3ddc 827When a pool sync operation takes longer than \fBzfs_deadman_synctime_ms\fR
8fb1ede1
BB
828milliseconds, or when an individual I/O takes longer than
829\fBzfs_deadman_ziotime_ms\fR milliseconds, then the operation is considered to
830be "hung". If \fBzfs_deadman_enabled\fR is set then the deadman behavior is
831invoked as described by the \fBzfs_deadman_failmode\fR module option.
832By default the deadman is enabled and configured to \fBwait\fR which results
833in "hung" I/Os only being logged. The deadman is automatically disabled
834when a pool gets suspended.
29714574 835.sp
8fb1ede1
BB
836Default value: \fB1\fR.
837.RE
838
839.sp
840.ne 2
841.na
842\fBzfs_deadman_failmode\fR (charp)
843.ad
844.RS 12n
845Controls the failure behavior when the deadman detects a "hung" I/O. Valid
846values are \fBwait\fR, \fBcontinue\fR, and \fBpanic\fR.
847.sp
848\fBwait\fR - Wait for a "hung" I/O to complete. For each "hung" I/O a
849"deadman" event will be posted describing that I/O.
850.sp
851\fBcontinue\fR - Attempt to recover from a "hung" I/O by re-dispatching it
852to the I/O pipeline if possible.
853.sp
854\fBpanic\fR - Panic the system. This can be used to facilitate an automatic
855fail-over to a properly configured fail-over partner.
856.sp
857Default value: \fBwait\fR.
b81a3ddc
TC
858.RE
859
860.sp
861.ne 2
862.na
863\fBzfs_deadman_checktime_ms\fR (int)
864.ad
865.RS 12n
8fb1ede1
BB
866Check time in milliseconds. This defines the frequency at which we check
867for hung I/O and potentially invoke the \fBzfs_deadman_failmode\fR behavior.
b81a3ddc 868.sp
8fb1ede1 869Default value: \fB60,000\fR.
29714574
TF
870.RE
871
872.sp
873.ne 2
874.na
e8b96c60 875\fBzfs_deadman_synctime_ms\fR (ulong)
29714574
TF
876.ad
877.RS 12n
b81a3ddc 878Interval in milliseconds after which the deadman is triggered and also
8fb1ede1
BB
879the interval after which a pool sync operation is considered to be "hung".
880Once this limit is exceeded the deadman will be invoked every
881\fBzfs_deadman_checktime_ms\fR milliseconds until the pool sync completes.
882.sp
883Default value: \fB600,000\fR.
884.RE
b81a3ddc 885
29714574 886.sp
8fb1ede1
BB
887.ne 2
888.na
889\fBzfs_deadman_ziotime_ms\fR (ulong)
890.ad
891.RS 12n
892Interval in milliseconds after which the deadman is triggered and an
893individual IO operation is considered to be "hung". As long as the I/O
894remains "hung" the deadman will be invoked every \fBzfs_deadman_checktime_ms\fR
895milliseconds until the I/O completes.
896.sp
897Default value: \fB300,000\fR.
29714574
TF
898.RE
899
900.sp
901.ne 2
902.na
903\fBzfs_dedup_prefetch\fR (int)
904.ad
905.RS 12n
906Enable prefetching dedup-ed blks
907.sp
0dfc7324 908Use \fB1\fR for yes and \fB0\fR to disable (default).
29714574
TF
909.RE
910
e8b96c60
MA
911.sp
912.ne 2
913.na
914\fBzfs_delay_min_dirty_percent\fR (int)
915.ad
916.RS 12n
917Start to delay each transaction once there is this amount of dirty data,
918expressed as a percentage of \fBzfs_dirty_data_max\fR.
919This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
920See the section "ZFS TRANSACTION DELAY".
921.sp
be54a13c 922Default value: \fB60\fR%.
e8b96c60
MA
923.RE
924
925.sp
926.ne 2
927.na
928\fBzfs_delay_scale\fR (int)
929.ad
930.RS 12n
931This controls how quickly the transaction delay approaches infinity.
932Larger values cause longer delays for a given amount of dirty data.
933.sp
934For the smoothest delay, this value should be about 1 billion divided
935by the maximum number of operations per second. This will smoothly
936handle between 10x and 1/10th this number.
937.sp
938See the section "ZFS TRANSACTION DELAY".
939.sp
940Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
941.sp
942Default value: \fB500,000\fR.
943.RE
944
80d52c39
TH
945.sp
946.ne 2
947.na
948\fBzfs_delays_per_second\fR (int)
949.ad
950.RS 12n
951Rate limit IO delay events to this many per second.
952.sp
953Default value: 20
954.RE
955
a966c564
K
956.sp
957.ne 2
958.na
959\fBzfs_delete_blocks\fR (ulong)
960.ad
961.RS 12n
962This is the used to define a large file for the purposes of delete. Files
963containing more than \fBzfs_delete_blocks\fR will be deleted asynchronously
964while smaller files are deleted synchronously. Decreasing this value will
965reduce the time spent in an unlink(2) system call at the expense of a longer
966delay before the freed space is available.
967.sp
968Default value: \fB20,480\fR.
969.RE
970
e8b96c60
MA
971.sp
972.ne 2
973.na
974\fBzfs_dirty_data_max\fR (int)
975.ad
976.RS 12n
977Determines the dirty space limit in bytes. Once this limit is exceeded, new
978writes are halted until space frees up. This parameter takes precedence
979over \fBzfs_dirty_data_max_percent\fR.
980See the section "ZFS TRANSACTION DELAY".
981.sp
be54a13c 982Default value: \fB10\fR% of physical RAM, capped at \fBzfs_dirty_data_max_max\fR.
e8b96c60
MA
983.RE
984
985.sp
986.ne 2
987.na
988\fBzfs_dirty_data_max_max\fR (int)
989.ad
990.RS 12n
991Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
992This limit is only enforced at module load time, and will be ignored if
993\fBzfs_dirty_data_max\fR is later changed. This parameter takes
994precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
995"ZFS TRANSACTION DELAY".
996.sp
be54a13c 997Default value: \fB25\fR% of physical RAM.
e8b96c60
MA
998.RE
999
1000.sp
1001.ne 2
1002.na
1003\fBzfs_dirty_data_max_max_percent\fR (int)
1004.ad
1005.RS 12n
1006Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
1007percentage of physical RAM. This limit is only enforced at module load
1008time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
1009The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
1010one. See the section "ZFS TRANSACTION DELAY".
1011.sp
be54a13c 1012Default value: \fB25\fR%.
e8b96c60
MA
1013.RE
1014
1015.sp
1016.ne 2
1017.na
1018\fBzfs_dirty_data_max_percent\fR (int)
1019.ad
1020.RS 12n
1021Determines the dirty space limit, expressed as a percentage of all
1022memory. Once this limit is exceeded, new writes are halted until space frees
1023up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
1024one. See the section "ZFS TRANSACTION DELAY".
1025.sp
be54a13c 1026Default value: \fB10\fR%, subject to \fBzfs_dirty_data_max_max\fR.
e8b96c60
MA
1027.RE
1028
1029.sp
1030.ne 2
1031.na
1032\fBzfs_dirty_data_sync\fR (int)
1033.ad
1034.RS 12n
1035Start syncing out a transaction group if there is at least this much dirty data.
1036.sp
1037Default value: \fB67,108,864\fR.
1038.RE
1039
1eeb4562
JX
1040.sp
1041.ne 2
1042.na
1043\fBzfs_fletcher_4_impl\fR (string)
1044.ad
1045.RS 12n
1046Select a fletcher 4 implementation.
1047.sp
35a76a03 1048Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
24cdeaf1 1049\fBavx2\fR, \fBavx512f\fR, and \fBaarch64_neon\fR.
70b258fc
GN
1050All of the selectors except \fBfastest\fR and \fBscalar\fR require instruction
1051set extensions to be available and will only appear if ZFS detects that they are
1052present at runtime. If multiple implementations of fletcher 4 are available,
1053the \fBfastest\fR will be chosen using a micro benchmark. Selecting \fBscalar\fR
1054results in the original, CPU based calculation, being used. Selecting any option
1055other than \fBfastest\fR and \fBscalar\fR results in vector instructions from
1056the respective CPU instruction set being used.
1eeb4562
JX
1057.sp
1058Default value: \fBfastest\fR.
1059.RE
1060
ba5ad9a4
GW
1061.sp
1062.ne 2
1063.na
1064\fBzfs_free_bpobj_enabled\fR (int)
1065.ad
1066.RS 12n
1067Enable/disable the processing of the free_bpobj object.
1068.sp
1069Default value: \fB1\fR.
1070.RE
1071
36283ca2
MG
1072.sp
1073.ne 2
1074.na
1075\fBzfs_free_max_blocks\fR (ulong)
1076.ad
1077.RS 12n
1078Maximum number of blocks freed in a single txg.
1079.sp
1080Default value: \fB100,000\fR.
1081.RE
1082
e8b96c60
MA
1083.sp
1084.ne 2
1085.na
1086\fBzfs_vdev_async_read_max_active\fR (int)
1087.ad
1088.RS 12n
83426735 1089Maximum asynchronous read I/Os active to each device.
e8b96c60
MA
1090See the section "ZFS I/O SCHEDULER".
1091.sp
1092Default value: \fB3\fR.
1093.RE
1094
1095.sp
1096.ne 2
1097.na
1098\fBzfs_vdev_async_read_min_active\fR (int)
1099.ad
1100.RS 12n
1101Minimum asynchronous read I/Os active to each device.
1102See the section "ZFS I/O SCHEDULER".
1103.sp
1104Default value: \fB1\fR.
1105.RE
1106
1107.sp
1108.ne 2
1109.na
1110\fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
1111.ad
1112.RS 12n
1113When the pool has more than
1114\fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
1115\fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
1116the dirty data is between min and max, the active I/O limit is linearly
1117interpolated. See the section "ZFS I/O SCHEDULER".
1118.sp
be54a13c 1119Default value: \fB60\fR%.
e8b96c60
MA
1120.RE
1121
1122.sp
1123.ne 2
1124.na
1125\fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
1126.ad
1127.RS 12n
1128When the pool has less than
1129\fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
1130\fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
1131the dirty data is between min and max, the active I/O limit is linearly
1132interpolated. See the section "ZFS I/O SCHEDULER".
1133.sp
be54a13c 1134Default value: \fB30\fR%.
e8b96c60
MA
1135.RE
1136
1137.sp
1138.ne 2
1139.na
1140\fBzfs_vdev_async_write_max_active\fR (int)
1141.ad
1142.RS 12n
83426735 1143Maximum asynchronous write I/Os active to each device.
e8b96c60
MA
1144See the section "ZFS I/O SCHEDULER".
1145.sp
1146Default value: \fB10\fR.
1147.RE
1148
1149.sp
1150.ne 2
1151.na
1152\fBzfs_vdev_async_write_min_active\fR (int)
1153.ad
1154.RS 12n
1155Minimum asynchronous write I/Os active to each device.
1156See the section "ZFS I/O SCHEDULER".
1157.sp
06226b59
D
1158Lower values are associated with better latency on rotational media but poorer
1159resilver performance. The default value of 2 was chosen as a compromise. A
1160value of 3 has been shown to improve resilver performance further at a cost of
1161further increasing latency.
1162.sp
1163Default value: \fB2\fR.
e8b96c60
MA
1164.RE
1165
1166.sp
1167.ne 2
1168.na
1169\fBzfs_vdev_max_active\fR (int)
1170.ad
1171.RS 12n
1172The maximum number of I/Os active to each device. Ideally, this will be >=
1173the sum of each queue's max_active. It must be at least the sum of each
1174queue's min_active. See the section "ZFS I/O SCHEDULER".
1175.sp
1176Default value: \fB1,000\fR.
1177.RE
1178
1179.sp
1180.ne 2
1181.na
1182\fBzfs_vdev_scrub_max_active\fR (int)
1183.ad
1184.RS 12n
83426735 1185Maximum scrub I/Os active to each device.
e8b96c60
MA
1186See the section "ZFS I/O SCHEDULER".
1187.sp
1188Default value: \fB2\fR.
1189.RE
1190
1191.sp
1192.ne 2
1193.na
1194\fBzfs_vdev_scrub_min_active\fR (int)
1195.ad
1196.RS 12n
1197Minimum scrub I/Os active to each device.
1198See the section "ZFS I/O SCHEDULER".
1199.sp
1200Default value: \fB1\fR.
1201.RE
1202
1203.sp
1204.ne 2
1205.na
1206\fBzfs_vdev_sync_read_max_active\fR (int)
1207.ad
1208.RS 12n
83426735 1209Maximum synchronous read I/Os active to each device.
e8b96c60
MA
1210See the section "ZFS I/O SCHEDULER".
1211.sp
1212Default value: \fB10\fR.
1213.RE
1214
1215.sp
1216.ne 2
1217.na
1218\fBzfs_vdev_sync_read_min_active\fR (int)
1219.ad
1220.RS 12n
1221Minimum synchronous read I/Os active to each device.
1222See the section "ZFS I/O SCHEDULER".
1223.sp
1224Default value: \fB10\fR.
1225.RE
1226
1227.sp
1228.ne 2
1229.na
1230\fBzfs_vdev_sync_write_max_active\fR (int)
1231.ad
1232.RS 12n
83426735 1233Maximum synchronous write I/Os active to each device.
e8b96c60
MA
1234See the section "ZFS I/O SCHEDULER".
1235.sp
1236Default value: \fB10\fR.
1237.RE
1238
1239.sp
1240.ne 2
1241.na
1242\fBzfs_vdev_sync_write_min_active\fR (int)
1243.ad
1244.RS 12n
1245Minimum synchronous write I/Os active to each device.
1246See the section "ZFS I/O SCHEDULER".
1247.sp
1248Default value: \fB10\fR.
1249.RE
1250
3dfb57a3
DB
1251.sp
1252.ne 2
1253.na
1254\fBzfs_vdev_queue_depth_pct\fR (int)
1255.ad
1256.RS 12n
e815485f
TC
1257Maximum number of queued allocations per top-level vdev expressed as
1258a percentage of \fBzfs_vdev_async_write_max_active\fR which allows the
1259system to detect devices that are more capable of handling allocations
1260and to allocate more blocks to those devices. It allows for dynamic
1261allocation distribution when devices are imbalanced as fuller devices
1262will tend to be slower than empty devices.
1263
1264See also \fBzio_dva_throttle_enabled\fR.
3dfb57a3 1265.sp
be54a13c 1266Default value: \fB1000\fR%.
3dfb57a3
DB
1267.RE
1268
29714574
TF
1269.sp
1270.ne 2
1271.na
1272\fBzfs_expire_snapshot\fR (int)
1273.ad
1274.RS 12n
1275Seconds to expire .zfs/snapshot
1276.sp
1277Default value: \fB300\fR.
1278.RE
1279
0500e835
BB
1280.sp
1281.ne 2
1282.na
1283\fBzfs_admin_snapshot\fR (int)
1284.ad
1285.RS 12n
1286Allow the creation, removal, or renaming of entries in the .zfs/snapshot
1287directory to cause the creation, destruction, or renaming of snapshots.
1288When enabled this functionality works both locally and over NFS exports
1289which have the 'no_root_squash' option set. This functionality is disabled
1290by default.
1291.sp
1292Use \fB1\fR for yes and \fB0\fR for no (default).
1293.RE
1294
29714574
TF
1295.sp
1296.ne 2
1297.na
1298\fBzfs_flags\fR (int)
1299.ad
1300.RS 12n
33b6dbbc
NB
1301Set additional debugging flags. The following flags may be bitwise-or'd
1302together.
1303.sp
1304.TS
1305box;
1306rB lB
1307lB lB
1308r l.
1309Value Symbolic Name
1310 Description
1311_
13121 ZFS_DEBUG_DPRINTF
1313 Enable dprintf entries in the debug log.
1314_
13152 ZFS_DEBUG_DBUF_VERIFY *
1316 Enable extra dbuf verifications.
1317_
13184 ZFS_DEBUG_DNODE_VERIFY *
1319 Enable extra dnode verifications.
1320_
13218 ZFS_DEBUG_SNAPNAMES
1322 Enable snapshot name verification.
1323_
132416 ZFS_DEBUG_MODIFY
1325 Check for illegally modified ARC buffers.
1326_
132732 ZFS_DEBUG_SPA
1328 Enable spa_dbgmsg entries in the debug log.
1329_
133064 ZFS_DEBUG_ZIO_FREE
1331 Enable verification of block frees.
1332_
1333128 ZFS_DEBUG_HISTOGRAM_VERIFY
1334 Enable extra spacemap histogram verifications.
8740cf4a
NB
1335_
1336256 ZFS_DEBUG_METASLAB_VERIFY
1337 Verify space accounting on disk matches in-core range_trees.
1338_
1339512 ZFS_DEBUG_SET_ERROR
1340 Enable SET_ERROR and dprintf entries in the debug log.
33b6dbbc
NB
1341.TE
1342.sp
1343* Requires debug build.
29714574 1344.sp
33b6dbbc 1345Default value: \fB0\fR.
29714574
TF
1346.RE
1347
fbeddd60
MA
1348.sp
1349.ne 2
1350.na
1351\fBzfs_free_leak_on_eio\fR (int)
1352.ad
1353.RS 12n
1354If destroy encounters an EIO while reading metadata (e.g. indirect
1355blocks), space referenced by the missing metadata can not be freed.
1356Normally this causes the background destroy to become "stalled", as
1357it is unable to make forward progress. While in this stalled state,
1358all remaining space to free from the error-encountering filesystem is
1359"temporarily leaked". Set this flag to cause it to ignore the EIO,
1360permanently leak the space from indirect blocks that can not be read,
1361and continue to free everything else that it can.
1362
1363The default, "stalling" behavior is useful if the storage partially
1364fails (i.e. some but not all i/os fail), and then later recovers. In
1365this case, we will be able to continue pool operations while it is
1366partially failed, and when it recovers, we can continue to free the
1367space, with no leaks. However, note that this case is actually
1368fairly rare.
1369
1370Typically pools either (a) fail completely (but perhaps temporarily,
1371e.g. a top-level vdev going offline), or (b) have localized,
1372permanent errors (e.g. disk returns the wrong data due to bit flip or
1373firmware bug). In case (a), this setting does not matter because the
1374pool will be suspended and the sync thread will not be able to make
1375forward progress regardless. In case (b), because the error is
1376permanent, the best we can do is leak the minimum amount of space,
1377which is what setting this flag will do. Therefore, it is reasonable
1378for this flag to normally be set, but we chose the more conservative
1379approach of not setting it, so that there is no possibility of
1380leaking space in the "partial temporary" failure case.
1381.sp
1382Default value: \fB0\fR.
1383.RE
1384
29714574
TF
1385.sp
1386.ne 2
1387.na
1388\fBzfs_free_min_time_ms\fR (int)
1389.ad
1390.RS 12n
6146e17e 1391During a \fBzfs destroy\fR operation using \fBfeature@async_destroy\fR a minimum
83426735 1392of this much time will be spent working on freeing blocks per txg.
29714574
TF
1393.sp
1394Default value: \fB1,000\fR.
1395.RE
1396
1397.sp
1398.ne 2
1399.na
1400\fBzfs_immediate_write_sz\fR (long)
1401.ad
1402.RS 12n
83426735 1403Largest data block to write to zil. Larger blocks will be treated as if the
6146e17e 1404dataset being written to had the property setting \fBlogbias=throughput\fR.
29714574
TF
1405.sp
1406Default value: \fB32,768\fR.
1407.RE
1408
f1512ee6
MA
1409.sp
1410.ne 2
1411.na
1412\fBzfs_max_recordsize\fR (int)
1413.ad
1414.RS 12n
1415We currently support block sizes from 512 bytes to 16MB. The benefits of
1416larger blocks, and thus larger IO, need to be weighed against the cost of
1417COWing a giant block to modify one byte. Additionally, very large blocks
1418can have an impact on i/o latency, and also potentially on the memory
1419allocator. Therefore, we do not allow the recordsize to be set larger than
1420zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1421this tunable, and pools with larger blocks can always be imported and used,
1422regardless of this setting.
1423.sp
1424Default value: \fB1,048,576\fR.
1425.RE
1426
f3a7f661
GW
1427.sp
1428.ne 2
1429.na
1430\fBzfs_metaslab_fragmentation_threshold\fR (int)
1431.ad
1432.RS 12n
1433Allow metaslabs to keep their active state as long as their fragmentation
1434percentage is less than or equal to this value. An active metaslab that
1435exceeds this threshold will no longer keep its active status allowing
1436better metaslabs to be selected.
1437.sp
1438Default value: \fB70\fR.
1439.RE
1440
1441.sp
1442.ne 2
1443.na
1444\fBzfs_mg_fragmentation_threshold\fR (int)
1445.ad
1446.RS 12n
1447Metaslab groups are considered eligible for allocations if their
83426735 1448fragmentation metric (measured as a percentage) is less than or equal to
f3a7f661
GW
1449this value. If a metaslab group exceeds this threshold then it will be
1450skipped unless all metaslab groups within the metaslab class have also
1451crossed this threshold.
1452.sp
1453Default value: \fB85\fR.
1454.RE
1455
f4a4046b
TC
1456.sp
1457.ne 2
1458.na
1459\fBzfs_mg_noalloc_threshold\fR (int)
1460.ad
1461.RS 12n
1462Defines a threshold at which metaslab groups should be eligible for
1463allocations. The value is expressed as a percentage of free space
1464beyond which a metaslab group is always eligible for allocations.
1465If a metaslab group's free space is less than or equal to the
6b4e21c6 1466threshold, the allocator will avoid allocating to that group
f4a4046b
TC
1467unless all groups in the pool have reached the threshold. Once all
1468groups have reached the threshold, all groups are allowed to accept
1469allocations. The default value of 0 disables the feature and causes
1470all metaslab groups to be eligible for allocations.
1471
b58237e7 1472This parameter allows one to deal with pools having heavily imbalanced
f4a4046b
TC
1473vdevs such as would be the case when a new vdev has been added.
1474Setting the threshold to a non-zero percentage will stop allocations
1475from being made to vdevs that aren't filled to the specified percentage
1476and allow lesser filled vdevs to acquire more allocations than they
1477otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1478.sp
1479Default value: \fB0\fR.
1480.RE
1481
379ca9cf
OF
1482.sp
1483.ne 2
1484.na
1485\fBzfs_multihost_history\fR (int)
1486.ad
1487.RS 12n
1488Historical statistics for the last N multihost updates will be available in
1489\fB/proc/spl/kstat/zfs/<pool>/multihost\fR
1490.sp
1491Default value: \fB0\fR.
1492.RE
1493
1494.sp
1495.ne 2
1496.na
1497\fBzfs_multihost_interval\fR (ulong)
1498.ad
1499.RS 12n
1500Used to control the frequency of multihost writes which are performed when the
1501\fBmultihost\fR pool property is on. This is one factor used to determine
1502the length of the activity check during import.
1503.sp
1504The multihost write period is \fBzfs_multihost_interval / leaf-vdevs\fR milliseconds.
1505This means that on average a multihost write will be issued for each leaf vdev every
1506\fBzfs_multihost_interval\fR milliseconds. In practice, the observed period can
1507vary with the I/O load and this observed value is the delay which is stored in
1508the uberblock.
1509.sp
1510On import the activity check waits a minimum amount of time determined by
1511\fBzfs_multihost_interval * zfs_multihost_import_intervals\fR. The activity
1512check time may be further extended if the value of mmp delay found in the best
1513uberblock indicates actual multihost updates happened at longer intervals than
1514\fBzfs_multihost_interval\fR. A minimum value of \fB100ms\fR is enforced.
1515.sp
1516Default value: \fB1000\fR.
1517.RE
1518
1519.sp
1520.ne 2
1521.na
1522\fBzfs_multihost_import_intervals\fR (uint)
1523.ad
1524.RS 12n
1525Used to control the duration of the activity test on import. Smaller values of
1526\fBzfs_multihost_import_intervals\fR will reduce the import time but increase
1527the risk of failing to detect an active pool. The total activity check time is
1528never allowed to drop below one second. A value of 0 is ignored and treated as
1529if it was set to 1
1530.sp
1531Default value: \fB10\fR.
1532.RE
1533
1534.sp
1535.ne 2
1536.na
1537\fBzfs_multihost_fail_intervals\fR (uint)
1538.ad
1539.RS 12n
1540Controls the behavior of the pool when multihost write failures are detected.
1541.sp
1542When \fBzfs_multihost_fail_intervals = 0\fR then multihost write failures are ignored.
1543The failures will still be reported to the ZED which depending on its
1544configuration may take action such as suspending the pool or offlining a device.
1545.sp
1546When \fBzfs_multihost_fail_intervals > 0\fR then sequential multihost write failures
1547will cause the pool to be suspended. This occurs when
1548\fBzfs_multihost_fail_intervals * zfs_multihost_interval\fR milliseconds have
1549passed since the last successful multihost write. This guarantees the activity test
1550will see multihost writes if the pool is imported.
1551.sp
1552Default value: \fB5\fR.
1553.RE
1554
29714574
TF
1555.sp
1556.ne 2
1557.na
1558\fBzfs_no_scrub_io\fR (int)
1559.ad
1560.RS 12n
83426735
D
1561Set for no scrub I/O. This results in scrubs not actually scrubbing data and
1562simply doing a metadata crawl of the pool instead.
29714574
TF
1563.sp
1564Use \fB1\fR for yes and \fB0\fR for no (default).
1565.RE
1566
1567.sp
1568.ne 2
1569.na
1570\fBzfs_no_scrub_prefetch\fR (int)
1571.ad
1572.RS 12n
83426735 1573Set to disable block prefetching for scrubs.
29714574
TF
1574.sp
1575Use \fB1\fR for yes and \fB0\fR for no (default).
1576.RE
1577
29714574
TF
1578.sp
1579.ne 2
1580.na
1581\fBzfs_nocacheflush\fR (int)
1582.ad
1583.RS 12n
83426735
D
1584Disable cache flush operations on disks when writing. Beware, this may cause
1585corruption if disks re-order writes.
29714574
TF
1586.sp
1587Use \fB1\fR for yes and \fB0\fR for no (default).
1588.RE
1589
1590.sp
1591.ne 2
1592.na
1593\fBzfs_nopwrite_enabled\fR (int)
1594.ad
1595.RS 12n
1596Enable NOP writes
1597.sp
1598Use \fB1\fR for yes (default) and \fB0\fR to disable.
1599.RE
1600
66aca247
DB
1601.sp
1602.ne 2
1603.na
1604\fBzfs_dmu_offset_next_sync\fR (int)
1605.ad
1606.RS 12n
1607Enable forcing txg sync to find holes. When enabled forces ZFS to act
1608like prior versions when SEEK_HOLE or SEEK_DATA flags are used, which
1609when a dnode is dirty causes txg's to be synced so that this data can be
1610found.
1611.sp
1612Use \fB1\fR for yes and \fB0\fR to disable (default).
1613.RE
1614
29714574
TF
1615.sp
1616.ne 2
1617.na
b738bc5a 1618\fBzfs_pd_bytes_max\fR (int)
29714574
TF
1619.ad
1620.RS 12n
83426735 1621The number of bytes which should be prefetched during a pool traversal
6146e17e 1622(eg: \fBzfs send\fR or other data crawling operations)
29714574 1623.sp
74aa2ba2 1624Default value: \fB52,428,800\fR.
29714574
TF
1625.RE
1626
bef78122
DQ
1627.sp
1628.ne 2
1629.na
1630\fBzfs_per_txg_dirty_frees_percent \fR (ulong)
1631.ad
1632.RS 12n
1633Tunable to control percentage of dirtied blocks from frees in one TXG.
1634After this threshold is crossed, additional dirty blocks from frees
1635wait until the next TXG.
1636A value of zero will disable this throttle.
1637.sp
1638Default value: \fB30\fR and \fB0\fR to disable.
1639.RE
1640
1641
1642
29714574
TF
1643.sp
1644.ne 2
1645.na
1646\fBzfs_prefetch_disable\fR (int)
1647.ad
1648.RS 12n
7f60329a
MA
1649This tunable disables predictive prefetch. Note that it leaves "prescient"
1650prefetch (e.g. prefetch for zfs send) intact. Unlike predictive prefetch,
1651prescient prefetch never issues i/os that end up not being needed, so it
1652can't hurt performance.
29714574
TF
1653.sp
1654Use \fB1\fR for yes and \fB0\fR for no (default).
1655.RE
1656
1657.sp
1658.ne 2
1659.na
1660\fBzfs_read_chunk_size\fR (long)
1661.ad
1662.RS 12n
1663Bytes to read per chunk
1664.sp
1665Default value: \fB1,048,576\fR.
1666.RE
1667
1668.sp
1669.ne 2
1670.na
1671\fBzfs_read_history\fR (int)
1672.ad
1673.RS 12n
379ca9cf
OF
1674Historical statistics for the last N reads will be available in
1675\fB/proc/spl/kstat/zfs/<pool>/reads\fR
29714574 1676.sp
83426735 1677Default value: \fB0\fR (no data is kept).
29714574
TF
1678.RE
1679
1680.sp
1681.ne 2
1682.na
1683\fBzfs_read_history_hits\fR (int)
1684.ad
1685.RS 12n
1686Include cache hits in read history
1687.sp
1688Use \fB1\fR for yes and \fB0\fR for no (default).
1689.RE
1690
1691.sp
1692.ne 2
1693.na
1694\fBzfs_recover\fR (int)
1695.ad
1696.RS 12n
1697Set to attempt to recover from fatal errors. This should only be used as a
1698last resort, as it typically results in leaked space, or worse.
1699.sp
1700Use \fB1\fR for yes and \fB0\fR for no (default).
1701.RE
1702
1703.sp
1704.ne 2
1705.na
d4a72f23 1706\fBzfs_resilver_min_time_ms\fR (int)
29714574
TF
1707.ad
1708.RS 12n
d4a72f23
TC
1709Resilvers are processed by the sync thread. While resilvering it will spend
1710at least this much time working on a resilver between txg flushes.
29714574 1711.sp
d4a72f23 1712Default value: \fB3,000\fR.
29714574
TF
1713.RE
1714
02638a30
TC
1715.sp
1716.ne 2
1717.na
1718\fBzfs_scan_ignore_errors\fR (int)
1719.ad
1720.RS 12n
1721If set to a nonzero value, remove the DTL (dirty time list) upon
1722completion of a pool scan (scrub) even if there were unrepairable
1723errors. It is intended to be used during pool repair or recovery to
1724stop resilvering when the pool is next imported.
1725.sp
1726Default value: \fB0\fR.
1727.RE
1728
29714574
TF
1729.sp
1730.ne 2
1731.na
d4a72f23 1732\fBzfs_scrub_min_time_ms\fR (int)
29714574
TF
1733.ad
1734.RS 12n
d4a72f23
TC
1735Scrubs are processed by the sync thread. While scrubbing it will spend
1736at least this much time working on a scrub between txg flushes.
29714574 1737.sp
d4a72f23 1738Default value: \fB1,000\fR.
29714574
TF
1739.RE
1740
1741.sp
1742.ne 2
1743.na
d4a72f23 1744\fBzfs_scan_checkpoint_intval\fR (int)
29714574
TF
1745.ad
1746.RS 12n
d4a72f23
TC
1747To preserve progress across reboots the sequential scan algorithm periodically
1748needs to stop metadata scanning and issue all the verifications I/Os to disk.
1749The frequency of this flushing is determined by the
1750\fBfBzfs_scan_checkpoint_intval\fR tunable.
29714574 1751.sp
d4a72f23 1752Default value: \fB7200\fR seconds (every 2 hours).
29714574
TF
1753.RE
1754
1755.sp
1756.ne 2
1757.na
d4a72f23 1758\fBzfs_scan_fill_weight\fR (int)
29714574
TF
1759.ad
1760.RS 12n
d4a72f23
TC
1761This tunable affects how scrub and resilver I/O segments are ordered. A higher
1762number indicates that we care more about how filled in a segment is, while a
1763lower number indicates we care more about the size of the extent without
1764considering the gaps within a segment. This value is only tunable upon module
1765insertion. Changing the value afterwards will have no affect on scrub or
1766resilver performance.
29714574 1767.sp
d4a72f23 1768Default value: \fB3\fR.
29714574
TF
1769.RE
1770
1771.sp
1772.ne 2
1773.na
d4a72f23 1774\fBzfs_scan_issue_strategy\fR (int)
29714574
TF
1775.ad
1776.RS 12n
d4a72f23
TC
1777Determines the order that data will be verified while scrubbing or resilvering.
1778If set to \fB1\fR, data will be verified as sequentially as possible, given the
1779amount of memory reserved for scrubbing (see \fBzfs_scan_mem_lim_fact\fR). This
1780may improve scrub performance if the pool's data is very fragmented. If set to
1781\fB2\fR, the largest mostly-contiguous chunk of found data will be verified
1782first. By deferring scrubbing of small segments, we may later find adjacent data
1783to coalesce and increase the segment size. If set to \fB0\fR, zfs will use
1784strategy \fB1\fR during normal verification and strategy \fB2\fR while taking a
1785checkpoint.
29714574 1786.sp
d4a72f23
TC
1787Default value: \fB0\fR.
1788.RE
1789
1790.sp
1791.ne 2
1792.na
1793\fBzfs_scan_legacy\fR (int)
1794.ad
1795.RS 12n
1796A value of 0 indicates that scrubs and resilvers will gather metadata in
1797memory before issuing sequential I/O. A value of 1 indicates that the legacy
1798algorithm will be used where I/O is initiated as soon as it is discovered.
1799Changing this value to 0 will not affect scrubs or resilvers that are already
1800in progress.
1801.sp
1802Default value: \fB0\fR.
1803.RE
1804
1805.sp
1806.ne 2
1807.na
1808\fBzfs_scan_max_ext_gap\fR (int)
1809.ad
1810.RS 12n
1811Indicates the largest gap in bytes between scrub / resilver I/Os that will still
1812be considered sequential for sorting purposes. Changing this value will not
1813affect scrubs or resilvers that are already in progress.
1814.sp
1815Default value: \fB2097152 (2 MB)\fR.
1816.RE
1817
1818.sp
1819.ne 2
1820.na
1821\fBzfs_scan_mem_lim_fact\fR (int)
1822.ad
1823.RS 12n
1824Maximum fraction of RAM used for I/O sorting by sequential scan algorithm.
1825This tunable determines the hard limit for I/O sorting memory usage.
1826When the hard limit is reached we stop scanning metadata and start issuing
1827data verification I/O. This is done until we get below the soft limit.
1828.sp
1829Default value: \fB20\fR which is 5% of RAM (1/20).
1830.RE
1831
1832.sp
1833.ne 2
1834.na
1835\fBzfs_scan_mem_lim_soft_fact\fR (int)
1836.ad
1837.RS 12n
1838The fraction of the hard limit used to determined the soft limit for I/O sorting
1839by the sequential scan algorithm. When we cross this limit from bellow no action
1840is taken. When we cross this limit from above it is because we are issuing
1841verification I/O. In this case (unless the metadata scan is done) we stop
1842issuing verification I/O and start scanning metadata again until we get to the
1843hard limit.
1844.sp
1845Default value: \fB20\fR which is 5% of the hard limit (1/20).
1846.RE
1847
1848.sp
1849.ne 2
1850.na
1851\fBzfs_scan_vdev_limit\fR (int)
1852.ad
1853.RS 12n
1854Maximum amount of data that can be concurrently issued at once for scrubs and
1855resilvers per leaf device, given in bytes.
1856.sp
1857Default value: \fB41943040\fR.
29714574
TF
1858.RE
1859
fd8febbd
TF
1860.sp
1861.ne 2
1862.na
1863\fBzfs_send_corrupt_data\fR (int)
1864.ad
1865.RS 12n
83426735 1866Allow sending of corrupt data (ignore read/checksum errors when sending data)
fd8febbd
TF
1867.sp
1868Use \fB1\fR for yes and \fB0\fR for no (default).
1869.RE
1870
29714574
TF
1871.sp
1872.ne 2
1873.na
1874\fBzfs_sync_pass_deferred_free\fR (int)
1875.ad
1876.RS 12n
83426735 1877Flushing of data to disk is done in passes. Defer frees starting in this pass
29714574
TF
1878.sp
1879Default value: \fB2\fR.
1880.RE
1881
1882.sp
1883.ne 2
1884.na
1885\fBzfs_sync_pass_dont_compress\fR (int)
1886.ad
1887.RS 12n
1888Don't compress starting in this pass
1889.sp
1890Default value: \fB5\fR.
1891.RE
1892
1893.sp
1894.ne 2
1895.na
1896\fBzfs_sync_pass_rewrite\fR (int)
1897.ad
1898.RS 12n
83426735 1899Rewrite new block pointers starting in this pass
29714574
TF
1900.sp
1901Default value: \fB2\fR.
1902.RE
1903
a032ac4b
BB
1904.sp
1905.ne 2
1906.na
1907\fBzfs_sync_taskq_batch_pct\fR (int)
1908.ad
1909.RS 12n
1910This controls the number of threads used by the dp_sync_taskq. The default
1911value of 75% will create a maximum of one thread per cpu.
1912.sp
be54a13c 1913Default value: \fB75\fR%.
a032ac4b
BB
1914.RE
1915
29714574
TF
1916.sp
1917.ne 2
1918.na
1919\fBzfs_txg_history\fR (int)
1920.ad
1921.RS 12n
379ca9cf
OF
1922Historical statistics for the last N txgs will be available in
1923\fB/proc/spl/kstat/zfs/<pool>/txgs\fR
29714574 1924.sp
ca85d690 1925Default value: \fB0\fR.
29714574
TF
1926.RE
1927
29714574
TF
1928.sp
1929.ne 2
1930.na
1931\fBzfs_txg_timeout\fR (int)
1932.ad
1933.RS 12n
83426735 1934Flush dirty data to disk at least every N seconds (maximum txg duration)
29714574
TF
1935.sp
1936Default value: \fB5\fR.
1937.RE
1938
1939.sp
1940.ne 2
1941.na
1942\fBzfs_vdev_aggregation_limit\fR (int)
1943.ad
1944.RS 12n
1945Max vdev I/O aggregation size
1946.sp
1947Default value: \fB131,072\fR.
1948.RE
1949
1950.sp
1951.ne 2
1952.na
1953\fBzfs_vdev_cache_bshift\fR (int)
1954.ad
1955.RS 12n
1956Shift size to inflate reads too
1957.sp
83426735 1958Default value: \fB16\fR (effectively 65536).
29714574
TF
1959.RE
1960
1961.sp
1962.ne 2
1963.na
1964\fBzfs_vdev_cache_max\fR (int)
1965.ad
1966.RS 12n
ca85d690 1967Inflate reads smaller than this value to meet the \fBzfs_vdev_cache_bshift\fR
1968size (default 64k).
83426735
D
1969.sp
1970Default value: \fB16384\fR.
29714574
TF
1971.RE
1972
1973.sp
1974.ne 2
1975.na
1976\fBzfs_vdev_cache_size\fR (int)
1977.ad
1978.RS 12n
83426735
D
1979Total size of the per-disk cache in bytes.
1980.sp
1981Currently this feature is disabled as it has been found to not be helpful
1982for performance and in some cases harmful.
29714574
TF
1983.sp
1984Default value: \fB0\fR.
1985.RE
1986
29714574
TF
1987.sp
1988.ne 2
1989.na
9f500936 1990\fBzfs_vdev_mirror_rotating_inc\fR (int)
29714574
TF
1991.ad
1992.RS 12n
9f500936 1993A number by which the balancing algorithm increments the load calculation for
1994the purpose of selecting the least busy mirror member when an I/O immediately
1995follows its predecessor on rotational vdevs for the purpose of making decisions
1996based on load.
29714574 1997.sp
9f500936 1998Default value: \fB0\fR.
1999.RE
2000
2001.sp
2002.ne 2
2003.na
2004\fBzfs_vdev_mirror_rotating_seek_inc\fR (int)
2005.ad
2006.RS 12n
2007A number by which the balancing algorithm increments the load calculation for
2008the purpose of selecting the least busy mirror member when an I/O lacks
2009locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
2010this that are not immediately following the previous I/O are incremented by
2011half.
2012.sp
2013Default value: \fB5\fR.
2014.RE
2015
2016.sp
2017.ne 2
2018.na
2019\fBzfs_vdev_mirror_rotating_seek_offset\fR (int)
2020.ad
2021.RS 12n
2022The maximum distance for the last queued I/O in which the balancing algorithm
2023considers an I/O to have locality.
2024See the section "ZFS I/O SCHEDULER".
2025.sp
2026Default value: \fB1048576\fR.
2027.RE
2028
2029.sp
2030.ne 2
2031.na
2032\fBzfs_vdev_mirror_non_rotating_inc\fR (int)
2033.ad
2034.RS 12n
2035A number by which the balancing algorithm increments the load calculation for
2036the purpose of selecting the least busy mirror member on non-rotational vdevs
2037when I/Os do not immediately follow one another.
2038.sp
2039Default value: \fB0\fR.
2040.RE
2041
2042.sp
2043.ne 2
2044.na
2045\fBzfs_vdev_mirror_non_rotating_seek_inc\fR (int)
2046.ad
2047.RS 12n
2048A number by which the balancing algorithm increments the load calculation for
2049the purpose of selecting the least busy mirror member when an I/O lacks
2050locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
2051this that are not immediately following the previous I/O are incremented by
2052half.
2053.sp
2054Default value: \fB1\fR.
29714574
TF
2055.RE
2056
29714574
TF
2057.sp
2058.ne 2
2059.na
2060\fBzfs_vdev_read_gap_limit\fR (int)
2061.ad
2062.RS 12n
83426735
D
2063Aggregate read I/O operations if the gap on-disk between them is within this
2064threshold.
29714574
TF
2065.sp
2066Default value: \fB32,768\fR.
2067.RE
2068
2069.sp
2070.ne 2
2071.na
2072\fBzfs_vdev_scheduler\fR (charp)
2073.ad
2074.RS 12n
ca85d690 2075Set the Linux I/O scheduler on whole disk vdevs to this scheduler. Valid options
2076are noop, cfq, bfq & deadline
29714574
TF
2077.sp
2078Default value: \fBnoop\fR.
2079.RE
2080
29714574
TF
2081.sp
2082.ne 2
2083.na
2084\fBzfs_vdev_write_gap_limit\fR (int)
2085.ad
2086.RS 12n
2087Aggregate write I/O over gap
2088.sp
2089Default value: \fB4,096\fR.
2090.RE
2091
ab9f4b0b
GN
2092.sp
2093.ne 2
2094.na
2095\fBzfs_vdev_raidz_impl\fR (string)
2096.ad
2097.RS 12n
c9187d86 2098Parameter for selecting raidz parity implementation to use.
ab9f4b0b
GN
2099
2100Options marked (always) below may be selected on module load as they are
2101supported on all systems.
2102The remaining options may only be set after the module is loaded, as they
2103are available only if the implementations are compiled in and supported
2104on the running system.
2105
2106Once the module is loaded, the content of
2107/sys/module/zfs/parameters/zfs_vdev_raidz_impl will show available options
2108with the currently selected one enclosed in [].
2109Possible options are:
2110 fastest - (always) implementation selected using built-in benchmark
2111 original - (always) original raidz implementation
2112 scalar - (always) scalar raidz implementation
ae25d222
GN
2113 sse2 - implementation using SSE2 instruction set (64bit x86 only)
2114 ssse3 - implementation using SSSE3 instruction set (64bit x86 only)
ab9f4b0b 2115 avx2 - implementation using AVX2 instruction set (64bit x86 only)
7f547f85
RD
2116 avx512f - implementation using AVX512F instruction set (64bit x86 only)
2117 avx512bw - implementation using AVX512F & AVX512BW instruction sets (64bit x86 only)
62a65a65
RD
2118 aarch64_neon - implementation using NEON (Aarch64/64 bit ARMv8 only)
2119 aarch64_neonx2 - implementation using NEON with more unrolling (Aarch64/64 bit ARMv8 only)
ab9f4b0b
GN
2120.sp
2121Default value: \fBfastest\fR.
2122.RE
2123
29714574
TF
2124.sp
2125.ne 2
2126.na
2127\fBzfs_zevent_cols\fR (int)
2128.ad
2129.RS 12n
83426735 2130When zevents are logged to the console use this as the word wrap width.
29714574
TF
2131.sp
2132Default value: \fB80\fR.
2133.RE
2134
2135.sp
2136.ne 2
2137.na
2138\fBzfs_zevent_console\fR (int)
2139.ad
2140.RS 12n
2141Log events to the console
2142.sp
2143Use \fB1\fR for yes and \fB0\fR for no (default).
2144.RE
2145
2146.sp
2147.ne 2
2148.na
2149\fBzfs_zevent_len_max\fR (int)
2150.ad
2151.RS 12n
83426735
D
2152Max event queue length. A value of 0 will result in a calculated value which
2153increases with the number of CPUs in the system (minimum 64 events). Events
2154in the queue can be viewed with the \fBzpool events\fR command.
29714574
TF
2155.sp
2156Default value: \fB0\fR.
2157.RE
2158
a032ac4b
BB
2159.sp
2160.ne 2
2161.na
2162\fBzfs_zil_clean_taskq_maxalloc\fR (int)
2163.ad
2164.RS 12n
2165The maximum number of taskq entries that are allowed to be cached. When this
2fe61a7e 2166limit is exceeded transaction records (itxs) will be cleaned synchronously.
a032ac4b
BB
2167.sp
2168Default value: \fB1048576\fR.
2169.RE
2170
2171.sp
2172.ne 2
2173.na
2174\fBzfs_zil_clean_taskq_minalloc\fR (int)
2175.ad
2176.RS 12n
2177The number of taskq entries that are pre-populated when the taskq is first
2178created and are immediately available for use.
2179.sp
2180Default value: \fB1024\fR.
2181.RE
2182
2183.sp
2184.ne 2
2185.na
2186\fBzfs_zil_clean_taskq_nthr_pct\fR (int)
2187.ad
2188.RS 12n
2189This controls the number of threads used by the dp_zil_clean_taskq. The default
2190value of 100% will create a maximum of one thread per cpu.
2191.sp
be54a13c 2192Default value: \fB100\fR%.
a032ac4b
BB
2193.RE
2194
29714574
TF
2195.sp
2196.ne 2
2197.na
2198\fBzil_replay_disable\fR (int)
2199.ad
2200.RS 12n
83426735
D
2201Disable intent logging replay. Can be disabled for recovery from corrupted
2202ZIL
29714574
TF
2203.sp
2204Use \fB1\fR for yes and \fB0\fR for no (default).
2205.RE
2206
2207.sp
2208.ne 2
2209.na
1b7c1e5c 2210\fBzil_slog_bulk\fR (ulong)
29714574
TF
2211.ad
2212.RS 12n
1b7c1e5c
GDN
2213Limit SLOG write size per commit executed with synchronous priority.
2214Any writes above that will be executed with lower (asynchronous) priority
2215to limit potential SLOG device abuse by single active ZIL writer.
29714574 2216.sp
1b7c1e5c 2217Default value: \fB786,432\fR.
29714574
TF
2218.RE
2219
29714574
TF
2220.sp
2221.ne 2
2222.na
2223\fBzio_delay_max\fR (int)
2224.ad
2225.RS 12n
83426735 2226A zevent will be logged if a ZIO operation takes more than N milliseconds to
ab9f4b0b 2227complete. Note that this is only a logging facility, not a timeout on
83426735 2228operations.
29714574
TF
2229.sp
2230Default value: \fB30,000\fR.
2231.RE
2232
3dfb57a3
DB
2233.sp
2234.ne 2
2235.na
2236\fBzio_dva_throttle_enabled\fR (int)
2237.ad
2238.RS 12n
2239Throttle block allocations in the ZIO pipeline. This allows for
2240dynamic allocation distribution when devices are imbalanced.
e815485f
TC
2241When enabled, the maximum number of pending allocations per top-level vdev
2242is limited by \fBzfs_vdev_queue_depth_pct\fR.
3dfb57a3 2243.sp
27f2b90d 2244Default value: \fB1\fR.
3dfb57a3
DB
2245.RE
2246
29714574
TF
2247.sp
2248.ne 2
2249.na
2250\fBzio_requeue_io_start_cut_in_line\fR (int)
2251.ad
2252.RS 12n
2253Prioritize requeued I/O
2254.sp
2255Default value: \fB0\fR.
2256.RE
2257
dcb6bed1
D
2258.sp
2259.ne 2
2260.na
2261\fBzio_taskq_batch_pct\fR (uint)
2262.ad
2263.RS 12n
2264Percentage of online CPUs (or CPU cores, etc) which will run a worker thread
2265for IO. These workers are responsible for IO work such as compression and
2266checksum calculations. Fractional number of CPUs will be rounded down.
2267.sp
2268The default value of 75 was chosen to avoid using all CPUs which can result in
2269latency issues and inconsistent application performance, especially when high
2270compression is enabled.
2271.sp
2272Default value: \fB75\fR.
2273.RE
2274
29714574
TF
2275.sp
2276.ne 2
2277.na
2278\fBzvol_inhibit_dev\fR (uint)
2279.ad
2280.RS 12n
83426735
D
2281Do not create zvol device nodes. This may slightly improve startup time on
2282systems with a very large number of zvols.
29714574
TF
2283.sp
2284Use \fB1\fR for yes and \fB0\fR for no (default).
2285.RE
2286
2287.sp
2288.ne 2
2289.na
2290\fBzvol_major\fR (uint)
2291.ad
2292.RS 12n
83426735 2293Major number for zvol block devices
29714574
TF
2294.sp
2295Default value: \fB230\fR.
2296.RE
2297
2298.sp
2299.ne 2
2300.na
2301\fBzvol_max_discard_blocks\fR (ulong)
2302.ad
2303.RS 12n
83426735
D
2304Discard (aka TRIM) operations done on zvols will be done in batches of this
2305many blocks, where block size is determined by the \fBvolblocksize\fR property
2306of a zvol.
29714574
TF
2307.sp
2308Default value: \fB16,384\fR.
2309.RE
2310
9965059a
BB
2311.sp
2312.ne 2
2313.na
2314\fBzvol_prefetch_bytes\fR (uint)
2315.ad
2316.RS 12n
2317When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
2318from the start and end of the volume. Prefetching these regions
2319of the volume is desirable because they are likely to be accessed
2320immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
2321table.
2322.sp
2323Default value: \fB131,072\fR.
2324.RE
2325
692e55b8
CC
2326.sp
2327.ne 2
2328.na
2329\fBzvol_request_sync\fR (uint)
2330.ad
2331.RS 12n
2332When processing I/O requests for a zvol submit them synchronously. This
2333effectively limits the queue depth to 1 for each I/O submitter. When set
2334to 0 requests are handled asynchronously by a thread pool. The number of
2335requests which can be handled concurrently is controller by \fBzvol_threads\fR.
2336.sp
8fa5250f 2337Default value: \fB0\fR.
692e55b8
CC
2338.RE
2339
2340.sp
2341.ne 2
2342.na
2343\fBzvol_threads\fR (uint)
2344.ad
2345.RS 12n
2346Max number of threads which can handle zvol I/O requests concurrently.
2347.sp
2348Default value: \fB32\fR.
2349.RE
2350
cf8738d8 2351.sp
2352.ne 2
2353.na
2354\fBzvol_volmode\fR (uint)
2355.ad
2356.RS 12n
2357Defines zvol block devices behaviour when \fBvolmode\fR is set to \fBdefault\fR.
2358Valid values are \fB1\fR (full), \fB2\fR (dev) and \fB3\fR (none).
2359.sp
2360Default value: \fB1\fR.
2361.RE
2362
39ccc909 2363.sp
2364.ne 2
2365.na
2366\fBzfs_qat_disable\fR (int)
2367.ad
2368.RS 12n
cf637391
TC
2369This tunable disables qat hardware acceleration for gzip compression and.
2370AES-GCM encryption. It is available only if qat acceleration is compiled in
2371and the qat driver is present.
39ccc909 2372.sp
2373Use \fB1\fR for yes and \fB0\fR for no (default).
2374.RE
2375
e8b96c60
MA
2376.SH ZFS I/O SCHEDULER
2377ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
2378The I/O scheduler determines when and in what order those operations are
2379issued. The I/O scheduler divides operations into five I/O classes
2380prioritized in the following order: sync read, sync write, async read,
2381async write, and scrub/resilver. Each queue defines the minimum and
2382maximum number of concurrent operations that may be issued to the
2383device. In addition, the device has an aggregate maximum,
2384\fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
2385must not exceed the aggregate maximum. If the sum of the per-queue
2386maximums exceeds the aggregate maximum, then the number of active I/Os
2387may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
2388be issued regardless of whether all per-queue minimums have been met.
2389.sp
2390For many physical devices, throughput increases with the number of
2391concurrent operations, but latency typically suffers. Further, physical
2392devices typically have a limit at which more concurrent operations have no
2393effect on throughput or can actually cause it to decrease.
2394.sp
2395The scheduler selects the next operation to issue by first looking for an
2396I/O class whose minimum has not been satisfied. Once all are satisfied and
2397the aggregate maximum has not been hit, the scheduler looks for classes
2398whose maximum has not been satisfied. Iteration through the I/O classes is
2399done in the order specified above. No further operations are issued if the
2400aggregate maximum number of concurrent operations has been hit or if there
2401are no operations queued for an I/O class that has not hit its maximum.
2402Every time an I/O is queued or an operation completes, the I/O scheduler
2403looks for new operations to issue.
2404.sp
2405In general, smaller max_active's will lead to lower latency of synchronous
2406operations. Larger max_active's may lead to higher overall throughput,
2407depending on underlying storage.
2408.sp
2409The ratio of the queues' max_actives determines the balance of performance
2410between reads, writes, and scrubs. E.g., increasing
2411\fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
2412more quickly, but reads and writes to have higher latency and lower throughput.
2413.sp
2414All I/O classes have a fixed maximum number of outstanding operations
2415except for the async write class. Asynchronous writes represent the data
2416that is committed to stable storage during the syncing stage for
2417transaction groups. Transaction groups enter the syncing state
2418periodically so the number of queued async writes will quickly burst up
2419and then bleed down to zero. Rather than servicing them as quickly as
2420possible, the I/O scheduler changes the maximum number of active async
2421write I/Os according to the amount of dirty data in the pool. Since
2422both throughput and latency typically increase with the number of
2423concurrent operations issued to physical devices, reducing the
2424burstiness in the number of concurrent operations also stabilizes the
2425response time of operations from other -- and in particular synchronous
2426-- queues. In broad strokes, the I/O scheduler will issue more
2427concurrent operations from the async write queue as there's more dirty
2428data in the pool.
2429.sp
2430Async Writes
2431.sp
2432The number of concurrent operations issued for the async write I/O class
2433follows a piece-wise linear function defined by a few adjustable points.
2434.nf
2435
2436 | o---------| <-- zfs_vdev_async_write_max_active
2437 ^ | /^ |
2438 | | / | |
2439active | / | |
2440 I/O | / | |
2441count | / | |
2442 | / | |
2443 |-------o | | <-- zfs_vdev_async_write_min_active
2444 0|_______^______|_________|
2445 0% | | 100% of zfs_dirty_data_max
2446 | |
2447 | `-- zfs_vdev_async_write_active_max_dirty_percent
2448 `--------- zfs_vdev_async_write_active_min_dirty_percent
2449
2450.fi
2451Until the amount of dirty data exceeds a minimum percentage of the dirty
2452data allowed in the pool, the I/O scheduler will limit the number of
2453concurrent operations to the minimum. As that threshold is crossed, the
2454number of concurrent operations issued increases linearly to the maximum at
2455the specified maximum percentage of the dirty data allowed in the pool.
2456.sp
2457Ideally, the amount of dirty data on a busy pool will stay in the sloped
2458part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
2459and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
2460maximum percentage, this indicates that the rate of incoming data is
2461greater than the rate that the backend storage can handle. In this case, we
2462must further throttle incoming writes, as described in the next section.
2463
2464.SH ZFS TRANSACTION DELAY
2465We delay transactions when we've determined that the backend storage
2466isn't able to accommodate the rate of incoming writes.
2467.sp
2468If there is already a transaction waiting, we delay relative to when
2469that transaction will finish waiting. This way the calculated delay time
2470is independent of the number of threads concurrently executing
2471transactions.
2472.sp
2473If we are the only waiter, wait relative to when the transaction
2474started, rather than the current time. This credits the transaction for
2475"time already served", e.g. reading indirect blocks.
2476.sp
2477The minimum time for a transaction to take is calculated as:
2478.nf
2479 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
2480 min_time is then capped at 100 milliseconds.
2481.fi
2482.sp
2483The delay has two degrees of freedom that can be adjusted via tunables. The
2484percentage of dirty data at which we start to delay is defined by
2485\fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
2486\fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
2487delay after writing at full speed has failed to keep up with the incoming write
2488rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
2489this variable determines the amount of delay at the midpoint of the curve.
2490.sp
2491.nf
2492delay
2493 10ms +-------------------------------------------------------------*+
2494 | *|
2495 9ms + *+
2496 | *|
2497 8ms + *+
2498 | * |
2499 7ms + * +
2500 | * |
2501 6ms + * +
2502 | * |
2503 5ms + * +
2504 | * |
2505 4ms + * +
2506 | * |
2507 3ms + * +
2508 | * |
2509 2ms + (midpoint) * +
2510 | | ** |
2511 1ms + v *** +
2512 | zfs_delay_scale ----------> ******** |
2513 0 +-------------------------------------*********----------------+
2514 0% <- zfs_dirty_data_max -> 100%
2515.fi
2516.sp
2517Note that since the delay is added to the outstanding time remaining on the
2518most recent transaction, the delay is effectively the inverse of IOPS.
2519Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
2520was chosen such that small changes in the amount of accumulated dirty data
2521in the first 3/4 of the curve yield relatively small differences in the
2522amount of delay.
2523.sp
2524The effects can be easier to understand when the amount of delay is
2525represented on a log scale:
2526.sp
2527.nf
2528delay
2529100ms +-------------------------------------------------------------++
2530 + +
2531 | |
2532 + *+
2533 10ms + *+
2534 + ** +
2535 | (midpoint) ** |
2536 + | ** +
2537 1ms + v **** +
2538 + zfs_delay_scale ----------> ***** +
2539 | **** |
2540 + **** +
2541100us + ** +
2542 + * +
2543 | * |
2544 + * +
2545 10us + * +
2546 + +
2547 | |
2548 + +
2549 +--------------------------------------------------------------+
2550 0% <- zfs_dirty_data_max -> 100%
2551.fi
2552.sp
2553Note here that only as the amount of dirty data approaches its limit does
2554the delay start to increase rapidly. The goal of a properly tuned system
2555should be to keep the amount of dirty data out of that range by first
2556ensuring that the appropriate limits are set for the I/O scheduler to reach
2557optimal throughput on the backend storage, and then by changing the value
2558of \fBzfs_delay_scale\fR to increase the steepness of the curve.