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