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