]> git.proxmox.com Git - mirror_zfs.git/blame - man/man5/zfs-module-parameters.5
Prevent reclaim in send_traverse_thread()
[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.
3.\" The contents of this file are subject to the terms of the Common Development
4.\" and Distribution License (the "License"). You may not use this file except
5.\" in compliance with the License. You can obtain a copy of the license at
6.\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
7.\"
8.\" See the License for the specific language governing permissions and
9.\" limitations under the License. When distributing Covered Code, include this
10.\" CDDL HEADER in each file and include the License file at
11.\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this
12.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
13.\" own identifying information:
14.\" Portions Copyright [yyyy] [name of copyright owner]
15.TH ZFS-MODULE-PARAMETERS 5 "Nov 16, 2013"
16.SH NAME
17zfs\-module\-parameters \- ZFS module parameters
18.SH DESCRIPTION
19.sp
20.LP
21Description of the different parameters to the ZFS module.
22
23.SS "Module parameters"
24.sp
25.LP
26
6d836e6f
RE
27.sp
28.ne 2
29.na
30\fBignore_hole_birth\fR (int)
31.ad
32.RS 12n
33When set, the hole_birth optimization will not be used, and all holes will
34always be sent on zfs send. Useful if you suspect your datasets are affected
35by a bug in hole_birth.
36.sp
37Use \fB1\fR for on and \fB0\fR (default) for off.
38.RE
39
29714574
TF
40.sp
41.ne 2
42.na
43\fBl2arc_feed_again\fR (int)
44.ad
45.RS 12n
83426735
D
46Turbo L2ARC warm-up. When the L2ARC is cold the fill interval will be set as
47fast as possible.
29714574
TF
48.sp
49Use \fB1\fR for yes (default) and \fB0\fR to disable.
50.RE
51
52.sp
53.ne 2
54.na
55\fBl2arc_feed_min_ms\fR (ulong)
56.ad
57.RS 12n
83426735
D
58Min feed interval in milliseconds. Requires \fBl2arc_feed_again=1\fR and only
59applicable in related situations.
29714574
TF
60.sp
61Default value: \fB200\fR.
62.RE
63
64.sp
65.ne 2
66.na
67\fBl2arc_feed_secs\fR (ulong)
68.ad
69.RS 12n
70Seconds between L2ARC writing
71.sp
72Default value: \fB1\fR.
73.RE
74
75.sp
76.ne 2
77.na
78\fBl2arc_headroom\fR (ulong)
79.ad
80.RS 12n
83426735
D
81How far through the ARC lists to search for L2ARC cacheable content, expressed
82as a multiplier of \fBl2arc_write_max\fR
29714574
TF
83.sp
84Default value: \fB2\fR.
85.RE
86
87.sp
88.ne 2
89.na
90\fBl2arc_headroom_boost\fR (ulong)
91.ad
92.RS 12n
83426735
D
93Scales \fBl2arc_headroom\fR by this percentage when L2ARC contents are being
94successfully compressed before writing. A value of 100 disables this feature.
29714574
TF
95.sp
96Default value: \fB200\fR.
97.RE
98
8a09d5fd
BB
99.sp
100.ne 2
101.na
102\fBl2arc_max_block_size\fR (ulong)
103.ad
104.RS 12n
105The maximum block size which may be written to an L2ARC device, after
106compression and other factors. This setting is used to prevent a small
107number of large blocks from pushing a larger number of small blocks out
108of the cache.
109.sp
110Default value: \fB16,777,216\fR.
111.RE
112
29714574
TF
113.sp
114.ne 2
115.na
116\fBl2arc_nocompress\fR (int)
117.ad
118.RS 12n
119Skip compressing L2ARC buffers
120.sp
121Use \fB1\fR for yes and \fB0\fR for no (default).
122.RE
123
124.sp
125.ne 2
126.na
127\fBl2arc_noprefetch\fR (int)
128.ad
129.RS 12n
83426735
D
130Do not write buffers to L2ARC if they were prefetched but not used by
131applications
29714574
TF
132.sp
133Use \fB1\fR for yes (default) and \fB0\fR to disable.
134.RE
135
136.sp
137.ne 2
138.na
139\fBl2arc_norw\fR (int)
140.ad
141.RS 12n
142No reads during writes
143.sp
144Use \fB1\fR for yes and \fB0\fR for no (default).
145.RE
146
147.sp
148.ne 2
149.na
150\fBl2arc_write_boost\fR (ulong)
151.ad
152.RS 12n
83426735
D
153Cold L2ARC devices will have \fBl2arc_write_nax\fR increased by this amount
154while they remain cold.
29714574
TF
155.sp
156Default value: \fB8,388,608\fR.
157.RE
158
159.sp
160.ne 2
161.na
162\fBl2arc_write_max\fR (ulong)
163.ad
164.RS 12n
165Max write bytes per interval
166.sp
167Default value: \fB8,388,608\fR.
168.RE
169
99b14de4
ED
170.sp
171.ne 2
172.na
173\fBmetaslab_aliquot\fR (ulong)
174.ad
175.RS 12n
176Metaslab granularity, in bytes. This is roughly similar to what would be
177referred to as the "stripe size" in traditional RAID arrays. In normal
178operation, ZFS will try to write this amount of data to a top-level vdev
179before moving on to the next one.
180.sp
181Default value: \fB524,288\fR.
182.RE
183
f3a7f661
GW
184.sp
185.ne 2
186.na
187\fBmetaslab_bias_enabled\fR (int)
188.ad
189.RS 12n
190Enable metaslab group biasing based on its vdev's over- or under-utilization
191relative to the pool.
192.sp
193Use \fB1\fR for yes (default) and \fB0\fR for no.
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
404bytes, try to unpin some of it in response to demand for non-metadata. This
405value acts as a floor to the amount of dnode metadata.
406
407See also \fBzfs_arc_meta_prune\fR which serves a similar purpose but is used
408when the amount of metadata in the ARC exceeds \fBzfs_arc_meta_limit\fR rather
409than in response to overall demand for non-metadata.
410
411.sp
412Default value: \fB10% of zfs_arc_meta_limit\fR.
413.RE
414
415.sp
416.ne 2
417.na
418\fBzfs_arc_dnode_reduce_percent\fR (ulong)
419.ad
420.RS 12n
421Percentage of ARC dnodes to try to scan in response to demand for non-metadata
422when the number of bytes consumed by dnodes exceeds \fBzfs_arc_dnode_limit\fB.
423
424.sp
425Default value: \fB10% of the number of dnodes in the ARC\fR.
426.RE
427
49ddb315
MA
428.sp
429.ne 2
430.na
431\fBzfs_arc_average_blocksize\fR (int)
432.ad
433.RS 12n
434The ARC's buffer hash table is sized based on the assumption of an average
435block size of \fBzfs_arc_average_blocksize\fR (default 8K). This works out
436to roughly 1MB of hash table per 1GB of physical memory with 8-byte pointers.
437For configurations with a known larger average block size this value can be
438increased to reduce the memory footprint.
439
440.sp
441Default value: \fB8192\fR.
442.RE
443
ca0bf58d
PS
444.sp
445.ne 2
446.na
447\fBzfs_arc_evict_batch_limit\fR (int)
448.ad
449.RS 12n
8f343973 450Number ARC headers to evict per sub-list before proceeding to another sub-list.
ca0bf58d
PS
451This batch-style operation prevents entire sub-lists from being evicted at once
452but comes at a cost of additional unlocking and locking.
453.sp
454Default value: \fB10\fR.
455.RE
456
29714574
TF
457.sp
458.ne 2
459.na
460\fBzfs_arc_grow_retry\fR (int)
461.ad
462.RS 12n
83426735
D
463After a memory pressure event the ARC will wait this many seconds before trying
464to resume growth
29714574
TF
465.sp
466Default value: \fB5\fR.
467.RE
468
469.sp
470.ne 2
471.na
7e8bddd0 472\fBzfs_arc_lotsfree_percent\fR (int)
29714574
TF
473.ad
474.RS 12n
7e8bddd0
BB
475Throttle I/O when free system memory drops below this percentage of total
476system memory. Setting this value to 0 will disable the throttle.
29714574 477.sp
7e8bddd0 478Default value: \fB10\fR.
29714574
TF
479.RE
480
481.sp
482.ne 2
483.na
7e8bddd0 484\fBzfs_arc_max\fR (ulong)
29714574
TF
485.ad
486.RS 12n
83426735
D
487Max arc size of ARC in bytes. If set to 0 then it will consume 1/2 of system
488RAM. This value must be at least 67108864 (64 megabytes).
489.sp
490This value can be changed dynamically with some caveats. It cannot be set back
491to 0 while running and reducing it below the current ARC size will not cause
492the ARC to shrink without memory pressure to induce shrinking.
29714574 493.sp
7e8bddd0 494Default value: \fB0\fR.
29714574
TF
495.RE
496
497.sp
498.ne 2
499.na
500\fBzfs_arc_meta_limit\fR (ulong)
501.ad
502.RS 12n
2cbb06b5
BB
503The maximum allowed size in bytes that meta data buffers are allowed to
504consume in the ARC. When this limit is reached meta data buffers will
505be reclaimed even if the overall arc_c_max has not been reached. This
506value defaults to 0 which indicates that 3/4 of the ARC may be used
507for meta data.
29714574 508.sp
83426735
D
509This value my be changed dynamically except that it cannot be set back to 0
510for 3/4 of the ARC; it must be set to an explicit value.
511.sp
29714574
TF
512Default value: \fB0\fR.
513.RE
514
ca0bf58d
PS
515.sp
516.ne 2
517.na
518\fBzfs_arc_meta_min\fR (ulong)
519.ad
520.RS 12n
521The minimum allowed size in bytes that meta data buffers may consume in
522the ARC. This value defaults to 0 which disables a floor on the amount
523of the ARC devoted meta data.
524.sp
525Default value: \fB0\fR.
526.RE
527
29714574
TF
528.sp
529.ne 2
530.na
531\fBzfs_arc_meta_prune\fR (int)
532.ad
533.RS 12n
2cbb06b5
BB
534The number of dentries and inodes to be scanned looking for entries
535which can be dropped. This may be required when the ARC reaches the
536\fBzfs_arc_meta_limit\fR because dentries and inodes can pin buffers
537in the ARC. Increasing this value will cause to dentry and inode caches
538to be pruned more aggressively. Setting this value to 0 will disable
539pruning the inode and dentry caches.
29714574 540.sp
2cbb06b5 541Default value: \fB10,000\fR.
29714574
TF
542.RE
543
bc888666
BB
544.sp
545.ne 2
546.na
547\fBzfs_arc_meta_adjust_restarts\fR (ulong)
548.ad
549.RS 12n
550The number of restart passes to make while scanning the ARC attempting
551the free buffers in order to stay below the \fBzfs_arc_meta_limit\fR.
552This value should not need to be tuned but is available to facilitate
553performance analysis.
554.sp
555Default value: \fB4096\fR.
556.RE
557
29714574
TF
558.sp
559.ne 2
560.na
561\fBzfs_arc_min\fR (ulong)
562.ad
563.RS 12n
564Min arc size
565.sp
566Default value: \fB100\fR.
567.RE
568
569.sp
570.ne 2
571.na
572\fBzfs_arc_min_prefetch_lifespan\fR (int)
573.ad
574.RS 12n
83426735
D
575Minimum time prefetched blocks are locked in the ARC, specified in jiffies.
576A value of 0 will default to 1 second.
29714574 577.sp
83426735 578Default value: \fB0\fR.
29714574
TF
579.RE
580
ca0bf58d
PS
581.sp
582.ne 2
583.na
584\fBzfs_arc_num_sublists_per_state\fR (int)
585.ad
586.RS 12n
587To allow more fine-grained locking, each ARC state contains a series
588of lists for both data and meta data objects. Locking is performed at
589the level of these "sub-lists". This parameters controls the number of
590sub-lists per ARC state.
591.sp
83426735 592Default value: \fR1\fB or the number of online CPUs, whichever is greater
ca0bf58d
PS
593.RE
594
595.sp
596.ne 2
597.na
598\fBzfs_arc_overflow_shift\fR (int)
599.ad
600.RS 12n
601The ARC size is considered to be overflowing if it exceeds the current
602ARC target size (arc_c) by a threshold determined by this parameter.
603The threshold is calculated as a fraction of arc_c using the formula
604"arc_c >> \fBzfs_arc_overflow_shift\fR".
605
606The default value of 8 causes the ARC to be considered to be overflowing
607if it exceeds the target size by 1/256th (0.3%) of the target size.
608
609When the ARC is overflowing, new buffer allocations are stalled until
610the reclaim thread catches up and the overflow condition no longer exists.
611.sp
612Default value: \fB8\fR.
613.RE
614
728d6ae9
BB
615.sp
616.ne 2
617.na
618
619\fBzfs_arc_p_min_shift\fR (int)
620.ad
621.RS 12n
622arc_c shift to calc min/max arc_p
623.sp
624Default value: \fB4\fR.
625.RE
626
89c8cac4
PS
627.sp
628.ne 2
629.na
630\fBzfs_arc_p_aggressive_disable\fR (int)
631.ad
632.RS 12n
633Disable aggressive arc_p growth
634.sp
635Use \fB1\fR for yes (default) and \fB0\fR to disable.
636.RE
637
62422785
PS
638.sp
639.ne 2
640.na
641\fBzfs_arc_p_dampener_disable\fR (int)
642.ad
643.RS 12n
644Disable arc_p adapt dampener
645.sp
646Use \fB1\fR for yes (default) and \fB0\fR to disable.
647.RE
648
29714574
TF
649.sp
650.ne 2
651.na
652\fBzfs_arc_shrink_shift\fR (int)
653.ad
654.RS 12n
655log2(fraction of arc to reclaim)
656.sp
657Default value: \fB5\fR.
658.RE
659
11f552fa
BB
660.sp
661.ne 2
662.na
663\fBzfs_arc_sys_free\fR (ulong)
664.ad
665.RS 12n
666The target number of bytes the ARC should leave as free memory on the system.
667Defaults to the larger of 1/64 of physical memory or 512K. Setting this
668option to a non-zero value will override the default.
669.sp
670Default value: \fB0\fR.
671.RE
672
29714574
TF
673.sp
674.ne 2
675.na
676\fBzfs_autoimport_disable\fR (int)
677.ad
678.RS 12n
27b293be 679Disable pool import at module load by ignoring the cache file (typically \fB/etc/zfs/zpool.cache\fR).
29714574 680.sp
70081096 681Use \fB1\fR for yes (default) and \fB0\fR for no.
29714574
TF
682.RE
683
3b36f831
BB
684.sp
685.ne 2
686.na
687\fBzfs_dbgmsg_enable\fR (int)
688.ad
689.RS 12n
690Internally ZFS keeps a small log to facilitate debugging. By default the log
691is disabled, to enable it set this option to 1. The contents of the log can
692be accessed by reading the /proc/spl/kstat/zfs/dbgmsg file. Writing 0 to
693this proc file clears the log.
694.sp
695Default value: \fB0\fR.
696.RE
697
698.sp
699.ne 2
700.na
701\fBzfs_dbgmsg_maxsize\fR (int)
702.ad
703.RS 12n
704The maximum size in bytes of the internal ZFS debug log.
705.sp
706Default value: \fB4M\fR.
707.RE
708
29714574
TF
709.sp
710.ne 2
711.na
712\fBzfs_dbuf_state_index\fR (int)
713.ad
714.RS 12n
83426735
D
715This feature is currently unused. It is normally used for controlling what
716reporting is available under /proc/spl/kstat/zfs.
29714574
TF
717.sp
718Default value: \fB0\fR.
719.RE
720
721.sp
722.ne 2
723.na
724\fBzfs_deadman_enabled\fR (int)
725.ad
726.RS 12n
83426735 727Enable deadman timer. See description below.
29714574
TF
728.sp
729Use \fB1\fR for yes (default) and \fB0\fR to disable.
730.RE
731
732.sp
733.ne 2
734.na
e8b96c60 735\fBzfs_deadman_synctime_ms\fR (ulong)
29714574
TF
736.ad
737.RS 12n
e8b96c60
MA
738Expiration time in milliseconds. This value has two meanings. First it is
739used to determine when the spa_deadman() logic should fire. By default the
740spa_deadman() will fire if spa_sync() has not completed in 1000 seconds.
741Secondly, the value determines if an I/O is considered "hung". Any I/O that
742has not completed in zfs_deadman_synctime_ms is considered "hung" resulting
743in a zevent being logged.
29714574 744.sp
e8b96c60 745Default value: \fB1,000,000\fR.
29714574
TF
746.RE
747
748.sp
749.ne 2
750.na
751\fBzfs_dedup_prefetch\fR (int)
752.ad
753.RS 12n
754Enable prefetching dedup-ed blks
755.sp
0dfc7324 756Use \fB1\fR for yes and \fB0\fR to disable (default).
29714574
TF
757.RE
758
e8b96c60
MA
759.sp
760.ne 2
761.na
762\fBzfs_delay_min_dirty_percent\fR (int)
763.ad
764.RS 12n
765Start to delay each transaction once there is this amount of dirty data,
766expressed as a percentage of \fBzfs_dirty_data_max\fR.
767This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
768See the section "ZFS TRANSACTION DELAY".
769.sp
770Default value: \fB60\fR.
771.RE
772
773.sp
774.ne 2
775.na
776\fBzfs_delay_scale\fR (int)
777.ad
778.RS 12n
779This controls how quickly the transaction delay approaches infinity.
780Larger values cause longer delays for a given amount of dirty data.
781.sp
782For the smoothest delay, this value should be about 1 billion divided
783by the maximum number of operations per second. This will smoothly
784handle between 10x and 1/10th this number.
785.sp
786See the section "ZFS TRANSACTION DELAY".
787.sp
788Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
789.sp
790Default value: \fB500,000\fR.
791.RE
792
a966c564
K
793.sp
794.ne 2
795.na
796\fBzfs_delete_blocks\fR (ulong)
797.ad
798.RS 12n
799This is the used to define a large file for the purposes of delete. Files
800containing more than \fBzfs_delete_blocks\fR will be deleted asynchronously
801while smaller files are deleted synchronously. Decreasing this value will
802reduce the time spent in an unlink(2) system call at the expense of a longer
803delay before the freed space is available.
804.sp
805Default value: \fB20,480\fR.
806.RE
807
e8b96c60
MA
808.sp
809.ne 2
810.na
811\fBzfs_dirty_data_max\fR (int)
812.ad
813.RS 12n
814Determines the dirty space limit in bytes. Once this limit is exceeded, new
815writes are halted until space frees up. This parameter takes precedence
816over \fBzfs_dirty_data_max_percent\fR.
817See the section "ZFS TRANSACTION DELAY".
818.sp
819Default value: 10 percent of all memory, capped at \fBzfs_dirty_data_max_max\fR.
820.RE
821
822.sp
823.ne 2
824.na
825\fBzfs_dirty_data_max_max\fR (int)
826.ad
827.RS 12n
828Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
829This limit is only enforced at module load time, and will be ignored if
830\fBzfs_dirty_data_max\fR is later changed. This parameter takes
831precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
832"ZFS TRANSACTION DELAY".
833.sp
834Default value: 25% of physical RAM.
835.RE
836
837.sp
838.ne 2
839.na
840\fBzfs_dirty_data_max_max_percent\fR (int)
841.ad
842.RS 12n
843Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
844percentage of physical RAM. This limit is only enforced at module load
845time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
846The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
847one. See the section "ZFS TRANSACTION DELAY".
848.sp
83426735 849Default value: \fN25\fR.
e8b96c60
MA
850.RE
851
852.sp
853.ne 2
854.na
855\fBzfs_dirty_data_max_percent\fR (int)
856.ad
857.RS 12n
858Determines the dirty space limit, expressed as a percentage of all
859memory. Once this limit is exceeded, new writes are halted until space frees
860up. The parameter \fBzfs_dirty_data_max\fR takes precedence over this
861one. See the section "ZFS TRANSACTION DELAY".
862.sp
863Default value: 10%, subject to \fBzfs_dirty_data_max_max\fR.
864.RE
865
866.sp
867.ne 2
868.na
869\fBzfs_dirty_data_sync\fR (int)
870.ad
871.RS 12n
872Start syncing out a transaction group if there is at least this much dirty data.
873.sp
874Default value: \fB67,108,864\fR.
875.RE
876
1eeb4562
JX
877.sp
878.ne 2
879.na
880\fBzfs_fletcher_4_impl\fR (string)
881.ad
882.RS 12n
883Select a fletcher 4 implementation.
884.sp
35a76a03 885Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
70b258fc
GN
886\fBavx2\fR, and \fBavx512f\fR.
887All of the selectors except \fBfastest\fR and \fBscalar\fR require instruction
888set extensions to be available and will only appear if ZFS detects that they are
889present at runtime. If multiple implementations of fletcher 4 are available,
890the \fBfastest\fR will be chosen using a micro benchmark. Selecting \fBscalar\fR
891results in the original, CPU based calculation, being used. Selecting any option
892other than \fBfastest\fR and \fBscalar\fR results in vector instructions from
893the respective CPU instruction set being used.
1eeb4562
JX
894.sp
895Default value: \fBfastest\fR.
896.RE
897
ba5ad9a4
GW
898.sp
899.ne 2
900.na
901\fBzfs_free_bpobj_enabled\fR (int)
902.ad
903.RS 12n
904Enable/disable the processing of the free_bpobj object.
905.sp
906Default value: \fB1\fR.
907.RE
908
36283ca2
MG
909.sp
910.ne 2
911.na
912\fBzfs_free_max_blocks\fR (ulong)
913.ad
914.RS 12n
915Maximum number of blocks freed in a single txg.
916.sp
917Default value: \fB100,000\fR.
918.RE
919
e8b96c60
MA
920.sp
921.ne 2
922.na
923\fBzfs_vdev_async_read_max_active\fR (int)
924.ad
925.RS 12n
83426735 926Maximum asynchronous read I/Os active to each device.
e8b96c60
MA
927See the section "ZFS I/O SCHEDULER".
928.sp
929Default value: \fB3\fR.
930.RE
931
932.sp
933.ne 2
934.na
935\fBzfs_vdev_async_read_min_active\fR (int)
936.ad
937.RS 12n
938Minimum asynchronous read I/Os active to each device.
939See the section "ZFS I/O SCHEDULER".
940.sp
941Default value: \fB1\fR.
942.RE
943
944.sp
945.ne 2
946.na
947\fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
948.ad
949.RS 12n
950When the pool has more than
951\fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
952\fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
953the dirty data is between min and max, the active I/O limit is linearly
954interpolated. See the section "ZFS I/O SCHEDULER".
955.sp
956Default value: \fB60\fR.
957.RE
958
959.sp
960.ne 2
961.na
962\fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
963.ad
964.RS 12n
965When the pool has less than
966\fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
967\fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
968the dirty data is between min and max, the active I/O limit is linearly
969interpolated. See the section "ZFS I/O SCHEDULER".
970.sp
971Default value: \fB30\fR.
972.RE
973
974.sp
975.ne 2
976.na
977\fBzfs_vdev_async_write_max_active\fR (int)
978.ad
979.RS 12n
83426735 980Maximum asynchronous write I/Os active to each device.
e8b96c60
MA
981See the section "ZFS I/O SCHEDULER".
982.sp
983Default value: \fB10\fR.
984.RE
985
986.sp
987.ne 2
988.na
989\fBzfs_vdev_async_write_min_active\fR (int)
990.ad
991.RS 12n
992Minimum asynchronous write I/Os active to each device.
993See the section "ZFS I/O SCHEDULER".
994.sp
995Default value: \fB1\fR.
996.RE
997
998.sp
999.ne 2
1000.na
1001\fBzfs_vdev_max_active\fR (int)
1002.ad
1003.RS 12n
1004The maximum number of I/Os active to each device. Ideally, this will be >=
1005the sum of each queue's max_active. It must be at least the sum of each
1006queue's min_active. See the section "ZFS I/O SCHEDULER".
1007.sp
1008Default value: \fB1,000\fR.
1009.RE
1010
1011.sp
1012.ne 2
1013.na
1014\fBzfs_vdev_scrub_max_active\fR (int)
1015.ad
1016.RS 12n
83426735 1017Maximum scrub I/Os active to each device.
e8b96c60
MA
1018See the section "ZFS I/O SCHEDULER".
1019.sp
1020Default value: \fB2\fR.
1021.RE
1022
1023.sp
1024.ne 2
1025.na
1026\fBzfs_vdev_scrub_min_active\fR (int)
1027.ad
1028.RS 12n
1029Minimum scrub I/Os active to each device.
1030See the section "ZFS I/O SCHEDULER".
1031.sp
1032Default value: \fB1\fR.
1033.RE
1034
1035.sp
1036.ne 2
1037.na
1038\fBzfs_vdev_sync_read_max_active\fR (int)
1039.ad
1040.RS 12n
83426735 1041Maximum synchronous read I/Os active to each device.
e8b96c60
MA
1042See the section "ZFS I/O SCHEDULER".
1043.sp
1044Default value: \fB10\fR.
1045.RE
1046
1047.sp
1048.ne 2
1049.na
1050\fBzfs_vdev_sync_read_min_active\fR (int)
1051.ad
1052.RS 12n
1053Minimum synchronous read I/Os active to each device.
1054See the section "ZFS I/O SCHEDULER".
1055.sp
1056Default value: \fB10\fR.
1057.RE
1058
1059.sp
1060.ne 2
1061.na
1062\fBzfs_vdev_sync_write_max_active\fR (int)
1063.ad
1064.RS 12n
83426735 1065Maximum synchronous write I/Os active to each device.
e8b96c60
MA
1066See the section "ZFS I/O SCHEDULER".
1067.sp
1068Default value: \fB10\fR.
1069.RE
1070
1071.sp
1072.ne 2
1073.na
1074\fBzfs_vdev_sync_write_min_active\fR (int)
1075.ad
1076.RS 12n
1077Minimum synchronous write I/Os active to each device.
1078See the section "ZFS I/O SCHEDULER".
1079.sp
1080Default value: \fB10\fR.
1081.RE
1082
29714574
TF
1083.sp
1084.ne 2
1085.na
1086\fBzfs_disable_dup_eviction\fR (int)
1087.ad
1088.RS 12n
1089Disable duplicate buffer eviction
1090.sp
1091Use \fB1\fR for yes and \fB0\fR for no (default).
1092.RE
1093
1094.sp
1095.ne 2
1096.na
1097\fBzfs_expire_snapshot\fR (int)
1098.ad
1099.RS 12n
1100Seconds to expire .zfs/snapshot
1101.sp
1102Default value: \fB300\fR.
1103.RE
1104
0500e835
BB
1105.sp
1106.ne 2
1107.na
1108\fBzfs_admin_snapshot\fR (int)
1109.ad
1110.RS 12n
1111Allow the creation, removal, or renaming of entries in the .zfs/snapshot
1112directory to cause the creation, destruction, or renaming of snapshots.
1113When enabled this functionality works both locally and over NFS exports
1114which have the 'no_root_squash' option set. This functionality is disabled
1115by default.
1116.sp
1117Use \fB1\fR for yes and \fB0\fR for no (default).
1118.RE
1119
29714574
TF
1120.sp
1121.ne 2
1122.na
1123\fBzfs_flags\fR (int)
1124.ad
1125.RS 12n
33b6dbbc
NB
1126Set additional debugging flags. The following flags may be bitwise-or'd
1127together.
1128.sp
1129.TS
1130box;
1131rB lB
1132lB lB
1133r l.
1134Value Symbolic Name
1135 Description
1136_
11371 ZFS_DEBUG_DPRINTF
1138 Enable dprintf entries in the debug log.
1139_
11402 ZFS_DEBUG_DBUF_VERIFY *
1141 Enable extra dbuf verifications.
1142_
11434 ZFS_DEBUG_DNODE_VERIFY *
1144 Enable extra dnode verifications.
1145_
11468 ZFS_DEBUG_SNAPNAMES
1147 Enable snapshot name verification.
1148_
114916 ZFS_DEBUG_MODIFY
1150 Check for illegally modified ARC buffers.
1151_
115232 ZFS_DEBUG_SPA
1153 Enable spa_dbgmsg entries in the debug log.
1154_
115564 ZFS_DEBUG_ZIO_FREE
1156 Enable verification of block frees.
1157_
1158128 ZFS_DEBUG_HISTOGRAM_VERIFY
1159 Enable extra spacemap histogram verifications.
1160.TE
1161.sp
1162* Requires debug build.
29714574 1163.sp
33b6dbbc 1164Default value: \fB0\fR.
29714574
TF
1165.RE
1166
fbeddd60
MA
1167.sp
1168.ne 2
1169.na
1170\fBzfs_free_leak_on_eio\fR (int)
1171.ad
1172.RS 12n
1173If destroy encounters an EIO while reading metadata (e.g. indirect
1174blocks), space referenced by the missing metadata can not be freed.
1175Normally this causes the background destroy to become "stalled", as
1176it is unable to make forward progress. While in this stalled state,
1177all remaining space to free from the error-encountering filesystem is
1178"temporarily leaked". Set this flag to cause it to ignore the EIO,
1179permanently leak the space from indirect blocks that can not be read,
1180and continue to free everything else that it can.
1181
1182The default, "stalling" behavior is useful if the storage partially
1183fails (i.e. some but not all i/os fail), and then later recovers. In
1184this case, we will be able to continue pool operations while it is
1185partially failed, and when it recovers, we can continue to free the
1186space, with no leaks. However, note that this case is actually
1187fairly rare.
1188
1189Typically pools either (a) fail completely (but perhaps temporarily,
1190e.g. a top-level vdev going offline), or (b) have localized,
1191permanent errors (e.g. disk returns the wrong data due to bit flip or
1192firmware bug). In case (a), this setting does not matter because the
1193pool will be suspended and the sync thread will not be able to make
1194forward progress regardless. In case (b), because the error is
1195permanent, the best we can do is leak the minimum amount of space,
1196which is what setting this flag will do. Therefore, it is reasonable
1197for this flag to normally be set, but we chose the more conservative
1198approach of not setting it, so that there is no possibility of
1199leaking space in the "partial temporary" failure case.
1200.sp
1201Default value: \fB0\fR.
1202.RE
1203
29714574
TF
1204.sp
1205.ne 2
1206.na
1207\fBzfs_free_min_time_ms\fR (int)
1208.ad
1209.RS 12n
83426735
D
1210During a \fRzfs destroy\fB operation using \fRfeature@async_destroy\fB a minimum
1211of this much time will be spent working on freeing blocks per txg.
29714574
TF
1212.sp
1213Default value: \fB1,000\fR.
1214.RE
1215
1216.sp
1217.ne 2
1218.na
1219\fBzfs_immediate_write_sz\fR (long)
1220.ad
1221.RS 12n
83426735
D
1222Largest data block to write to zil. Larger blocks will be treated as if the
1223dataset being written to had the property setting \fRlogbias=throughput\fB.
29714574
TF
1224.sp
1225Default value: \fB32,768\fR.
1226.RE
1227
f1512ee6
MA
1228.sp
1229.ne 2
1230.na
1231\fBzfs_max_recordsize\fR (int)
1232.ad
1233.RS 12n
1234We currently support block sizes from 512 bytes to 16MB. The benefits of
1235larger blocks, and thus larger IO, need to be weighed against the cost of
1236COWing a giant block to modify one byte. Additionally, very large blocks
1237can have an impact on i/o latency, and also potentially on the memory
1238allocator. Therefore, we do not allow the recordsize to be set larger than
1239zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1240this tunable, and pools with larger blocks can always be imported and used,
1241regardless of this setting.
1242.sp
1243Default value: \fB1,048,576\fR.
1244.RE
1245
29714574
TF
1246.sp
1247.ne 2
1248.na
1249\fBzfs_mdcomp_disable\fR (int)
1250.ad
1251.RS 12n
1252Disable meta data compression
1253.sp
1254Use \fB1\fR for yes and \fB0\fR for no (default).
1255.RE
1256
f3a7f661
GW
1257.sp
1258.ne 2
1259.na
1260\fBzfs_metaslab_fragmentation_threshold\fR (int)
1261.ad
1262.RS 12n
1263Allow metaslabs to keep their active state as long as their fragmentation
1264percentage is less than or equal to this value. An active metaslab that
1265exceeds this threshold will no longer keep its active status allowing
1266better metaslabs to be selected.
1267.sp
1268Default value: \fB70\fR.
1269.RE
1270
1271.sp
1272.ne 2
1273.na
1274\fBzfs_mg_fragmentation_threshold\fR (int)
1275.ad
1276.RS 12n
1277Metaslab groups are considered eligible for allocations if their
83426735 1278fragmentation metric (measured as a percentage) is less than or equal to
f3a7f661
GW
1279this value. If a metaslab group exceeds this threshold then it will be
1280skipped unless all metaslab groups within the metaslab class have also
1281crossed this threshold.
1282.sp
1283Default value: \fB85\fR.
1284.RE
1285
f4a4046b
TC
1286.sp
1287.ne 2
1288.na
1289\fBzfs_mg_noalloc_threshold\fR (int)
1290.ad
1291.RS 12n
1292Defines a threshold at which metaslab groups should be eligible for
1293allocations. The value is expressed as a percentage of free space
1294beyond which a metaslab group is always eligible for allocations.
1295If a metaslab group's free space is less than or equal to the
6b4e21c6 1296threshold, the allocator will avoid allocating to that group
f4a4046b
TC
1297unless all groups in the pool have reached the threshold. Once all
1298groups have reached the threshold, all groups are allowed to accept
1299allocations. The default value of 0 disables the feature and causes
1300all metaslab groups to be eligible for allocations.
1301
1302This parameter allows to deal with pools having heavily imbalanced
1303vdevs such as would be the case when a new vdev has been added.
1304Setting the threshold to a non-zero percentage will stop allocations
1305from being made to vdevs that aren't filled to the specified percentage
1306and allow lesser filled vdevs to acquire more allocations than they
1307otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1308.sp
1309Default value: \fB0\fR.
1310.RE
1311
29714574
TF
1312.sp
1313.ne 2
1314.na
1315\fBzfs_no_scrub_io\fR (int)
1316.ad
1317.RS 12n
83426735
D
1318Set for no scrub I/O. This results in scrubs not actually scrubbing data and
1319simply doing a metadata crawl of the pool instead.
29714574
TF
1320.sp
1321Use \fB1\fR for yes and \fB0\fR for no (default).
1322.RE
1323
1324.sp
1325.ne 2
1326.na
1327\fBzfs_no_scrub_prefetch\fR (int)
1328.ad
1329.RS 12n
83426735 1330Set to disable block prefetching for scrubs.
29714574
TF
1331.sp
1332Use \fB1\fR for yes and \fB0\fR for no (default).
1333.RE
1334
29714574
TF
1335.sp
1336.ne 2
1337.na
1338\fBzfs_nocacheflush\fR (int)
1339.ad
1340.RS 12n
83426735
D
1341Disable cache flush operations on disks when writing. Beware, this may cause
1342corruption if disks re-order writes.
29714574
TF
1343.sp
1344Use \fB1\fR for yes and \fB0\fR for no (default).
1345.RE
1346
1347.sp
1348.ne 2
1349.na
1350\fBzfs_nopwrite_enabled\fR (int)
1351.ad
1352.RS 12n
1353Enable NOP writes
1354.sp
1355Use \fB1\fR for yes (default) and \fB0\fR to disable.
1356.RE
1357
1358.sp
1359.ne 2
1360.na
b738bc5a 1361\fBzfs_pd_bytes_max\fR (int)
29714574
TF
1362.ad
1363.RS 12n
83426735
D
1364The number of bytes which should be prefetched during a pool traversal
1365(eg: \fRzfs send\fB or other data crawling operations)
29714574 1366.sp
74aa2ba2 1367Default value: \fB52,428,800\fR.
29714574
TF
1368.RE
1369
1370.sp
1371.ne 2
1372.na
1373\fBzfs_prefetch_disable\fR (int)
1374.ad
1375.RS 12n
7f60329a
MA
1376This tunable disables predictive prefetch. Note that it leaves "prescient"
1377prefetch (e.g. prefetch for zfs send) intact. Unlike predictive prefetch,
1378prescient prefetch never issues i/os that end up not being needed, so it
1379can't hurt performance.
29714574
TF
1380.sp
1381Use \fB1\fR for yes and \fB0\fR for no (default).
1382.RE
1383
1384.sp
1385.ne 2
1386.na
1387\fBzfs_read_chunk_size\fR (long)
1388.ad
1389.RS 12n
1390Bytes to read per chunk
1391.sp
1392Default value: \fB1,048,576\fR.
1393.RE
1394
1395.sp
1396.ne 2
1397.na
1398\fBzfs_read_history\fR (int)
1399.ad
1400.RS 12n
83426735
D
1401Historic statistics for the last N reads will be available in
1402\fR/proc/spl/kstat/zfs/POOLNAME/reads\fB
29714574 1403.sp
83426735 1404Default value: \fB0\fR (no data is kept).
29714574
TF
1405.RE
1406
1407.sp
1408.ne 2
1409.na
1410\fBzfs_read_history_hits\fR (int)
1411.ad
1412.RS 12n
1413Include cache hits in read history
1414.sp
1415Use \fB1\fR for yes and \fB0\fR for no (default).
1416.RE
1417
1418.sp
1419.ne 2
1420.na
1421\fBzfs_recover\fR (int)
1422.ad
1423.RS 12n
1424Set to attempt to recover from fatal errors. This should only be used as a
1425last resort, as it typically results in leaked space, or worse.
1426.sp
1427Use \fB1\fR for yes and \fB0\fR for no (default).
1428.RE
1429
1430.sp
1431.ne 2
1432.na
1433\fBzfs_resilver_delay\fR (int)
1434.ad
1435.RS 12n
27b293be
TC
1436Number of ticks to delay prior to issuing a resilver I/O operation when
1437a non-resilver or non-scrub I/O operation has occurred within the past
1438\fBzfs_scan_idle\fR ticks.
29714574
TF
1439.sp
1440Default value: \fB2\fR.
1441.RE
1442
1443.sp
1444.ne 2
1445.na
1446\fBzfs_resilver_min_time_ms\fR (int)
1447.ad
1448.RS 12n
83426735
D
1449Resilvers are processed by the sync thread. While resilvering it will spend
1450at least this much time working on a resilver between txg flushes.
29714574
TF
1451.sp
1452Default value: \fB3,000\fR.
1453.RE
1454
1455.sp
1456.ne 2
1457.na
1458\fBzfs_scan_idle\fR (int)
1459.ad
1460.RS 12n
27b293be
TC
1461Idle window in clock ticks. During a scrub or a resilver, if
1462a non-scrub or non-resilver I/O operation has occurred during this
1463window, the next scrub or resilver operation is delayed by, respectively
1464\fBzfs_scrub_delay\fR or \fBzfs_resilver_delay\fR ticks.
29714574
TF
1465.sp
1466Default value: \fB50\fR.
1467.RE
1468
1469.sp
1470.ne 2
1471.na
1472\fBzfs_scan_min_time_ms\fR (int)
1473.ad
1474.RS 12n
83426735
D
1475Scrubs are processed by the sync thread. While scrubbing it will spend
1476at least this much time working on a scrub between txg flushes.
29714574
TF
1477.sp
1478Default value: \fB1,000\fR.
1479.RE
1480
1481.sp
1482.ne 2
1483.na
1484\fBzfs_scrub_delay\fR (int)
1485.ad
1486.RS 12n
27b293be
TC
1487Number of ticks to delay prior to issuing a scrub I/O operation when
1488a non-scrub or non-resilver I/O operation has occurred within the past
1489\fBzfs_scan_idle\fR ticks.
29714574
TF
1490.sp
1491Default value: \fB4\fR.
1492.RE
1493
fd8febbd
TF
1494.sp
1495.ne 2
1496.na
1497\fBzfs_send_corrupt_data\fR (int)
1498.ad
1499.RS 12n
83426735 1500Allow sending of corrupt data (ignore read/checksum errors when sending data)
fd8febbd
TF
1501.sp
1502Use \fB1\fR for yes and \fB0\fR for no (default).
1503.RE
1504
29714574
TF
1505.sp
1506.ne 2
1507.na
1508\fBzfs_sync_pass_deferred_free\fR (int)
1509.ad
1510.RS 12n
83426735 1511Flushing of data to disk is done in passes. Defer frees starting in this pass
29714574
TF
1512.sp
1513Default value: \fB2\fR.
1514.RE
1515
1516.sp
1517.ne 2
1518.na
1519\fBzfs_sync_pass_dont_compress\fR (int)
1520.ad
1521.RS 12n
1522Don't compress starting in this pass
1523.sp
1524Default value: \fB5\fR.
1525.RE
1526
1527.sp
1528.ne 2
1529.na
1530\fBzfs_sync_pass_rewrite\fR (int)
1531.ad
1532.RS 12n
83426735 1533Rewrite new block pointers starting in this pass
29714574
TF
1534.sp
1535Default value: \fB2\fR.
1536.RE
1537
1538.sp
1539.ne 2
1540.na
1541\fBzfs_top_maxinflight\fR (int)
1542.ad
1543.RS 12n
83426735
D
1544Max concurrent I/Os per top-level vdev (mirrors or raidz arrays) allowed during
1545scrub or resilver operations.
29714574
TF
1546.sp
1547Default value: \fB32\fR.
1548.RE
1549
1550.sp
1551.ne 2
1552.na
1553\fBzfs_txg_history\fR (int)
1554.ad
1555.RS 12n
83426735
D
1556Historic statistics for the last N txgs will be available in
1557\fR/proc/spl/kstat/zfs/POOLNAME/txgs\fB
29714574
TF
1558.sp
1559Default value: \fB0\fR.
1560.RE
1561
29714574
TF
1562.sp
1563.ne 2
1564.na
1565\fBzfs_txg_timeout\fR (int)
1566.ad
1567.RS 12n
83426735 1568Flush dirty data to disk at least every N seconds (maximum txg duration)
29714574
TF
1569.sp
1570Default value: \fB5\fR.
1571.RE
1572
1573.sp
1574.ne 2
1575.na
1576\fBzfs_vdev_aggregation_limit\fR (int)
1577.ad
1578.RS 12n
1579Max vdev I/O aggregation size
1580.sp
1581Default value: \fB131,072\fR.
1582.RE
1583
1584.sp
1585.ne 2
1586.na
1587\fBzfs_vdev_cache_bshift\fR (int)
1588.ad
1589.RS 12n
1590Shift size to inflate reads too
1591.sp
83426735 1592Default value: \fB16\fR (effectively 65536).
29714574
TF
1593.RE
1594
1595.sp
1596.ne 2
1597.na
1598\fBzfs_vdev_cache_max\fR (int)
1599.ad
1600.RS 12n
83426735
D
1601Inflate reads small than this value to meet the \fBzfs_vdev_cache_bshift\fR
1602size.
1603.sp
1604Default value: \fB16384\fR.
29714574
TF
1605.RE
1606
1607.sp
1608.ne 2
1609.na
1610\fBzfs_vdev_cache_size\fR (int)
1611.ad
1612.RS 12n
83426735
D
1613Total size of the per-disk cache in bytes.
1614.sp
1615Currently this feature is disabled as it has been found to not be helpful
1616for performance and in some cases harmful.
29714574
TF
1617.sp
1618Default value: \fB0\fR.
1619.RE
1620
29714574
TF
1621.sp
1622.ne 2
1623.na
9f500936 1624\fBzfs_vdev_mirror_rotating_inc\fR (int)
29714574
TF
1625.ad
1626.RS 12n
9f500936 1627A number by which the balancing algorithm increments the load calculation for
1628the purpose of selecting the least busy mirror member when an I/O immediately
1629follows its predecessor on rotational vdevs for the purpose of making decisions
1630based on load.
29714574 1631.sp
9f500936 1632Default value: \fB0\fR.
1633.RE
1634
1635.sp
1636.ne 2
1637.na
1638\fBzfs_vdev_mirror_rotating_seek_inc\fR (int)
1639.ad
1640.RS 12n
1641A number by which the balancing algorithm increments the load calculation for
1642the purpose of selecting the least busy mirror member when an I/O lacks
1643locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1644this that are not immediately following the previous I/O are incremented by
1645half.
1646.sp
1647Default value: \fB5\fR.
1648.RE
1649
1650.sp
1651.ne 2
1652.na
1653\fBzfs_vdev_mirror_rotating_seek_offset\fR (int)
1654.ad
1655.RS 12n
1656The maximum distance for the last queued I/O in which the balancing algorithm
1657considers an I/O to have locality.
1658See the section "ZFS I/O SCHEDULER".
1659.sp
1660Default value: \fB1048576\fR.
1661.RE
1662
1663.sp
1664.ne 2
1665.na
1666\fBzfs_vdev_mirror_non_rotating_inc\fR (int)
1667.ad
1668.RS 12n
1669A number by which the balancing algorithm increments the load calculation for
1670the purpose of selecting the least busy mirror member on non-rotational vdevs
1671when I/Os do not immediately follow one another.
1672.sp
1673Default value: \fB0\fR.
1674.RE
1675
1676.sp
1677.ne 2
1678.na
1679\fBzfs_vdev_mirror_non_rotating_seek_inc\fR (int)
1680.ad
1681.RS 12n
1682A number by which the balancing algorithm increments the load calculation for
1683the purpose of selecting the least busy mirror member when an I/O lacks
1684locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1685this that are not immediately following the previous I/O are incremented by
1686half.
1687.sp
1688Default value: \fB1\fR.
29714574
TF
1689.RE
1690
29714574
TF
1691.sp
1692.ne 2
1693.na
1694\fBzfs_vdev_read_gap_limit\fR (int)
1695.ad
1696.RS 12n
83426735
D
1697Aggregate read I/O operations if the gap on-disk between them is within this
1698threshold.
29714574
TF
1699.sp
1700Default value: \fB32,768\fR.
1701.RE
1702
1703.sp
1704.ne 2
1705.na
1706\fBzfs_vdev_scheduler\fR (charp)
1707.ad
1708.RS 12n
83426735 1709Set the Linux I/O scheduler on whole disk vdevs to this scheduler
29714574
TF
1710.sp
1711Default value: \fBnoop\fR.
1712.RE
1713
29714574
TF
1714.sp
1715.ne 2
1716.na
1717\fBzfs_vdev_write_gap_limit\fR (int)
1718.ad
1719.RS 12n
1720Aggregate write I/O over gap
1721.sp
1722Default value: \fB4,096\fR.
1723.RE
1724
ab9f4b0b
GN
1725.sp
1726.ne 2
1727.na
1728\fBzfs_vdev_raidz_impl\fR (string)
1729.ad
1730.RS 12n
c9187d86 1731Parameter for selecting raidz parity implementation to use.
ab9f4b0b
GN
1732
1733Options marked (always) below may be selected on module load as they are
1734supported on all systems.
1735The remaining options may only be set after the module is loaded, as they
1736are available only if the implementations are compiled in and supported
1737on the running system.
1738
1739Once the module is loaded, the content of
1740/sys/module/zfs/parameters/zfs_vdev_raidz_impl will show available options
1741with the currently selected one enclosed in [].
1742Possible options are:
1743 fastest - (always) implementation selected using built-in benchmark
1744 original - (always) original raidz implementation
1745 scalar - (always) scalar raidz implementation
ae25d222
GN
1746 sse2 - implementation using SSE2 instruction set (64bit x86 only)
1747 ssse3 - implementation using SSSE3 instruction set (64bit x86 only)
ab9f4b0b
GN
1748 avx2 - implementation using AVX2 instruction set (64bit x86 only)
1749.sp
1750Default value: \fBfastest\fR.
1751.RE
1752
29714574
TF
1753.sp
1754.ne 2
1755.na
1756\fBzfs_zevent_cols\fR (int)
1757.ad
1758.RS 12n
83426735 1759When zevents are logged to the console use this as the word wrap width.
29714574
TF
1760.sp
1761Default value: \fB80\fR.
1762.RE
1763
1764.sp
1765.ne 2
1766.na
1767\fBzfs_zevent_console\fR (int)
1768.ad
1769.RS 12n
1770Log events to the console
1771.sp
1772Use \fB1\fR for yes and \fB0\fR for no (default).
1773.RE
1774
1775.sp
1776.ne 2
1777.na
1778\fBzfs_zevent_len_max\fR (int)
1779.ad
1780.RS 12n
83426735
D
1781Max event queue length. A value of 0 will result in a calculated value which
1782increases with the number of CPUs in the system (minimum 64 events). Events
1783in the queue can be viewed with the \fBzpool events\fR command.
29714574
TF
1784.sp
1785Default value: \fB0\fR.
1786.RE
1787
1788.sp
1789.ne 2
1790.na
1791\fBzil_replay_disable\fR (int)
1792.ad
1793.RS 12n
83426735
D
1794Disable intent logging replay. Can be disabled for recovery from corrupted
1795ZIL
29714574
TF
1796.sp
1797Use \fB1\fR for yes and \fB0\fR for no (default).
1798.RE
1799
1800.sp
1801.ne 2
1802.na
1803\fBzil_slog_limit\fR (ulong)
1804.ad
1805.RS 12n
1806Max commit bytes to separate log device
1807.sp
1808Default value: \fB1,048,576\fR.
1809.RE
1810
29714574
TF
1811.sp
1812.ne 2
1813.na
1814\fBzio_delay_max\fR (int)
1815.ad
1816.RS 12n
83426735 1817A zevent will be logged if a ZIO operation takes more than N milliseconds to
ab9f4b0b 1818complete. Note that this is only a logging facility, not a timeout on
83426735 1819operations.
29714574
TF
1820.sp
1821Default value: \fB30,000\fR.
1822.RE
1823
29714574
TF
1824.sp
1825.ne 2
1826.na
1827\fBzio_requeue_io_start_cut_in_line\fR (int)
1828.ad
1829.RS 12n
1830Prioritize requeued I/O
1831.sp
1832Default value: \fB0\fR.
1833.RE
1834
dcb6bed1
D
1835.sp
1836.ne 2
1837.na
1838\fBzio_taskq_batch_pct\fR (uint)
1839.ad
1840.RS 12n
1841Percentage of online CPUs (or CPU cores, etc) which will run a worker thread
1842for IO. These workers are responsible for IO work such as compression and
1843checksum calculations. Fractional number of CPUs will be rounded down.
1844.sp
1845The default value of 75 was chosen to avoid using all CPUs which can result in
1846latency issues and inconsistent application performance, especially when high
1847compression is enabled.
1848.sp
1849Default value: \fB75\fR.
1850.RE
1851
29714574
TF
1852.sp
1853.ne 2
1854.na
1855\fBzvol_inhibit_dev\fR (uint)
1856.ad
1857.RS 12n
83426735
D
1858Do not create zvol device nodes. This may slightly improve startup time on
1859systems with a very large number of zvols.
29714574
TF
1860.sp
1861Use \fB1\fR for yes and \fB0\fR for no (default).
1862.RE
1863
1864.sp
1865.ne 2
1866.na
1867\fBzvol_major\fR (uint)
1868.ad
1869.RS 12n
83426735 1870Major number for zvol block devices
29714574
TF
1871.sp
1872Default value: \fB230\fR.
1873.RE
1874
1875.sp
1876.ne 2
1877.na
1878\fBzvol_max_discard_blocks\fR (ulong)
1879.ad
1880.RS 12n
83426735
D
1881Discard (aka TRIM) operations done on zvols will be done in batches of this
1882many blocks, where block size is determined by the \fBvolblocksize\fR property
1883of a zvol.
29714574
TF
1884.sp
1885Default value: \fB16,384\fR.
1886.RE
1887
9965059a
BB
1888.sp
1889.ne 2
1890.na
1891\fBzvol_prefetch_bytes\fR (uint)
1892.ad
1893.RS 12n
1894When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
1895from the start and end of the volume. Prefetching these regions
1896of the volume is desirable because they are likely to be accessed
1897immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
1898table.
1899.sp
1900Default value: \fB131,072\fR.
1901.RE
1902
e8b96c60
MA
1903.SH ZFS I/O SCHEDULER
1904ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
1905The I/O scheduler determines when and in what order those operations are
1906issued. The I/O scheduler divides operations into five I/O classes
1907prioritized in the following order: sync read, sync write, async read,
1908async write, and scrub/resilver. Each queue defines the minimum and
1909maximum number of concurrent operations that may be issued to the
1910device. In addition, the device has an aggregate maximum,
1911\fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
1912must not exceed the aggregate maximum. If the sum of the per-queue
1913maximums exceeds the aggregate maximum, then the number of active I/Os
1914may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
1915be issued regardless of whether all per-queue minimums have been met.
1916.sp
1917For many physical devices, throughput increases with the number of
1918concurrent operations, but latency typically suffers. Further, physical
1919devices typically have a limit at which more concurrent operations have no
1920effect on throughput or can actually cause it to decrease.
1921.sp
1922The scheduler selects the next operation to issue by first looking for an
1923I/O class whose minimum has not been satisfied. Once all are satisfied and
1924the aggregate maximum has not been hit, the scheduler looks for classes
1925whose maximum has not been satisfied. Iteration through the I/O classes is
1926done in the order specified above. No further operations are issued if the
1927aggregate maximum number of concurrent operations has been hit or if there
1928are no operations queued for an I/O class that has not hit its maximum.
1929Every time an I/O is queued or an operation completes, the I/O scheduler
1930looks for new operations to issue.
1931.sp
1932In general, smaller max_active's will lead to lower latency of synchronous
1933operations. Larger max_active's may lead to higher overall throughput,
1934depending on underlying storage.
1935.sp
1936The ratio of the queues' max_actives determines the balance of performance
1937between reads, writes, and scrubs. E.g., increasing
1938\fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
1939more quickly, but reads and writes to have higher latency and lower throughput.
1940.sp
1941All I/O classes have a fixed maximum number of outstanding operations
1942except for the async write class. Asynchronous writes represent the data
1943that is committed to stable storage during the syncing stage for
1944transaction groups. Transaction groups enter the syncing state
1945periodically so the number of queued async writes will quickly burst up
1946and then bleed down to zero. Rather than servicing them as quickly as
1947possible, the I/O scheduler changes the maximum number of active async
1948write I/Os according to the amount of dirty data in the pool. Since
1949both throughput and latency typically increase with the number of
1950concurrent operations issued to physical devices, reducing the
1951burstiness in the number of concurrent operations also stabilizes the
1952response time of operations from other -- and in particular synchronous
1953-- queues. In broad strokes, the I/O scheduler will issue more
1954concurrent operations from the async write queue as there's more dirty
1955data in the pool.
1956.sp
1957Async Writes
1958.sp
1959The number of concurrent operations issued for the async write I/O class
1960follows a piece-wise linear function defined by a few adjustable points.
1961.nf
1962
1963 | o---------| <-- zfs_vdev_async_write_max_active
1964 ^ | /^ |
1965 | | / | |
1966active | / | |
1967 I/O | / | |
1968count | / | |
1969 | / | |
1970 |-------o | | <-- zfs_vdev_async_write_min_active
1971 0|_______^______|_________|
1972 0% | | 100% of zfs_dirty_data_max
1973 | |
1974 | `-- zfs_vdev_async_write_active_max_dirty_percent
1975 `--------- zfs_vdev_async_write_active_min_dirty_percent
1976
1977.fi
1978Until the amount of dirty data exceeds a minimum percentage of the dirty
1979data allowed in the pool, the I/O scheduler will limit the number of
1980concurrent operations to the minimum. As that threshold is crossed, the
1981number of concurrent operations issued increases linearly to the maximum at
1982the specified maximum percentage of the dirty data allowed in the pool.
1983.sp
1984Ideally, the amount of dirty data on a busy pool will stay in the sloped
1985part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
1986and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
1987maximum percentage, this indicates that the rate of incoming data is
1988greater than the rate that the backend storage can handle. In this case, we
1989must further throttle incoming writes, as described in the next section.
1990
1991.SH ZFS TRANSACTION DELAY
1992We delay transactions when we've determined that the backend storage
1993isn't able to accommodate the rate of incoming writes.
1994.sp
1995If there is already a transaction waiting, we delay relative to when
1996that transaction will finish waiting. This way the calculated delay time
1997is independent of the number of threads concurrently executing
1998transactions.
1999.sp
2000If we are the only waiter, wait relative to when the transaction
2001started, rather than the current time. This credits the transaction for
2002"time already served", e.g. reading indirect blocks.
2003.sp
2004The minimum time for a transaction to take is calculated as:
2005.nf
2006 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
2007 min_time is then capped at 100 milliseconds.
2008.fi
2009.sp
2010The delay has two degrees of freedom that can be adjusted via tunables. The
2011percentage of dirty data at which we start to delay is defined by
2012\fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
2013\fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
2014delay after writing at full speed has failed to keep up with the incoming write
2015rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
2016this variable determines the amount of delay at the midpoint of the curve.
2017.sp
2018.nf
2019delay
2020 10ms +-------------------------------------------------------------*+
2021 | *|
2022 9ms + *+
2023 | *|
2024 8ms + *+
2025 | * |
2026 7ms + * +
2027 | * |
2028 6ms + * +
2029 | * |
2030 5ms + * +
2031 | * |
2032 4ms + * +
2033 | * |
2034 3ms + * +
2035 | * |
2036 2ms + (midpoint) * +
2037 | | ** |
2038 1ms + v *** +
2039 | zfs_delay_scale ----------> ******** |
2040 0 +-------------------------------------*********----------------+
2041 0% <- zfs_dirty_data_max -> 100%
2042.fi
2043.sp
2044Note that since the delay is added to the outstanding time remaining on the
2045most recent transaction, the delay is effectively the inverse of IOPS.
2046Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
2047was chosen such that small changes in the amount of accumulated dirty data
2048in the first 3/4 of the curve yield relatively small differences in the
2049amount of delay.
2050.sp
2051The effects can be easier to understand when the amount of delay is
2052represented on a log scale:
2053.sp
2054.nf
2055delay
2056100ms +-------------------------------------------------------------++
2057 + +
2058 | |
2059 + *+
2060 10ms + *+
2061 + ** +
2062 | (midpoint) ** |
2063 + | ** +
2064 1ms + v **** +
2065 + zfs_delay_scale ----------> ***** +
2066 | **** |
2067 + **** +
2068100us + ** +
2069 + * +
2070 | * |
2071 + * +
2072 10us + * +
2073 + +
2074 | |
2075 + +
2076 +--------------------------------------------------------------+
2077 0% <- zfs_dirty_data_max -> 100%
2078.fi
2079.sp
2080Note here that only as the amount of dirty data approaches its limit does
2081the delay start to increase rapidly. The goal of a properly tuned system
2082should be to keep the amount of dirty data out of that range by first
2083ensuring that the appropriate limits are set for the I/O scheduler to reach
2084optimal throughput on the backend storage, and then by changing the value
2085of \fBzfs_delay_scale\fR to increase the steepness of the curve.