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