]> git.proxmox.com Git - mirror_zfs.git/blame - man/man5/zfs-module-parameters.5
Remove l2arc_nocompress from zfs-module-parameters(5)
[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
TC
825When a pool sync operation takes longer than \fBzfs_deadman_synctime_ms\fR
826milliseconds, a "slow spa_sync" message is logged to the debug log
827(see \fBzfs_dbgmsg_enable\fR). If \fBzfs_deadman_enabled\fR is set,
828all pending IO operations are also checked and if any haven't completed
829within \fBzfs_deadman_synctime_ms\fR milliseconds, a "SLOW IO" message
830is logged to the debug log and a "delay" system event with the details of
831the hung IO is posted.
29714574 832.sp
b81a3ddc
TC
833Use \fB1\fR (default) to enable the slow IO check and \fB0\fR to disable.
834.RE
835
836.sp
837.ne 2
838.na
839\fBzfs_deadman_checktime_ms\fR (int)
840.ad
841.RS 12n
842Once a pool sync operation has taken longer than
843\fBzfs_deadman_synctime_ms\fR milliseconds, continue to check for slow
844operations every \fBzfs_deadman_checktime_ms\fR milliseconds.
845.sp
846Default value: \fB5,000\fR.
29714574
TF
847.RE
848
849.sp
850.ne 2
851.na
e8b96c60 852\fBzfs_deadman_synctime_ms\fR (ulong)
29714574
TF
853.ad
854.RS 12n
b81a3ddc
TC
855Interval in milliseconds after which the deadman is triggered and also
856the interval after which an IO operation is considered to be "hung"
857if \fBzfs_deadman_enabled\fR is set.
858
859See \fBzfs_deadman_enabled\fR.
29714574 860.sp
e8b96c60 861Default value: \fB1,000,000\fR.
29714574
TF
862.RE
863
864.sp
865.ne 2
866.na
867\fBzfs_dedup_prefetch\fR (int)
868.ad
869.RS 12n
870Enable prefetching dedup-ed blks
871.sp
0dfc7324 872Use \fB1\fR for yes and \fB0\fR to disable (default).
29714574
TF
873.RE
874
e8b96c60
MA
875.sp
876.ne 2
877.na
878\fBzfs_delay_min_dirty_percent\fR (int)
879.ad
880.RS 12n
881Start to delay each transaction once there is this amount of dirty data,
882expressed as a percentage of \fBzfs_dirty_data_max\fR.
883This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
884See the section "ZFS TRANSACTION DELAY".
885.sp
be54a13c 886Default value: \fB60\fR%.
e8b96c60
MA
887.RE
888
889.sp
890.ne 2
891.na
892\fBzfs_delay_scale\fR (int)
893.ad
894.RS 12n
895This controls how quickly the transaction delay approaches infinity.
896Larger values cause longer delays for a given amount of dirty data.
897.sp
898For the smoothest delay, this value should be about 1 billion divided
899by the maximum number of operations per second. This will smoothly
900handle between 10x and 1/10th this number.
901.sp
902See the section "ZFS TRANSACTION DELAY".
903.sp
904Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
905.sp
906Default value: \fB500,000\fR.
907.RE
908
a966c564
K
909.sp
910.ne 2
911.na
912\fBzfs_delete_blocks\fR (ulong)
913.ad
914.RS 12n
915This is the used to define a large file for the purposes of delete. Files
916containing more than \fBzfs_delete_blocks\fR will be deleted asynchronously
917while smaller files are deleted synchronously. Decreasing this value will
918reduce the time spent in an unlink(2) system call at the expense of a longer
919delay before the freed space is available.
920.sp
921Default value: \fB20,480\fR.
922.RE
923
e8b96c60
MA
924.sp
925.ne 2
926.na
927\fBzfs_dirty_data_max\fR (int)
928.ad
929.RS 12n
930Determines the dirty space limit in bytes. Once this limit is exceeded, new
931writes are halted until space frees up. This parameter takes precedence
932over \fBzfs_dirty_data_max_percent\fR.
933See the section "ZFS TRANSACTION DELAY".
934.sp
be54a13c 935Default value: \fB10\fR% of physical RAM, capped at \fBzfs_dirty_data_max_max\fR.
e8b96c60
MA
936.RE
937
938.sp
939.ne 2
940.na
941\fBzfs_dirty_data_max_max\fR (int)
942.ad
943.RS 12n
944Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
945This limit is only enforced at module load time, and will be ignored if
946\fBzfs_dirty_data_max\fR is later changed. This parameter takes
947precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
948"ZFS TRANSACTION DELAY".
949.sp
be54a13c 950Default value: \fB25\fR% of physical RAM.
e8b96c60
MA
951.RE
952
953.sp
954.ne 2
955.na
956\fBzfs_dirty_data_max_max_percent\fR (int)
957.ad
958.RS 12n
959Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
960percentage of physical RAM. This limit is only enforced at module load
961time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
962The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
963one. See the section "ZFS TRANSACTION DELAY".
964.sp
be54a13c 965Default value: \fB25\fR%.
e8b96c60
MA
966.RE
967
968.sp
969.ne 2
970.na
971\fBzfs_dirty_data_max_percent\fR (int)
972.ad
973.RS 12n
974Determines the dirty space limit, expressed as a percentage of all
975memory. Once this limit is exceeded, new writes are halted until space frees
976up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
977one. See the section "ZFS TRANSACTION DELAY".
978.sp
be54a13c 979Default value: \fB10\fR%, subject to \fBzfs_dirty_data_max_max\fR.
e8b96c60
MA
980.RE
981
982.sp
983.ne 2
984.na
985\fBzfs_dirty_data_sync\fR (int)
986.ad
987.RS 12n
988Start syncing out a transaction group if there is at least this much dirty data.
989.sp
990Default value: \fB67,108,864\fR.
991.RE
992
1eeb4562
JX
993.sp
994.ne 2
995.na
996\fBzfs_fletcher_4_impl\fR (string)
997.ad
998.RS 12n
999Select a fletcher 4 implementation.
1000.sp
35a76a03 1001Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
24cdeaf1 1002\fBavx2\fR, \fBavx512f\fR, and \fBaarch64_neon\fR.
70b258fc
GN
1003All of the selectors except \fBfastest\fR and \fBscalar\fR require instruction
1004set extensions to be available and will only appear if ZFS detects that they are
1005present at runtime. If multiple implementations of fletcher 4 are available,
1006the \fBfastest\fR will be chosen using a micro benchmark. Selecting \fBscalar\fR
1007results in the original, CPU based calculation, being used. Selecting any option
1008other than \fBfastest\fR and \fBscalar\fR results in vector instructions from
1009the respective CPU instruction set being used.
1eeb4562
JX
1010.sp
1011Default value: \fBfastest\fR.
1012.RE
1013
ba5ad9a4
GW
1014.sp
1015.ne 2
1016.na
1017\fBzfs_free_bpobj_enabled\fR (int)
1018.ad
1019.RS 12n
1020Enable/disable the processing of the free_bpobj object.
1021.sp
1022Default value: \fB1\fR.
1023.RE
1024
36283ca2
MG
1025.sp
1026.ne 2
1027.na
1028\fBzfs_free_max_blocks\fR (ulong)
1029.ad
1030.RS 12n
1031Maximum number of blocks freed in a single txg.
1032.sp
1033Default value: \fB100,000\fR.
1034.RE
1035
e8b96c60
MA
1036.sp
1037.ne 2
1038.na
1039\fBzfs_vdev_async_read_max_active\fR (int)
1040.ad
1041.RS 12n
83426735 1042Maximum asynchronous read I/Os active to each device.
e8b96c60
MA
1043See the section "ZFS I/O SCHEDULER".
1044.sp
1045Default value: \fB3\fR.
1046.RE
1047
1048.sp
1049.ne 2
1050.na
1051\fBzfs_vdev_async_read_min_active\fR (int)
1052.ad
1053.RS 12n
1054Minimum asynchronous read I/Os active to each device.
1055See the section "ZFS I/O SCHEDULER".
1056.sp
1057Default value: \fB1\fR.
1058.RE
1059
1060.sp
1061.ne 2
1062.na
1063\fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
1064.ad
1065.RS 12n
1066When the pool has more than
1067\fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
1068\fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
1069the dirty data is between min and max, the active I/O limit is linearly
1070interpolated. See the section "ZFS I/O SCHEDULER".
1071.sp
be54a13c 1072Default value: \fB60\fR%.
e8b96c60
MA
1073.RE
1074
1075.sp
1076.ne 2
1077.na
1078\fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
1079.ad
1080.RS 12n
1081When the pool has less than
1082\fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
1083\fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
1084the dirty data is between min and max, the active I/O limit is linearly
1085interpolated. See the section "ZFS I/O SCHEDULER".
1086.sp
be54a13c 1087Default value: \fB30\fR%.
e8b96c60
MA
1088.RE
1089
1090.sp
1091.ne 2
1092.na
1093\fBzfs_vdev_async_write_max_active\fR (int)
1094.ad
1095.RS 12n
83426735 1096Maximum asynchronous write I/Os active to each device.
e8b96c60
MA
1097See the section "ZFS I/O SCHEDULER".
1098.sp
1099Default value: \fB10\fR.
1100.RE
1101
1102.sp
1103.ne 2
1104.na
1105\fBzfs_vdev_async_write_min_active\fR (int)
1106.ad
1107.RS 12n
1108Minimum asynchronous write I/Os active to each device.
1109See the section "ZFS I/O SCHEDULER".
1110.sp
06226b59
D
1111Lower values are associated with better latency on rotational media but poorer
1112resilver performance. The default value of 2 was chosen as a compromise. A
1113value of 3 has been shown to improve resilver performance further at a cost of
1114further increasing latency.
1115.sp
1116Default value: \fB2\fR.
e8b96c60
MA
1117.RE
1118
1119.sp
1120.ne 2
1121.na
1122\fBzfs_vdev_max_active\fR (int)
1123.ad
1124.RS 12n
1125The maximum number of I/Os active to each device. Ideally, this will be >=
1126the sum of each queue's max_active. It must be at least the sum of each
1127queue's min_active. See the section "ZFS I/O SCHEDULER".
1128.sp
1129Default value: \fB1,000\fR.
1130.RE
1131
1132.sp
1133.ne 2
1134.na
1135\fBzfs_vdev_scrub_max_active\fR (int)
1136.ad
1137.RS 12n
83426735 1138Maximum scrub I/Os active to each device.
e8b96c60
MA
1139See the section "ZFS I/O SCHEDULER".
1140.sp
1141Default value: \fB2\fR.
1142.RE
1143
1144.sp
1145.ne 2
1146.na
1147\fBzfs_vdev_scrub_min_active\fR (int)
1148.ad
1149.RS 12n
1150Minimum scrub I/Os active to each device.
1151See the section "ZFS I/O SCHEDULER".
1152.sp
1153Default value: \fB1\fR.
1154.RE
1155
1156.sp
1157.ne 2
1158.na
1159\fBzfs_vdev_sync_read_max_active\fR (int)
1160.ad
1161.RS 12n
83426735 1162Maximum synchronous read I/Os active to each device.
e8b96c60
MA
1163See the section "ZFS I/O SCHEDULER".
1164.sp
1165Default value: \fB10\fR.
1166.RE
1167
1168.sp
1169.ne 2
1170.na
1171\fBzfs_vdev_sync_read_min_active\fR (int)
1172.ad
1173.RS 12n
1174Minimum synchronous read I/Os active to each device.
1175See the section "ZFS I/O SCHEDULER".
1176.sp
1177Default value: \fB10\fR.
1178.RE
1179
1180.sp
1181.ne 2
1182.na
1183\fBzfs_vdev_sync_write_max_active\fR (int)
1184.ad
1185.RS 12n
83426735 1186Maximum synchronous write I/Os active to each device.
e8b96c60
MA
1187See the section "ZFS I/O SCHEDULER".
1188.sp
1189Default value: \fB10\fR.
1190.RE
1191
1192.sp
1193.ne 2
1194.na
1195\fBzfs_vdev_sync_write_min_active\fR (int)
1196.ad
1197.RS 12n
1198Minimum synchronous write I/Os active to each device.
1199See the section "ZFS I/O SCHEDULER".
1200.sp
1201Default value: \fB10\fR.
1202.RE
1203
3dfb57a3
DB
1204.sp
1205.ne 2
1206.na
1207\fBzfs_vdev_queue_depth_pct\fR (int)
1208.ad
1209.RS 12n
e815485f
TC
1210Maximum number of queued allocations per top-level vdev expressed as
1211a percentage of \fBzfs_vdev_async_write_max_active\fR which allows the
1212system to detect devices that are more capable of handling allocations
1213and to allocate more blocks to those devices. It allows for dynamic
1214allocation distribution when devices are imbalanced as fuller devices
1215will tend to be slower than empty devices.
1216
1217See also \fBzio_dva_throttle_enabled\fR.
3dfb57a3 1218.sp
be54a13c 1219Default value: \fB1000\fR%.
3dfb57a3
DB
1220.RE
1221
29714574
TF
1222.sp
1223.ne 2
1224.na
1225\fBzfs_disable_dup_eviction\fR (int)
1226.ad
1227.RS 12n
1228Disable duplicate buffer eviction
1229.sp
1230Use \fB1\fR for yes and \fB0\fR for no (default).
1231.RE
1232
1233.sp
1234.ne 2
1235.na
1236\fBzfs_expire_snapshot\fR (int)
1237.ad
1238.RS 12n
1239Seconds to expire .zfs/snapshot
1240.sp
1241Default value: \fB300\fR.
1242.RE
1243
0500e835
BB
1244.sp
1245.ne 2
1246.na
1247\fBzfs_admin_snapshot\fR (int)
1248.ad
1249.RS 12n
1250Allow the creation, removal, or renaming of entries in the .zfs/snapshot
1251directory to cause the creation, destruction, or renaming of snapshots.
1252When enabled this functionality works both locally and over NFS exports
1253which have the 'no_root_squash' option set. This functionality is disabled
1254by default.
1255.sp
1256Use \fB1\fR for yes and \fB0\fR for no (default).
1257.RE
1258
29714574
TF
1259.sp
1260.ne 2
1261.na
1262\fBzfs_flags\fR (int)
1263.ad
1264.RS 12n
33b6dbbc
NB
1265Set additional debugging flags. The following flags may be bitwise-or'd
1266together.
1267.sp
1268.TS
1269box;
1270rB lB
1271lB lB
1272r l.
1273Value Symbolic Name
1274 Description
1275_
12761 ZFS_DEBUG_DPRINTF
1277 Enable dprintf entries in the debug log.
1278_
12792 ZFS_DEBUG_DBUF_VERIFY *
1280 Enable extra dbuf verifications.
1281_
12824 ZFS_DEBUG_DNODE_VERIFY *
1283 Enable extra dnode verifications.
1284_
12858 ZFS_DEBUG_SNAPNAMES
1286 Enable snapshot name verification.
1287_
128816 ZFS_DEBUG_MODIFY
1289 Check for illegally modified ARC buffers.
1290_
129132 ZFS_DEBUG_SPA
1292 Enable spa_dbgmsg entries in the debug log.
1293_
129464 ZFS_DEBUG_ZIO_FREE
1295 Enable verification of block frees.
1296_
1297128 ZFS_DEBUG_HISTOGRAM_VERIFY
1298 Enable extra spacemap histogram verifications.
8740cf4a
NB
1299_
1300256 ZFS_DEBUG_METASLAB_VERIFY
1301 Verify space accounting on disk matches in-core range_trees.
1302_
1303512 ZFS_DEBUG_SET_ERROR
1304 Enable SET_ERROR and dprintf entries in the debug log.
33b6dbbc
NB
1305.TE
1306.sp
1307* Requires debug build.
29714574 1308.sp
33b6dbbc 1309Default value: \fB0\fR.
29714574
TF
1310.RE
1311
fbeddd60
MA
1312.sp
1313.ne 2
1314.na
1315\fBzfs_free_leak_on_eio\fR (int)
1316.ad
1317.RS 12n
1318If destroy encounters an EIO while reading metadata (e.g. indirect
1319blocks), space referenced by the missing metadata can not be freed.
1320Normally this causes the background destroy to become "stalled", as
1321it is unable to make forward progress. While in this stalled state,
1322all remaining space to free from the error-encountering filesystem is
1323"temporarily leaked". Set this flag to cause it to ignore the EIO,
1324permanently leak the space from indirect blocks that can not be read,
1325and continue to free everything else that it can.
1326
1327The default, "stalling" behavior is useful if the storage partially
1328fails (i.e. some but not all i/os fail), and then later recovers. In
1329this case, we will be able to continue pool operations while it is
1330partially failed, and when it recovers, we can continue to free the
1331space, with no leaks. However, note that this case is actually
1332fairly rare.
1333
1334Typically pools either (a) fail completely (but perhaps temporarily,
1335e.g. a top-level vdev going offline), or (b) have localized,
1336permanent errors (e.g. disk returns the wrong data due to bit flip or
1337firmware bug). In case (a), this setting does not matter because the
1338pool will be suspended and the sync thread will not be able to make
1339forward progress regardless. In case (b), because the error is
1340permanent, the best we can do is leak the minimum amount of space,
1341which is what setting this flag will do. Therefore, it is reasonable
1342for this flag to normally be set, but we chose the more conservative
1343approach of not setting it, so that there is no possibility of
1344leaking space in the "partial temporary" failure case.
1345.sp
1346Default value: \fB0\fR.
1347.RE
1348
29714574
TF
1349.sp
1350.ne 2
1351.na
1352\fBzfs_free_min_time_ms\fR (int)
1353.ad
1354.RS 12n
6146e17e 1355During a \fBzfs destroy\fR operation using \fBfeature@async_destroy\fR a minimum
83426735 1356of this much time will be spent working on freeing blocks per txg.
29714574
TF
1357.sp
1358Default value: \fB1,000\fR.
1359.RE
1360
1361.sp
1362.ne 2
1363.na
1364\fBzfs_immediate_write_sz\fR (long)
1365.ad
1366.RS 12n
83426735 1367Largest data block to write to zil. Larger blocks will be treated as if the
6146e17e 1368dataset being written to had the property setting \fBlogbias=throughput\fR.
29714574
TF
1369.sp
1370Default value: \fB32,768\fR.
1371.RE
1372
f1512ee6
MA
1373.sp
1374.ne 2
1375.na
1376\fBzfs_max_recordsize\fR (int)
1377.ad
1378.RS 12n
1379We currently support block sizes from 512 bytes to 16MB. The benefits of
1380larger blocks, and thus larger IO, need to be weighed against the cost of
1381COWing a giant block to modify one byte. Additionally, very large blocks
1382can have an impact on i/o latency, and also potentially on the memory
1383allocator. Therefore, we do not allow the recordsize to be set larger than
1384zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1385this tunable, and pools with larger blocks can always be imported and used,
1386regardless of this setting.
1387.sp
1388Default value: \fB1,048,576\fR.
1389.RE
1390
29714574
TF
1391.sp
1392.ne 2
1393.na
1394\fBzfs_mdcomp_disable\fR (int)
1395.ad
1396.RS 12n
1397Disable meta data compression
1398.sp
1399Use \fB1\fR for yes and \fB0\fR for no (default).
1400.RE
1401
f3a7f661
GW
1402.sp
1403.ne 2
1404.na
1405\fBzfs_metaslab_fragmentation_threshold\fR (int)
1406.ad
1407.RS 12n
1408Allow metaslabs to keep their active state as long as their fragmentation
1409percentage is less than or equal to this value. An active metaslab that
1410exceeds this threshold will no longer keep its active status allowing
1411better metaslabs to be selected.
1412.sp
1413Default value: \fB70\fR.
1414.RE
1415
1416.sp
1417.ne 2
1418.na
1419\fBzfs_mg_fragmentation_threshold\fR (int)
1420.ad
1421.RS 12n
1422Metaslab groups are considered eligible for allocations if their
83426735 1423fragmentation metric (measured as a percentage) is less than or equal to
f3a7f661
GW
1424this value. If a metaslab group exceeds this threshold then it will be
1425skipped unless all metaslab groups within the metaslab class have also
1426crossed this threshold.
1427.sp
1428Default value: \fB85\fR.
1429.RE
1430
f4a4046b
TC
1431.sp
1432.ne 2
1433.na
1434\fBzfs_mg_noalloc_threshold\fR (int)
1435.ad
1436.RS 12n
1437Defines a threshold at which metaslab groups should be eligible for
1438allocations. The value is expressed as a percentage of free space
1439beyond which a metaslab group is always eligible for allocations.
1440If a metaslab group's free space is less than or equal to the
6b4e21c6 1441threshold, the allocator will avoid allocating to that group
f4a4046b
TC
1442unless all groups in the pool have reached the threshold. Once all
1443groups have reached the threshold, all groups are allowed to accept
1444allocations. The default value of 0 disables the feature and causes
1445all metaslab groups to be eligible for allocations.
1446
b58237e7 1447This parameter allows one to deal with pools having heavily imbalanced
f4a4046b
TC
1448vdevs such as would be the case when a new vdev has been added.
1449Setting the threshold to a non-zero percentage will stop allocations
1450from being made to vdevs that aren't filled to the specified percentage
1451and allow lesser filled vdevs to acquire more allocations than they
1452otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1453.sp
1454Default value: \fB0\fR.
1455.RE
1456
379ca9cf
OF
1457.sp
1458.ne 2
1459.na
1460\fBzfs_multihost_history\fR (int)
1461.ad
1462.RS 12n
1463Historical statistics for the last N multihost updates will be available in
1464\fB/proc/spl/kstat/zfs/<pool>/multihost\fR
1465.sp
1466Default value: \fB0\fR.
1467.RE
1468
1469.sp
1470.ne 2
1471.na
1472\fBzfs_multihost_interval\fR (ulong)
1473.ad
1474.RS 12n
1475Used to control the frequency of multihost writes which are performed when the
1476\fBmultihost\fR pool property is on. This is one factor used to determine
1477the length of the activity check during import.
1478.sp
1479The multihost write period is \fBzfs_multihost_interval / leaf-vdevs\fR milliseconds.
1480This means that on average a multihost write will be issued for each leaf vdev every
1481\fBzfs_multihost_interval\fR milliseconds. In practice, the observed period can
1482vary with the I/O load and this observed value is the delay which is stored in
1483the uberblock.
1484.sp
1485On import the activity check waits a minimum amount of time determined by
1486\fBzfs_multihost_interval * zfs_multihost_import_intervals\fR. The activity
1487check time may be further extended if the value of mmp delay found in the best
1488uberblock indicates actual multihost updates happened at longer intervals than
1489\fBzfs_multihost_interval\fR. A minimum value of \fB100ms\fR is enforced.
1490.sp
1491Default value: \fB1000\fR.
1492.RE
1493
1494.sp
1495.ne 2
1496.na
1497\fBzfs_multihost_import_intervals\fR (uint)
1498.ad
1499.RS 12n
1500Used to control the duration of the activity test on import. Smaller values of
1501\fBzfs_multihost_import_intervals\fR will reduce the import time but increase
1502the risk of failing to detect an active pool. The total activity check time is
1503never allowed to drop below one second. A value of 0 is ignored and treated as
1504if it was set to 1
1505.sp
1506Default value: \fB10\fR.
1507.RE
1508
1509.sp
1510.ne 2
1511.na
1512\fBzfs_multihost_fail_intervals\fR (uint)
1513.ad
1514.RS 12n
1515Controls the behavior of the pool when multihost write failures are detected.
1516.sp
1517When \fBzfs_multihost_fail_intervals = 0\fR then multihost write failures are ignored.
1518The failures will still be reported to the ZED which depending on its
1519configuration may take action such as suspending the pool or offlining a device.
1520.sp
1521When \fBzfs_multihost_fail_intervals > 0\fR then sequential multihost write failures
1522will cause the pool to be suspended. This occurs when
1523\fBzfs_multihost_fail_intervals * zfs_multihost_interval\fR milliseconds have
1524passed since the last successful multihost write. This guarantees the activity test
1525will see multihost writes if the pool is imported.
1526.sp
1527Default value: \fB5\fR.
1528.RE
1529
29714574
TF
1530.sp
1531.ne 2
1532.na
1533\fBzfs_no_scrub_io\fR (int)
1534.ad
1535.RS 12n
83426735
D
1536Set for no scrub I/O. This results in scrubs not actually scrubbing data and
1537simply doing a metadata crawl of the pool instead.
29714574
TF
1538.sp
1539Use \fB1\fR for yes and \fB0\fR for no (default).
1540.RE
1541
1542.sp
1543.ne 2
1544.na
1545\fBzfs_no_scrub_prefetch\fR (int)
1546.ad
1547.RS 12n
83426735 1548Set to disable block prefetching for scrubs.
29714574
TF
1549.sp
1550Use \fB1\fR for yes and \fB0\fR for no (default).
1551.RE
1552
29714574
TF
1553.sp
1554.ne 2
1555.na
1556\fBzfs_nocacheflush\fR (int)
1557.ad
1558.RS 12n
83426735
D
1559Disable cache flush operations on disks when writing. Beware, this may cause
1560corruption if disks re-order writes.
29714574
TF
1561.sp
1562Use \fB1\fR for yes and \fB0\fR for no (default).
1563.RE
1564
1565.sp
1566.ne 2
1567.na
1568\fBzfs_nopwrite_enabled\fR (int)
1569.ad
1570.RS 12n
1571Enable NOP writes
1572.sp
1573Use \fB1\fR for yes (default) and \fB0\fR to disable.
1574.RE
1575
66aca247
DB
1576.sp
1577.ne 2
1578.na
1579\fBzfs_dmu_offset_next_sync\fR (int)
1580.ad
1581.RS 12n
1582Enable forcing txg sync to find holes. When enabled forces ZFS to act
1583like prior versions when SEEK_HOLE or SEEK_DATA flags are used, which
1584when a dnode is dirty causes txg's to be synced so that this data can be
1585found.
1586.sp
1587Use \fB1\fR for yes and \fB0\fR to disable (default).
1588.RE
1589
29714574
TF
1590.sp
1591.ne 2
1592.na
b738bc5a 1593\fBzfs_pd_bytes_max\fR (int)
29714574
TF
1594.ad
1595.RS 12n
83426735 1596The number of bytes which should be prefetched during a pool traversal
6146e17e 1597(eg: \fBzfs send\fR or other data crawling operations)
29714574 1598.sp
74aa2ba2 1599Default value: \fB52,428,800\fR.
29714574
TF
1600.RE
1601
bef78122
DQ
1602.sp
1603.ne 2
1604.na
1605\fBzfs_per_txg_dirty_frees_percent \fR (ulong)
1606.ad
1607.RS 12n
1608Tunable to control percentage of dirtied blocks from frees in one TXG.
1609After this threshold is crossed, additional dirty blocks from frees
1610wait until the next TXG.
1611A value of zero will disable this throttle.
1612.sp
1613Default value: \fB30\fR and \fB0\fR to disable.
1614.RE
1615
1616
1617
29714574
TF
1618.sp
1619.ne 2
1620.na
1621\fBzfs_prefetch_disable\fR (int)
1622.ad
1623.RS 12n
7f60329a
MA
1624This tunable disables predictive prefetch. Note that it leaves "prescient"
1625prefetch (e.g. prefetch for zfs send) intact. Unlike predictive prefetch,
1626prescient prefetch never issues i/os that end up not being needed, so it
1627can't hurt performance.
29714574
TF
1628.sp
1629Use \fB1\fR for yes and \fB0\fR for no (default).
1630.RE
1631
1632.sp
1633.ne 2
1634.na
1635\fBzfs_read_chunk_size\fR (long)
1636.ad
1637.RS 12n
1638Bytes to read per chunk
1639.sp
1640Default value: \fB1,048,576\fR.
1641.RE
1642
1643.sp
1644.ne 2
1645.na
1646\fBzfs_read_history\fR (int)
1647.ad
1648.RS 12n
379ca9cf
OF
1649Historical statistics for the last N reads will be available in
1650\fB/proc/spl/kstat/zfs/<pool>/reads\fR
29714574 1651.sp
83426735 1652Default value: \fB0\fR (no data is kept).
29714574
TF
1653.RE
1654
1655.sp
1656.ne 2
1657.na
1658\fBzfs_read_history_hits\fR (int)
1659.ad
1660.RS 12n
1661Include cache hits in read history
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_recover\fR (int)
1670.ad
1671.RS 12n
1672Set to attempt to recover from fatal errors. This should only be used as a
1673last resort, as it typically results in leaked space, or worse.
1674.sp
1675Use \fB1\fR for yes and \fB0\fR for no (default).
1676.RE
1677
1678.sp
1679.ne 2
1680.na
d4a72f23 1681\fBzfs_resilver_min_time_ms\fR (int)
29714574
TF
1682.ad
1683.RS 12n
d4a72f23
TC
1684Resilvers are processed by the sync thread. While resilvering it will spend
1685at least this much time working on a resilver between txg flushes.
29714574 1686.sp
d4a72f23 1687Default value: \fB3,000\fR.
29714574
TF
1688.RE
1689
1690.sp
1691.ne 2
1692.na
d4a72f23 1693\fBzfs_scrub_min_time_ms\fR (int)
29714574
TF
1694.ad
1695.RS 12n
d4a72f23
TC
1696Scrubs are processed by the sync thread. While scrubbing it will spend
1697at least this much time working on a scrub between txg flushes.
29714574 1698.sp
d4a72f23 1699Default value: \fB1,000\fR.
29714574
TF
1700.RE
1701
1702.sp
1703.ne 2
1704.na
d4a72f23 1705\fBzfs_scan_checkpoint_intval\fR (int)
29714574
TF
1706.ad
1707.RS 12n
d4a72f23
TC
1708To preserve progress across reboots the sequential scan algorithm periodically
1709needs to stop metadata scanning and issue all the verifications I/Os to disk.
1710The frequency of this flushing is determined by the
1711\fBfBzfs_scan_checkpoint_intval\fR tunable.
29714574 1712.sp
d4a72f23 1713Default value: \fB7200\fR seconds (every 2 hours).
29714574
TF
1714.RE
1715
1716.sp
1717.ne 2
1718.na
d4a72f23 1719\fBzfs_scan_fill_weight\fR (int)
29714574
TF
1720.ad
1721.RS 12n
d4a72f23
TC
1722This tunable affects how scrub and resilver I/O segments are ordered. A higher
1723number indicates that we care more about how filled in a segment is, while a
1724lower number indicates we care more about the size of the extent without
1725considering the gaps within a segment. This value is only tunable upon module
1726insertion. Changing the value afterwards will have no affect on scrub or
1727resilver performance.
29714574 1728.sp
d4a72f23 1729Default value: \fB3\fR.
29714574
TF
1730.RE
1731
1732.sp
1733.ne 2
1734.na
d4a72f23 1735\fBzfs_scan_issue_strategy\fR (int)
29714574
TF
1736.ad
1737.RS 12n
d4a72f23
TC
1738Determines the order that data will be verified while scrubbing or resilvering.
1739If set to \fB1\fR, data will be verified as sequentially as possible, given the
1740amount of memory reserved for scrubbing (see \fBzfs_scan_mem_lim_fact\fR). This
1741may improve scrub performance if the pool's data is very fragmented. If set to
1742\fB2\fR, the largest mostly-contiguous chunk of found data will be verified
1743first. By deferring scrubbing of small segments, we may later find adjacent data
1744to coalesce and increase the segment size. If set to \fB0\fR, zfs will use
1745strategy \fB1\fR during normal verification and strategy \fB2\fR while taking a
1746checkpoint.
29714574 1747.sp
d4a72f23
TC
1748Default value: \fB0\fR.
1749.RE
1750
1751.sp
1752.ne 2
1753.na
1754\fBzfs_scan_legacy\fR (int)
1755.ad
1756.RS 12n
1757A value of 0 indicates that scrubs and resilvers will gather metadata in
1758memory before issuing sequential I/O. A value of 1 indicates that the legacy
1759algorithm will be used where I/O is initiated as soon as it is discovered.
1760Changing this value to 0 will not affect scrubs or resilvers that are already
1761in progress.
1762.sp
1763Default value: \fB0\fR.
1764.RE
1765
1766.sp
1767.ne 2
1768.na
1769\fBzfs_scan_max_ext_gap\fR (int)
1770.ad
1771.RS 12n
1772Indicates the largest gap in bytes between scrub / resilver I/Os that will still
1773be considered sequential for sorting purposes. Changing this value will not
1774affect scrubs or resilvers that are already in progress.
1775.sp
1776Default value: \fB2097152 (2 MB)\fR.
1777.RE
1778
1779.sp
1780.ne 2
1781.na
1782\fBzfs_scan_mem_lim_fact\fR (int)
1783.ad
1784.RS 12n
1785Maximum fraction of RAM used for I/O sorting by sequential scan algorithm.
1786This tunable determines the hard limit for I/O sorting memory usage.
1787When the hard limit is reached we stop scanning metadata and start issuing
1788data verification I/O. This is done until we get below the soft limit.
1789.sp
1790Default value: \fB20\fR which is 5% of RAM (1/20).
1791.RE
1792
1793.sp
1794.ne 2
1795.na
1796\fBzfs_scan_mem_lim_soft_fact\fR (int)
1797.ad
1798.RS 12n
1799The fraction of the hard limit used to determined the soft limit for I/O sorting
1800by the sequential scan algorithm. When we cross this limit from bellow no action
1801is taken. When we cross this limit from above it is because we are issuing
1802verification I/O. In this case (unless the metadata scan is done) we stop
1803issuing verification I/O and start scanning metadata again until we get to the
1804hard limit.
1805.sp
1806Default value: \fB20\fR which is 5% of the hard limit (1/20).
1807.RE
1808
1809.sp
1810.ne 2
1811.na
1812\fBzfs_scan_vdev_limit\fR (int)
1813.ad
1814.RS 12n
1815Maximum amount of data that can be concurrently issued at once for scrubs and
1816resilvers per leaf device, given in bytes.
1817.sp
1818Default value: \fB41943040\fR.
29714574
TF
1819.RE
1820
fd8febbd
TF
1821.sp
1822.ne 2
1823.na
1824\fBzfs_send_corrupt_data\fR (int)
1825.ad
1826.RS 12n
83426735 1827Allow sending of corrupt data (ignore read/checksum errors when sending data)
fd8febbd
TF
1828.sp
1829Use \fB1\fR for yes and \fB0\fR for no (default).
1830.RE
1831
29714574
TF
1832.sp
1833.ne 2
1834.na
1835\fBzfs_sync_pass_deferred_free\fR (int)
1836.ad
1837.RS 12n
83426735 1838Flushing of data to disk is done in passes. Defer frees starting in this pass
29714574
TF
1839.sp
1840Default value: \fB2\fR.
1841.RE
1842
1843.sp
1844.ne 2
1845.na
1846\fBzfs_sync_pass_dont_compress\fR (int)
1847.ad
1848.RS 12n
1849Don't compress starting in this pass
1850.sp
1851Default value: \fB5\fR.
1852.RE
1853
1854.sp
1855.ne 2
1856.na
1857\fBzfs_sync_pass_rewrite\fR (int)
1858.ad
1859.RS 12n
83426735 1860Rewrite new block pointers starting in this pass
29714574
TF
1861.sp
1862Default value: \fB2\fR.
1863.RE
1864
a032ac4b
BB
1865.sp
1866.ne 2
1867.na
1868\fBzfs_sync_taskq_batch_pct\fR (int)
1869.ad
1870.RS 12n
1871This controls the number of threads used by the dp_sync_taskq. The default
1872value of 75% will create a maximum of one thread per cpu.
1873.sp
be54a13c 1874Default value: \fB75\fR%.
a032ac4b
BB
1875.RE
1876
29714574
TF
1877.sp
1878.ne 2
1879.na
1880\fBzfs_txg_history\fR (int)
1881.ad
1882.RS 12n
379ca9cf
OF
1883Historical statistics for the last N txgs will be available in
1884\fB/proc/spl/kstat/zfs/<pool>/txgs\fR
29714574 1885.sp
ca85d690 1886Default value: \fB0\fR.
29714574
TF
1887.RE
1888
29714574
TF
1889.sp
1890.ne 2
1891.na
1892\fBzfs_txg_timeout\fR (int)
1893.ad
1894.RS 12n
83426735 1895Flush dirty data to disk at least every N seconds (maximum txg duration)
29714574
TF
1896.sp
1897Default value: \fB5\fR.
1898.RE
1899
1900.sp
1901.ne 2
1902.na
1903\fBzfs_vdev_aggregation_limit\fR (int)
1904.ad
1905.RS 12n
1906Max vdev I/O aggregation size
1907.sp
1908Default value: \fB131,072\fR.
1909.RE
1910
1911.sp
1912.ne 2
1913.na
1914\fBzfs_vdev_cache_bshift\fR (int)
1915.ad
1916.RS 12n
1917Shift size to inflate reads too
1918.sp
83426735 1919Default value: \fB16\fR (effectively 65536).
29714574
TF
1920.RE
1921
1922.sp
1923.ne 2
1924.na
1925\fBzfs_vdev_cache_max\fR (int)
1926.ad
1927.RS 12n
ca85d690 1928Inflate reads smaller than this value to meet the \fBzfs_vdev_cache_bshift\fR
1929size (default 64k).
83426735
D
1930.sp
1931Default value: \fB16384\fR.
29714574
TF
1932.RE
1933
1934.sp
1935.ne 2
1936.na
1937\fBzfs_vdev_cache_size\fR (int)
1938.ad
1939.RS 12n
83426735
D
1940Total size of the per-disk cache in bytes.
1941.sp
1942Currently this feature is disabled as it has been found to not be helpful
1943for performance and in some cases harmful.
29714574
TF
1944.sp
1945Default value: \fB0\fR.
1946.RE
1947
29714574
TF
1948.sp
1949.ne 2
1950.na
9f500936 1951\fBzfs_vdev_mirror_rotating_inc\fR (int)
29714574
TF
1952.ad
1953.RS 12n
9f500936 1954A number by which the balancing algorithm increments the load calculation for
1955the purpose of selecting the least busy mirror member when an I/O immediately
1956follows its predecessor on rotational vdevs for the purpose of making decisions
1957based on load.
29714574 1958.sp
9f500936 1959Default value: \fB0\fR.
1960.RE
1961
1962.sp
1963.ne 2
1964.na
1965\fBzfs_vdev_mirror_rotating_seek_inc\fR (int)
1966.ad
1967.RS 12n
1968A number by which the balancing algorithm increments the load calculation for
1969the purpose of selecting the least busy mirror member when an I/O lacks
1970locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1971this that are not immediately following the previous I/O are incremented by
1972half.
1973.sp
1974Default value: \fB5\fR.
1975.RE
1976
1977.sp
1978.ne 2
1979.na
1980\fBzfs_vdev_mirror_rotating_seek_offset\fR (int)
1981.ad
1982.RS 12n
1983The maximum distance for the last queued I/O in which the balancing algorithm
1984considers an I/O to have locality.
1985See the section "ZFS I/O SCHEDULER".
1986.sp
1987Default value: \fB1048576\fR.
1988.RE
1989
1990.sp
1991.ne 2
1992.na
1993\fBzfs_vdev_mirror_non_rotating_inc\fR (int)
1994.ad
1995.RS 12n
1996A number by which the balancing algorithm increments the load calculation for
1997the purpose of selecting the least busy mirror member on non-rotational vdevs
1998when I/Os do not immediately follow one another.
1999.sp
2000Default value: \fB0\fR.
2001.RE
2002
2003.sp
2004.ne 2
2005.na
2006\fBzfs_vdev_mirror_non_rotating_seek_inc\fR (int)
2007.ad
2008.RS 12n
2009A number by which the balancing algorithm increments the load calculation for
2010the purpose of selecting the least busy mirror member when an I/O lacks
2011locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
2012this that are not immediately following the previous I/O are incremented by
2013half.
2014.sp
2015Default value: \fB1\fR.
29714574
TF
2016.RE
2017
29714574
TF
2018.sp
2019.ne 2
2020.na
2021\fBzfs_vdev_read_gap_limit\fR (int)
2022.ad
2023.RS 12n
83426735
D
2024Aggregate read I/O operations if the gap on-disk between them is within this
2025threshold.
29714574
TF
2026.sp
2027Default value: \fB32,768\fR.
2028.RE
2029
2030.sp
2031.ne 2
2032.na
2033\fBzfs_vdev_scheduler\fR (charp)
2034.ad
2035.RS 12n
ca85d690 2036Set the Linux I/O scheduler on whole disk vdevs to this scheduler. Valid options
2037are noop, cfq, bfq & deadline
29714574
TF
2038.sp
2039Default value: \fBnoop\fR.
2040.RE
2041
29714574
TF
2042.sp
2043.ne 2
2044.na
2045\fBzfs_vdev_write_gap_limit\fR (int)
2046.ad
2047.RS 12n
2048Aggregate write I/O over gap
2049.sp
2050Default value: \fB4,096\fR.
2051.RE
2052
ab9f4b0b
GN
2053.sp
2054.ne 2
2055.na
2056\fBzfs_vdev_raidz_impl\fR (string)
2057.ad
2058.RS 12n
c9187d86 2059Parameter for selecting raidz parity implementation to use.
ab9f4b0b
GN
2060
2061Options marked (always) below may be selected on module load as they are
2062supported on all systems.
2063The remaining options may only be set after the module is loaded, as they
2064are available only if the implementations are compiled in and supported
2065on the running system.
2066
2067Once the module is loaded, the content of
2068/sys/module/zfs/parameters/zfs_vdev_raidz_impl will show available options
2069with the currently selected one enclosed in [].
2070Possible options are:
2071 fastest - (always) implementation selected using built-in benchmark
2072 original - (always) original raidz implementation
2073 scalar - (always) scalar raidz implementation
ae25d222
GN
2074 sse2 - implementation using SSE2 instruction set (64bit x86 only)
2075 ssse3 - implementation using SSSE3 instruction set (64bit x86 only)
ab9f4b0b 2076 avx2 - implementation using AVX2 instruction set (64bit x86 only)
7f547f85
RD
2077 avx512f - implementation using AVX512F instruction set (64bit x86 only)
2078 avx512bw - implementation using AVX512F & AVX512BW instruction sets (64bit x86 only)
62a65a65
RD
2079 aarch64_neon - implementation using NEON (Aarch64/64 bit ARMv8 only)
2080 aarch64_neonx2 - implementation using NEON with more unrolling (Aarch64/64 bit ARMv8 only)
ab9f4b0b
GN
2081.sp
2082Default value: \fBfastest\fR.
2083.RE
2084
29714574
TF
2085.sp
2086.ne 2
2087.na
2088\fBzfs_zevent_cols\fR (int)
2089.ad
2090.RS 12n
83426735 2091When zevents are logged to the console use this as the word wrap width.
29714574
TF
2092.sp
2093Default value: \fB80\fR.
2094.RE
2095
2096.sp
2097.ne 2
2098.na
2099\fBzfs_zevent_console\fR (int)
2100.ad
2101.RS 12n
2102Log events to the console
2103.sp
2104Use \fB1\fR for yes and \fB0\fR for no (default).
2105.RE
2106
2107.sp
2108.ne 2
2109.na
2110\fBzfs_zevent_len_max\fR (int)
2111.ad
2112.RS 12n
83426735
D
2113Max event queue length. A value of 0 will result in a calculated value which
2114increases with the number of CPUs in the system (minimum 64 events). Events
2115in the queue can be viewed with the \fBzpool events\fR command.
29714574
TF
2116.sp
2117Default value: \fB0\fR.
2118.RE
2119
a032ac4b
BB
2120.sp
2121.ne 2
2122.na
2123\fBzfs_zil_clean_taskq_maxalloc\fR (int)
2124.ad
2125.RS 12n
2126The maximum number of taskq entries that are allowed to be cached. When this
2fe61a7e 2127limit is exceeded transaction records (itxs) will be cleaned synchronously.
a032ac4b
BB
2128.sp
2129Default value: \fB1048576\fR.
2130.RE
2131
2132.sp
2133.ne 2
2134.na
2135\fBzfs_zil_clean_taskq_minalloc\fR (int)
2136.ad
2137.RS 12n
2138The number of taskq entries that are pre-populated when the taskq is first
2139created and are immediately available for use.
2140.sp
2141Default value: \fB1024\fR.
2142.RE
2143
2144.sp
2145.ne 2
2146.na
2147\fBzfs_zil_clean_taskq_nthr_pct\fR (int)
2148.ad
2149.RS 12n
2150This controls the number of threads used by the dp_zil_clean_taskq. The default
2151value of 100% will create a maximum of one thread per cpu.
2152.sp
be54a13c 2153Default value: \fB100\fR%.
a032ac4b
BB
2154.RE
2155
29714574
TF
2156.sp
2157.ne 2
2158.na
2159\fBzil_replay_disable\fR (int)
2160.ad
2161.RS 12n
83426735
D
2162Disable intent logging replay. Can be disabled for recovery from corrupted
2163ZIL
29714574
TF
2164.sp
2165Use \fB1\fR for yes and \fB0\fR for no (default).
2166.RE
2167
2168.sp
2169.ne 2
2170.na
1b7c1e5c 2171\fBzil_slog_bulk\fR (ulong)
29714574
TF
2172.ad
2173.RS 12n
1b7c1e5c
GDN
2174Limit SLOG write size per commit executed with synchronous priority.
2175Any writes above that will be executed with lower (asynchronous) priority
2176to limit potential SLOG device abuse by single active ZIL writer.
29714574 2177.sp
1b7c1e5c 2178Default value: \fB786,432\fR.
29714574
TF
2179.RE
2180
29714574
TF
2181.sp
2182.ne 2
2183.na
2184\fBzio_delay_max\fR (int)
2185.ad
2186.RS 12n
83426735 2187A zevent will be logged if a ZIO operation takes more than N milliseconds to
ab9f4b0b 2188complete. Note that this is only a logging facility, not a timeout on
83426735 2189operations.
29714574
TF
2190.sp
2191Default value: \fB30,000\fR.
2192.RE
2193
3dfb57a3
DB
2194.sp
2195.ne 2
2196.na
2197\fBzio_dva_throttle_enabled\fR (int)
2198.ad
2199.RS 12n
2200Throttle block allocations in the ZIO pipeline. This allows for
2201dynamic allocation distribution when devices are imbalanced.
e815485f
TC
2202When enabled, the maximum number of pending allocations per top-level vdev
2203is limited by \fBzfs_vdev_queue_depth_pct\fR.
3dfb57a3 2204.sp
27f2b90d 2205Default value: \fB1\fR.
3dfb57a3
DB
2206.RE
2207
29714574
TF
2208.sp
2209.ne 2
2210.na
2211\fBzio_requeue_io_start_cut_in_line\fR (int)
2212.ad
2213.RS 12n
2214Prioritize requeued I/O
2215.sp
2216Default value: \fB0\fR.
2217.RE
2218
dcb6bed1
D
2219.sp
2220.ne 2
2221.na
2222\fBzio_taskq_batch_pct\fR (uint)
2223.ad
2224.RS 12n
2225Percentage of online CPUs (or CPU cores, etc) which will run a worker thread
2226for IO. These workers are responsible for IO work such as compression and
2227checksum calculations. Fractional number of CPUs will be rounded down.
2228.sp
2229The default value of 75 was chosen to avoid using all CPUs which can result in
2230latency issues and inconsistent application performance, especially when high
2231compression is enabled.
2232.sp
2233Default value: \fB75\fR.
2234.RE
2235
29714574
TF
2236.sp
2237.ne 2
2238.na
2239\fBzvol_inhibit_dev\fR (uint)
2240.ad
2241.RS 12n
83426735
D
2242Do not create zvol device nodes. This may slightly improve startup time on
2243systems with a very large number of zvols.
29714574
TF
2244.sp
2245Use \fB1\fR for yes and \fB0\fR for no (default).
2246.RE
2247
2248.sp
2249.ne 2
2250.na
2251\fBzvol_major\fR (uint)
2252.ad
2253.RS 12n
83426735 2254Major number for zvol block devices
29714574
TF
2255.sp
2256Default value: \fB230\fR.
2257.RE
2258
2259.sp
2260.ne 2
2261.na
2262\fBzvol_max_discard_blocks\fR (ulong)
2263.ad
2264.RS 12n
83426735
D
2265Discard (aka TRIM) operations done on zvols will be done in batches of this
2266many blocks, where block size is determined by the \fBvolblocksize\fR property
2267of a zvol.
29714574
TF
2268.sp
2269Default value: \fB16,384\fR.
2270.RE
2271
9965059a
BB
2272.sp
2273.ne 2
2274.na
2275\fBzvol_prefetch_bytes\fR (uint)
2276.ad
2277.RS 12n
2278When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
2279from the start and end of the volume. Prefetching these regions
2280of the volume is desirable because they are likely to be accessed
2281immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
2282table.
2283.sp
2284Default value: \fB131,072\fR.
2285.RE
2286
692e55b8
CC
2287.sp
2288.ne 2
2289.na
2290\fBzvol_request_sync\fR (uint)
2291.ad
2292.RS 12n
2293When processing I/O requests for a zvol submit them synchronously. This
2294effectively limits the queue depth to 1 for each I/O submitter. When set
2295to 0 requests are handled asynchronously by a thread pool. The number of
2296requests which can be handled concurrently is controller by \fBzvol_threads\fR.
2297.sp
8fa5250f 2298Default value: \fB0\fR.
692e55b8
CC
2299.RE
2300
2301.sp
2302.ne 2
2303.na
2304\fBzvol_threads\fR (uint)
2305.ad
2306.RS 12n
2307Max number of threads which can handle zvol I/O requests concurrently.
2308.sp
2309Default value: \fB32\fR.
2310.RE
2311
cf8738d8 2312.sp
2313.ne 2
2314.na
2315\fBzvol_volmode\fR (uint)
2316.ad
2317.RS 12n
2318Defines zvol block devices behaviour when \fBvolmode\fR is set to \fBdefault\fR.
2319Valid values are \fB1\fR (full), \fB2\fR (dev) and \fB3\fR (none).
2320.sp
2321Default value: \fB1\fR.
2322.RE
2323
39ccc909 2324.sp
2325.ne 2
2326.na
2327\fBzfs_qat_disable\fR (int)
2328.ad
2329.RS 12n
2330This tunable disables qat hardware acceleration for gzip compression.
2331It is available only if qat acceleration is compiled in and qat driver
2332is present.
2333.sp
2334Use \fB1\fR for yes and \fB0\fR for no (default).
2335.RE
2336
e8b96c60
MA
2337.SH ZFS I/O SCHEDULER
2338ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
2339The I/O scheduler determines when and in what order those operations are
2340issued. The I/O scheduler divides operations into five I/O classes
2341prioritized in the following order: sync read, sync write, async read,
2342async write, and scrub/resilver. Each queue defines the minimum and
2343maximum number of concurrent operations that may be issued to the
2344device. In addition, the device has an aggregate maximum,
2345\fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
2346must not exceed the aggregate maximum. If the sum of the per-queue
2347maximums exceeds the aggregate maximum, then the number of active I/Os
2348may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
2349be issued regardless of whether all per-queue minimums have been met.
2350.sp
2351For many physical devices, throughput increases with the number of
2352concurrent operations, but latency typically suffers. Further, physical
2353devices typically have a limit at which more concurrent operations have no
2354effect on throughput or can actually cause it to decrease.
2355.sp
2356The scheduler selects the next operation to issue by first looking for an
2357I/O class whose minimum has not been satisfied. Once all are satisfied and
2358the aggregate maximum has not been hit, the scheduler looks for classes
2359whose maximum has not been satisfied. Iteration through the I/O classes is
2360done in the order specified above. No further operations are issued if the
2361aggregate maximum number of concurrent operations has been hit or if there
2362are no operations queued for an I/O class that has not hit its maximum.
2363Every time an I/O is queued or an operation completes, the I/O scheduler
2364looks for new operations to issue.
2365.sp
2366In general, smaller max_active's will lead to lower latency of synchronous
2367operations. Larger max_active's may lead to higher overall throughput,
2368depending on underlying storage.
2369.sp
2370The ratio of the queues' max_actives determines the balance of performance
2371between reads, writes, and scrubs. E.g., increasing
2372\fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
2373more quickly, but reads and writes to have higher latency and lower throughput.
2374.sp
2375All I/O classes have a fixed maximum number of outstanding operations
2376except for the async write class. Asynchronous writes represent the data
2377that is committed to stable storage during the syncing stage for
2378transaction groups. Transaction groups enter the syncing state
2379periodically so the number of queued async writes will quickly burst up
2380and then bleed down to zero. Rather than servicing them as quickly as
2381possible, the I/O scheduler changes the maximum number of active async
2382write I/Os according to the amount of dirty data in the pool. Since
2383both throughput and latency typically increase with the number of
2384concurrent operations issued to physical devices, reducing the
2385burstiness in the number of concurrent operations also stabilizes the
2386response time of operations from other -- and in particular synchronous
2387-- queues. In broad strokes, the I/O scheduler will issue more
2388concurrent operations from the async write queue as there's more dirty
2389data in the pool.
2390.sp
2391Async Writes
2392.sp
2393The number of concurrent operations issued for the async write I/O class
2394follows a piece-wise linear function defined by a few adjustable points.
2395.nf
2396
2397 | o---------| <-- zfs_vdev_async_write_max_active
2398 ^ | /^ |
2399 | | / | |
2400active | / | |
2401 I/O | / | |
2402count | / | |
2403 | / | |
2404 |-------o | | <-- zfs_vdev_async_write_min_active
2405 0|_______^______|_________|
2406 0% | | 100% of zfs_dirty_data_max
2407 | |
2408 | `-- zfs_vdev_async_write_active_max_dirty_percent
2409 `--------- zfs_vdev_async_write_active_min_dirty_percent
2410
2411.fi
2412Until the amount of dirty data exceeds a minimum percentage of the dirty
2413data allowed in the pool, the I/O scheduler will limit the number of
2414concurrent operations to the minimum. As that threshold is crossed, the
2415number of concurrent operations issued increases linearly to the maximum at
2416the specified maximum percentage of the dirty data allowed in the pool.
2417.sp
2418Ideally, the amount of dirty data on a busy pool will stay in the sloped
2419part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
2420and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
2421maximum percentage, this indicates that the rate of incoming data is
2422greater than the rate that the backend storage can handle. In this case, we
2423must further throttle incoming writes, as described in the next section.
2424
2425.SH ZFS TRANSACTION DELAY
2426We delay transactions when we've determined that the backend storage
2427isn't able to accommodate the rate of incoming writes.
2428.sp
2429If there is already a transaction waiting, we delay relative to when
2430that transaction will finish waiting. This way the calculated delay time
2431is independent of the number of threads concurrently executing
2432transactions.
2433.sp
2434If we are the only waiter, wait relative to when the transaction
2435started, rather than the current time. This credits the transaction for
2436"time already served", e.g. reading indirect blocks.
2437.sp
2438The minimum time for a transaction to take is calculated as:
2439.nf
2440 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
2441 min_time is then capped at 100 milliseconds.
2442.fi
2443.sp
2444The delay has two degrees of freedom that can be adjusted via tunables. The
2445percentage of dirty data at which we start to delay is defined by
2446\fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
2447\fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
2448delay after writing at full speed has failed to keep up with the incoming write
2449rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
2450this variable determines the amount of delay at the midpoint of the curve.
2451.sp
2452.nf
2453delay
2454 10ms +-------------------------------------------------------------*+
2455 | *|
2456 9ms + *+
2457 | *|
2458 8ms + *+
2459 | * |
2460 7ms + * +
2461 | * |
2462 6ms + * +
2463 | * |
2464 5ms + * +
2465 | * |
2466 4ms + * +
2467 | * |
2468 3ms + * +
2469 | * |
2470 2ms + (midpoint) * +
2471 | | ** |
2472 1ms + v *** +
2473 | zfs_delay_scale ----------> ******** |
2474 0 +-------------------------------------*********----------------+
2475 0% <- zfs_dirty_data_max -> 100%
2476.fi
2477.sp
2478Note that since the delay is added to the outstanding time remaining on the
2479most recent transaction, the delay is effectively the inverse of IOPS.
2480Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
2481was chosen such that small changes in the amount of accumulated dirty data
2482in the first 3/4 of the curve yield relatively small differences in the
2483amount of delay.
2484.sp
2485The effects can be easier to understand when the amount of delay is
2486represented on a log scale:
2487.sp
2488.nf
2489delay
2490100ms +-------------------------------------------------------------++
2491 + +
2492 | |
2493 + *+
2494 10ms + *+
2495 + ** +
2496 | (midpoint) ** |
2497 + | ** +
2498 1ms + v **** +
2499 + zfs_delay_scale ----------> ***** +
2500 | **** |
2501 + **** +
2502100us + ** +
2503 + * +
2504 | * |
2505 + * +
2506 10us + * +
2507 + +
2508 | |
2509 + +
2510 +--------------------------------------------------------------+
2511 0% <- zfs_dirty_data_max -> 100%
2512.fi
2513.sp
2514Note here that only as the amount of dirty data approaches its limit does
2515the delay start to increase rapidly. The goal of a properly tuned system
2516should be to keep the amount of dirty data out of that range by first
2517ensuring that the appropriate limits are set for the I/O scheduler to reach
2518optimal throughput on the backend storage, and then by changing the value
2519of \fBzfs_delay_scale\fR to increase the steepness of the curve.