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