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