]> git.proxmox.com Git - mirror_zfs.git/blame - man/man5/zfs-module-parameters.5
Implementation of SSE optimized Fletcher-4
[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
35a76a03
TS
841Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
842and \fBavx2\fR. All of the selectors except \fBfastest\fR and \fBscalar\fR
843require instruction set extensions to be available and will only appear if ZFS
844detects that they are present at runtime. If multiple implementations of
845fletcher 4 are available, the \fBfastest\fR will be chosen using a micro
846benchmark. Selecting \fBscalar\fR results in the original CPU based calculation
847being used. Selecting any option other than \fBfastest\fR and \fBscalar\fR
848results in vector instructions from the respective CPU instruction set being
849used.
1eeb4562
JX
850.sp
851Default value: \fBfastest\fR.
852.RE
853
ba5ad9a4
GW
854.sp
855.ne 2
856.na
857\fBzfs_free_bpobj_enabled\fR (int)
858.ad
859.RS 12n
860Enable/disable the processing of the free_bpobj object.
861.sp
862Default value: \fB1\fR.
863.RE
864
36283ca2
MG
865.sp
866.ne 2
867.na
868\fBzfs_free_max_blocks\fR (ulong)
869.ad
870.RS 12n
871Maximum number of blocks freed in a single txg.
872.sp
873Default value: \fB100,000\fR.
874.RE
875
e8b96c60
MA
876.sp
877.ne 2
878.na
879\fBzfs_vdev_async_read_max_active\fR (int)
880.ad
881.RS 12n
83426735 882Maximum asynchronous read I/Os active to each device.
e8b96c60
MA
883See the section "ZFS I/O SCHEDULER".
884.sp
885Default value: \fB3\fR.
886.RE
887
888.sp
889.ne 2
890.na
891\fBzfs_vdev_async_read_min_active\fR (int)
892.ad
893.RS 12n
894Minimum asynchronous read I/Os active to each device.
895See the section "ZFS I/O SCHEDULER".
896.sp
897Default value: \fB1\fR.
898.RE
899
900.sp
901.ne 2
902.na
903\fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
904.ad
905.RS 12n
906When the pool has more than
907\fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
908\fBzfs_vdev_async_write_max_active\fR to limit active async writes. If
909the dirty data is between min and max, the active I/O limit is linearly
910interpolated. See the section "ZFS I/O SCHEDULER".
911.sp
912Default value: \fB60\fR.
913.RE
914
915.sp
916.ne 2
917.na
918\fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
919.ad
920.RS 12n
921When the pool has less than
922\fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
923\fBzfs_vdev_async_write_min_active\fR to limit active async writes. If
924the dirty data is between min and max, the active I/O limit is linearly
925interpolated. See the section "ZFS I/O SCHEDULER".
926.sp
927Default value: \fB30\fR.
928.RE
929
930.sp
931.ne 2
932.na
933\fBzfs_vdev_async_write_max_active\fR (int)
934.ad
935.RS 12n
83426735 936Maximum asynchronous write I/Os active to each device.
e8b96c60
MA
937See the section "ZFS I/O SCHEDULER".
938.sp
939Default value: \fB10\fR.
940.RE
941
942.sp
943.ne 2
944.na
945\fBzfs_vdev_async_write_min_active\fR (int)
946.ad
947.RS 12n
948Minimum asynchronous write I/Os active to each device.
949See the section "ZFS I/O SCHEDULER".
950.sp
951Default value: \fB1\fR.
952.RE
953
954.sp
955.ne 2
956.na
957\fBzfs_vdev_max_active\fR (int)
958.ad
959.RS 12n
960The maximum number of I/Os active to each device. Ideally, this will be >=
961the sum of each queue's max_active. It must be at least the sum of each
962queue's min_active. See the section "ZFS I/O SCHEDULER".
963.sp
964Default value: \fB1,000\fR.
965.RE
966
967.sp
968.ne 2
969.na
970\fBzfs_vdev_scrub_max_active\fR (int)
971.ad
972.RS 12n
83426735 973Maximum scrub I/Os active to each device.
e8b96c60
MA
974See the section "ZFS I/O SCHEDULER".
975.sp
976Default value: \fB2\fR.
977.RE
978
979.sp
980.ne 2
981.na
982\fBzfs_vdev_scrub_min_active\fR (int)
983.ad
984.RS 12n
985Minimum scrub I/Os active to each device.
986See the section "ZFS I/O SCHEDULER".
987.sp
988Default value: \fB1\fR.
989.RE
990
991.sp
992.ne 2
993.na
994\fBzfs_vdev_sync_read_max_active\fR (int)
995.ad
996.RS 12n
83426735 997Maximum synchronous read I/Os active to each device.
e8b96c60
MA
998See the section "ZFS I/O SCHEDULER".
999.sp
1000Default value: \fB10\fR.
1001.RE
1002
1003.sp
1004.ne 2
1005.na
1006\fBzfs_vdev_sync_read_min_active\fR (int)
1007.ad
1008.RS 12n
1009Minimum synchronous read I/Os active to each device.
1010See the section "ZFS I/O SCHEDULER".
1011.sp
1012Default value: \fB10\fR.
1013.RE
1014
1015.sp
1016.ne 2
1017.na
1018\fBzfs_vdev_sync_write_max_active\fR (int)
1019.ad
1020.RS 12n
83426735 1021Maximum synchronous write I/Os active to each device.
e8b96c60
MA
1022See the section "ZFS I/O SCHEDULER".
1023.sp
1024Default value: \fB10\fR.
1025.RE
1026
1027.sp
1028.ne 2
1029.na
1030\fBzfs_vdev_sync_write_min_active\fR (int)
1031.ad
1032.RS 12n
1033Minimum synchronous write I/Os active to each device.
1034See the section "ZFS I/O SCHEDULER".
1035.sp
1036Default value: \fB10\fR.
1037.RE
1038
29714574
TF
1039.sp
1040.ne 2
1041.na
1042\fBzfs_disable_dup_eviction\fR (int)
1043.ad
1044.RS 12n
1045Disable duplicate buffer eviction
1046.sp
1047Use \fB1\fR for yes and \fB0\fR for no (default).
1048.RE
1049
1050.sp
1051.ne 2
1052.na
1053\fBzfs_expire_snapshot\fR (int)
1054.ad
1055.RS 12n
1056Seconds to expire .zfs/snapshot
1057.sp
1058Default value: \fB300\fR.
1059.RE
1060
0500e835
BB
1061.sp
1062.ne 2
1063.na
1064\fBzfs_admin_snapshot\fR (int)
1065.ad
1066.RS 12n
1067Allow the creation, removal, or renaming of entries in the .zfs/snapshot
1068directory to cause the creation, destruction, or renaming of snapshots.
1069When enabled this functionality works both locally and over NFS exports
1070which have the 'no_root_squash' option set. This functionality is disabled
1071by default.
1072.sp
1073Use \fB1\fR for yes and \fB0\fR for no (default).
1074.RE
1075
29714574
TF
1076.sp
1077.ne 2
1078.na
1079\fBzfs_flags\fR (int)
1080.ad
1081.RS 12n
33b6dbbc
NB
1082Set additional debugging flags. The following flags may be bitwise-or'd
1083together.
1084.sp
1085.TS
1086box;
1087rB lB
1088lB lB
1089r l.
1090Value Symbolic Name
1091 Description
1092_
10931 ZFS_DEBUG_DPRINTF
1094 Enable dprintf entries in the debug log.
1095_
10962 ZFS_DEBUG_DBUF_VERIFY *
1097 Enable extra dbuf verifications.
1098_
10994 ZFS_DEBUG_DNODE_VERIFY *
1100 Enable extra dnode verifications.
1101_
11028 ZFS_DEBUG_SNAPNAMES
1103 Enable snapshot name verification.
1104_
110516 ZFS_DEBUG_MODIFY
1106 Check for illegally modified ARC buffers.
1107_
110832 ZFS_DEBUG_SPA
1109 Enable spa_dbgmsg entries in the debug log.
1110_
111164 ZFS_DEBUG_ZIO_FREE
1112 Enable verification of block frees.
1113_
1114128 ZFS_DEBUG_HISTOGRAM_VERIFY
1115 Enable extra spacemap histogram verifications.
1116.TE
1117.sp
1118* Requires debug build.
29714574 1119.sp
33b6dbbc 1120Default value: \fB0\fR.
29714574
TF
1121.RE
1122
fbeddd60
MA
1123.sp
1124.ne 2
1125.na
1126\fBzfs_free_leak_on_eio\fR (int)
1127.ad
1128.RS 12n
1129If destroy encounters an EIO while reading metadata (e.g. indirect
1130blocks), space referenced by the missing metadata can not be freed.
1131Normally this causes the background destroy to become "stalled", as
1132it is unable to make forward progress. While in this stalled state,
1133all remaining space to free from the error-encountering filesystem is
1134"temporarily leaked". Set this flag to cause it to ignore the EIO,
1135permanently leak the space from indirect blocks that can not be read,
1136and continue to free everything else that it can.
1137
1138The default, "stalling" behavior is useful if the storage partially
1139fails (i.e. some but not all i/os fail), and then later recovers. In
1140this case, we will be able to continue pool operations while it is
1141partially failed, and when it recovers, we can continue to free the
1142space, with no leaks. However, note that this case is actually
1143fairly rare.
1144
1145Typically pools either (a) fail completely (but perhaps temporarily,
1146e.g. a top-level vdev going offline), or (b) have localized,
1147permanent errors (e.g. disk returns the wrong data due to bit flip or
1148firmware bug). In case (a), this setting does not matter because the
1149pool will be suspended and the sync thread will not be able to make
1150forward progress regardless. In case (b), because the error is
1151permanent, the best we can do is leak the minimum amount of space,
1152which is what setting this flag will do. Therefore, it is reasonable
1153for this flag to normally be set, but we chose the more conservative
1154approach of not setting it, so that there is no possibility of
1155leaking space in the "partial temporary" failure case.
1156.sp
1157Default value: \fB0\fR.
1158.RE
1159
29714574
TF
1160.sp
1161.ne 2
1162.na
1163\fBzfs_free_min_time_ms\fR (int)
1164.ad
1165.RS 12n
83426735
D
1166During a \fRzfs destroy\fB operation using \fRfeature@async_destroy\fB a minimum
1167of this much time will be spent working on freeing blocks per txg.
29714574
TF
1168.sp
1169Default value: \fB1,000\fR.
1170.RE
1171
1172.sp
1173.ne 2
1174.na
1175\fBzfs_immediate_write_sz\fR (long)
1176.ad
1177.RS 12n
83426735
D
1178Largest data block to write to zil. Larger blocks will be treated as if the
1179dataset being written to had the property setting \fRlogbias=throughput\fB.
29714574
TF
1180.sp
1181Default value: \fB32,768\fR.
1182.RE
1183
f1512ee6
MA
1184.sp
1185.ne 2
1186.na
1187\fBzfs_max_recordsize\fR (int)
1188.ad
1189.RS 12n
1190We currently support block sizes from 512 bytes to 16MB. The benefits of
1191larger blocks, and thus larger IO, need to be weighed against the cost of
1192COWing a giant block to modify one byte. Additionally, very large blocks
1193can have an impact on i/o latency, and also potentially on the memory
1194allocator. Therefore, we do not allow the recordsize to be set larger than
1195zfs_max_recordsize (default 1MB). Larger blocks can be created by changing
1196this tunable, and pools with larger blocks can always be imported and used,
1197regardless of this setting.
1198.sp
1199Default value: \fB1,048,576\fR.
1200.RE
1201
29714574
TF
1202.sp
1203.ne 2
1204.na
1205\fBzfs_mdcomp_disable\fR (int)
1206.ad
1207.RS 12n
1208Disable meta data compression
1209.sp
1210Use \fB1\fR for yes and \fB0\fR for no (default).
1211.RE
1212
f3a7f661
GW
1213.sp
1214.ne 2
1215.na
1216\fBzfs_metaslab_fragmentation_threshold\fR (int)
1217.ad
1218.RS 12n
1219Allow metaslabs to keep their active state as long as their fragmentation
1220percentage is less than or equal to this value. An active metaslab that
1221exceeds this threshold will no longer keep its active status allowing
1222better metaslabs to be selected.
1223.sp
1224Default value: \fB70\fR.
1225.RE
1226
1227.sp
1228.ne 2
1229.na
1230\fBzfs_mg_fragmentation_threshold\fR (int)
1231.ad
1232.RS 12n
1233Metaslab groups are considered eligible for allocations if their
83426735 1234fragmentation metric (measured as a percentage) is less than or equal to
f3a7f661
GW
1235this value. If a metaslab group exceeds this threshold then it will be
1236skipped unless all metaslab groups within the metaslab class have also
1237crossed this threshold.
1238.sp
1239Default value: \fB85\fR.
1240.RE
1241
f4a4046b
TC
1242.sp
1243.ne 2
1244.na
1245\fBzfs_mg_noalloc_threshold\fR (int)
1246.ad
1247.RS 12n
1248Defines a threshold at which metaslab groups should be eligible for
1249allocations. The value is expressed as a percentage of free space
1250beyond which a metaslab group is always eligible for allocations.
1251If a metaslab group's free space is less than or equal to the
6b4e21c6 1252threshold, the allocator will avoid allocating to that group
f4a4046b
TC
1253unless all groups in the pool have reached the threshold. Once all
1254groups have reached the threshold, all groups are allowed to accept
1255allocations. The default value of 0 disables the feature and causes
1256all metaslab groups to be eligible for allocations.
1257
1258This parameter allows to deal with pools having heavily imbalanced
1259vdevs such as would be the case when a new vdev has been added.
1260Setting the threshold to a non-zero percentage will stop allocations
1261from being made to vdevs that aren't filled to the specified percentage
1262and allow lesser filled vdevs to acquire more allocations than they
1263otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
1264.sp
1265Default value: \fB0\fR.
1266.RE
1267
29714574
TF
1268.sp
1269.ne 2
1270.na
1271\fBzfs_no_scrub_io\fR (int)
1272.ad
1273.RS 12n
83426735
D
1274Set for no scrub I/O. This results in scrubs not actually scrubbing data and
1275simply doing a metadata crawl of the pool instead.
29714574
TF
1276.sp
1277Use \fB1\fR for yes and \fB0\fR for no (default).
1278.RE
1279
1280.sp
1281.ne 2
1282.na
1283\fBzfs_no_scrub_prefetch\fR (int)
1284.ad
1285.RS 12n
83426735 1286Set to disable block prefetching for scrubs.
29714574
TF
1287.sp
1288Use \fB1\fR for yes and \fB0\fR for no (default).
1289.RE
1290
29714574
TF
1291.sp
1292.ne 2
1293.na
1294\fBzfs_nocacheflush\fR (int)
1295.ad
1296.RS 12n
83426735
D
1297Disable cache flush operations on disks when writing. Beware, this may cause
1298corruption if disks re-order writes.
29714574
TF
1299.sp
1300Use \fB1\fR for yes and \fB0\fR for no (default).
1301.RE
1302
1303.sp
1304.ne 2
1305.na
1306\fBzfs_nopwrite_enabled\fR (int)
1307.ad
1308.RS 12n
1309Enable NOP writes
1310.sp
1311Use \fB1\fR for yes (default) and \fB0\fR to disable.
1312.RE
1313
1314.sp
1315.ne 2
1316.na
b738bc5a 1317\fBzfs_pd_bytes_max\fR (int)
29714574
TF
1318.ad
1319.RS 12n
83426735
D
1320The number of bytes which should be prefetched during a pool traversal
1321(eg: \fRzfs send\fB or other data crawling operations)
29714574 1322.sp
74aa2ba2 1323Default value: \fB52,428,800\fR.
29714574
TF
1324.RE
1325
1326.sp
1327.ne 2
1328.na
1329\fBzfs_prefetch_disable\fR (int)
1330.ad
1331.RS 12n
7f60329a
MA
1332This tunable disables predictive prefetch. Note that it leaves "prescient"
1333prefetch (e.g. prefetch for zfs send) intact. Unlike predictive prefetch,
1334prescient prefetch never issues i/os that end up not being needed, so it
1335can't hurt performance.
29714574
TF
1336.sp
1337Use \fB1\fR for yes and \fB0\fR for no (default).
1338.RE
1339
1340.sp
1341.ne 2
1342.na
1343\fBzfs_read_chunk_size\fR (long)
1344.ad
1345.RS 12n
1346Bytes to read per chunk
1347.sp
1348Default value: \fB1,048,576\fR.
1349.RE
1350
1351.sp
1352.ne 2
1353.na
1354\fBzfs_read_history\fR (int)
1355.ad
1356.RS 12n
83426735
D
1357Historic statistics for the last N reads will be available in
1358\fR/proc/spl/kstat/zfs/POOLNAME/reads\fB
29714574 1359.sp
83426735 1360Default value: \fB0\fR (no data is kept).
29714574
TF
1361.RE
1362
1363.sp
1364.ne 2
1365.na
1366\fBzfs_read_history_hits\fR (int)
1367.ad
1368.RS 12n
1369Include cache hits in read history
1370.sp
1371Use \fB1\fR for yes and \fB0\fR for no (default).
1372.RE
1373
1374.sp
1375.ne 2
1376.na
1377\fBzfs_recover\fR (int)
1378.ad
1379.RS 12n
1380Set to attempt to recover from fatal errors. This should only be used as a
1381last resort, as it typically results in leaked space, or worse.
1382.sp
1383Use \fB1\fR for yes and \fB0\fR for no (default).
1384.RE
1385
1386.sp
1387.ne 2
1388.na
1389\fBzfs_resilver_delay\fR (int)
1390.ad
1391.RS 12n
27b293be
TC
1392Number of ticks to delay prior to issuing a resilver I/O operation when
1393a non-resilver or non-scrub I/O operation has occurred within the past
1394\fBzfs_scan_idle\fR ticks.
29714574
TF
1395.sp
1396Default value: \fB2\fR.
1397.RE
1398
1399.sp
1400.ne 2
1401.na
1402\fBzfs_resilver_min_time_ms\fR (int)
1403.ad
1404.RS 12n
83426735
D
1405Resilvers are processed by the sync thread. While resilvering it will spend
1406at least this much time working on a resilver between txg flushes.
29714574
TF
1407.sp
1408Default value: \fB3,000\fR.
1409.RE
1410
1411.sp
1412.ne 2
1413.na
1414\fBzfs_scan_idle\fR (int)
1415.ad
1416.RS 12n
27b293be
TC
1417Idle window in clock ticks. During a scrub or a resilver, if
1418a non-scrub or non-resilver I/O operation has occurred during this
1419window, the next scrub or resilver operation is delayed by, respectively
1420\fBzfs_scrub_delay\fR or \fBzfs_resilver_delay\fR ticks.
29714574
TF
1421.sp
1422Default value: \fB50\fR.
1423.RE
1424
1425.sp
1426.ne 2
1427.na
1428\fBzfs_scan_min_time_ms\fR (int)
1429.ad
1430.RS 12n
83426735
D
1431Scrubs are processed by the sync thread. While scrubbing it will spend
1432at least this much time working on a scrub between txg flushes.
29714574
TF
1433.sp
1434Default value: \fB1,000\fR.
1435.RE
1436
1437.sp
1438.ne 2
1439.na
1440\fBzfs_scrub_delay\fR (int)
1441.ad
1442.RS 12n
27b293be
TC
1443Number of ticks to delay prior to issuing a scrub I/O operation when
1444a non-scrub or non-resilver I/O operation has occurred within the past
1445\fBzfs_scan_idle\fR ticks.
29714574
TF
1446.sp
1447Default value: \fB4\fR.
1448.RE
1449
fd8febbd
TF
1450.sp
1451.ne 2
1452.na
1453\fBzfs_send_corrupt_data\fR (int)
1454.ad
1455.RS 12n
83426735 1456Allow sending of corrupt data (ignore read/checksum errors when sending data)
fd8febbd
TF
1457.sp
1458Use \fB1\fR for yes and \fB0\fR for no (default).
1459.RE
1460
29714574
TF
1461.sp
1462.ne 2
1463.na
1464\fBzfs_sync_pass_deferred_free\fR (int)
1465.ad
1466.RS 12n
83426735 1467Flushing of data to disk is done in passes. Defer frees starting in this pass
29714574
TF
1468.sp
1469Default value: \fB2\fR.
1470.RE
1471
1472.sp
1473.ne 2
1474.na
1475\fBzfs_sync_pass_dont_compress\fR (int)
1476.ad
1477.RS 12n
1478Don't compress starting in this pass
1479.sp
1480Default value: \fB5\fR.
1481.RE
1482
1483.sp
1484.ne 2
1485.na
1486\fBzfs_sync_pass_rewrite\fR (int)
1487.ad
1488.RS 12n
83426735 1489Rewrite new block pointers starting in this pass
29714574
TF
1490.sp
1491Default value: \fB2\fR.
1492.RE
1493
1494.sp
1495.ne 2
1496.na
1497\fBzfs_top_maxinflight\fR (int)
1498.ad
1499.RS 12n
83426735
D
1500Max concurrent I/Os per top-level vdev (mirrors or raidz arrays) allowed during
1501scrub or resilver operations.
29714574
TF
1502.sp
1503Default value: \fB32\fR.
1504.RE
1505
1506.sp
1507.ne 2
1508.na
1509\fBzfs_txg_history\fR (int)
1510.ad
1511.RS 12n
83426735
D
1512Historic statistics for the last N txgs will be available in
1513\fR/proc/spl/kstat/zfs/POOLNAME/txgs\fB
29714574
TF
1514.sp
1515Default value: \fB0\fR.
1516.RE
1517
29714574
TF
1518.sp
1519.ne 2
1520.na
1521\fBzfs_txg_timeout\fR (int)
1522.ad
1523.RS 12n
83426735 1524Flush dirty data to disk at least every N seconds (maximum txg duration)
29714574
TF
1525.sp
1526Default value: \fB5\fR.
1527.RE
1528
1529.sp
1530.ne 2
1531.na
1532\fBzfs_vdev_aggregation_limit\fR (int)
1533.ad
1534.RS 12n
1535Max vdev I/O aggregation size
1536.sp
1537Default value: \fB131,072\fR.
1538.RE
1539
1540.sp
1541.ne 2
1542.na
1543\fBzfs_vdev_cache_bshift\fR (int)
1544.ad
1545.RS 12n
1546Shift size to inflate reads too
1547.sp
83426735 1548Default value: \fB16\fR (effectively 65536).
29714574
TF
1549.RE
1550
1551.sp
1552.ne 2
1553.na
1554\fBzfs_vdev_cache_max\fR (int)
1555.ad
1556.RS 12n
83426735
D
1557Inflate reads small than this value to meet the \fBzfs_vdev_cache_bshift\fR
1558size.
1559.sp
1560Default value: \fB16384\fR.
29714574
TF
1561.RE
1562
1563.sp
1564.ne 2
1565.na
1566\fBzfs_vdev_cache_size\fR (int)
1567.ad
1568.RS 12n
83426735
D
1569Total size of the per-disk cache in bytes.
1570.sp
1571Currently this feature is disabled as it has been found to not be helpful
1572for performance and in some cases harmful.
29714574
TF
1573.sp
1574Default value: \fB0\fR.
1575.RE
1576
29714574
TF
1577.sp
1578.ne 2
1579.na
9f500936 1580\fBzfs_vdev_mirror_rotating_inc\fR (int)
29714574
TF
1581.ad
1582.RS 12n
9f500936 1583A number by which the balancing algorithm increments the load calculation for
1584the purpose of selecting the least busy mirror member when an I/O immediately
1585follows its predecessor on rotational vdevs for the purpose of making decisions
1586based on load.
29714574 1587.sp
9f500936 1588Default value: \fB0\fR.
1589.RE
1590
1591.sp
1592.ne 2
1593.na
1594\fBzfs_vdev_mirror_rotating_seek_inc\fR (int)
1595.ad
1596.RS 12n
1597A number by which the balancing algorithm increments the load calculation for
1598the purpose of selecting the least busy mirror member when an I/O lacks
1599locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1600this that are not immediately following the previous I/O are incremented by
1601half.
1602.sp
1603Default value: \fB5\fR.
1604.RE
1605
1606.sp
1607.ne 2
1608.na
1609\fBzfs_vdev_mirror_rotating_seek_offset\fR (int)
1610.ad
1611.RS 12n
1612The maximum distance for the last queued I/O in which the balancing algorithm
1613considers an I/O to have locality.
1614See the section "ZFS I/O SCHEDULER".
1615.sp
1616Default value: \fB1048576\fR.
1617.RE
1618
1619.sp
1620.ne 2
1621.na
1622\fBzfs_vdev_mirror_non_rotating_inc\fR (int)
1623.ad
1624.RS 12n
1625A number by which the balancing algorithm increments the load calculation for
1626the purpose of selecting the least busy mirror member on non-rotational vdevs
1627when I/Os do not immediately follow one another.
1628.sp
1629Default value: \fB0\fR.
1630.RE
1631
1632.sp
1633.ne 2
1634.na
1635\fBzfs_vdev_mirror_non_rotating_seek_inc\fR (int)
1636.ad
1637.RS 12n
1638A number by which the balancing algorithm increments the load calculation for
1639the purpose of selecting the least busy mirror member when an I/O lacks
1640locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
1641this that are not immediately following the previous I/O are incremented by
1642half.
1643.sp
1644Default value: \fB1\fR.
29714574
TF
1645.RE
1646
29714574
TF
1647.sp
1648.ne 2
1649.na
1650\fBzfs_vdev_read_gap_limit\fR (int)
1651.ad
1652.RS 12n
83426735
D
1653Aggregate read I/O operations if the gap on-disk between them is within this
1654threshold.
29714574
TF
1655.sp
1656Default value: \fB32,768\fR.
1657.RE
1658
1659.sp
1660.ne 2
1661.na
1662\fBzfs_vdev_scheduler\fR (charp)
1663.ad
1664.RS 12n
83426735 1665Set the Linux I/O scheduler on whole disk vdevs to this scheduler
29714574
TF
1666.sp
1667Default value: \fBnoop\fR.
1668.RE
1669
29714574
TF
1670.sp
1671.ne 2
1672.na
1673\fBzfs_vdev_write_gap_limit\fR (int)
1674.ad
1675.RS 12n
1676Aggregate write I/O over gap
1677.sp
1678Default value: \fB4,096\fR.
1679.RE
1680
ab9f4b0b
GN
1681.sp
1682.ne 2
1683.na
1684\fBzfs_vdev_raidz_impl\fR (string)
1685.ad
1686.RS 12n
1687Parameter for selecting raidz implementation to use.
1688
1689Options marked (always) below may be selected on module load as they are
1690supported on all systems.
1691The remaining options may only be set after the module is loaded, as they
1692are available only if the implementations are compiled in and supported
1693on the running system.
1694
1695Once the module is loaded, the content of
1696/sys/module/zfs/parameters/zfs_vdev_raidz_impl will show available options
1697with the currently selected one enclosed in [].
1698Possible options are:
1699 fastest - (always) implementation selected using built-in benchmark
1700 original - (always) original raidz implementation
1701 scalar - (always) scalar raidz implementation
ae25d222
GN
1702 sse2 - implementation using SSE2 instruction set (64bit x86 only)
1703 ssse3 - implementation using SSSE3 instruction set (64bit x86 only)
ab9f4b0b
GN
1704 avx2 - implementation using AVX2 instruction set (64bit x86 only)
1705.sp
1706Default value: \fBfastest\fR.
1707.RE
1708
29714574
TF
1709.sp
1710.ne 2
1711.na
1712\fBzfs_zevent_cols\fR (int)
1713.ad
1714.RS 12n
83426735 1715When zevents are logged to the console use this as the word wrap width.
29714574
TF
1716.sp
1717Default value: \fB80\fR.
1718.RE
1719
1720.sp
1721.ne 2
1722.na
1723\fBzfs_zevent_console\fR (int)
1724.ad
1725.RS 12n
1726Log events to the console
1727.sp
1728Use \fB1\fR for yes and \fB0\fR for no (default).
1729.RE
1730
1731.sp
1732.ne 2
1733.na
1734\fBzfs_zevent_len_max\fR (int)
1735.ad
1736.RS 12n
83426735
D
1737Max event queue length. A value of 0 will result in a calculated value which
1738increases with the number of CPUs in the system (minimum 64 events). Events
1739in the queue can be viewed with the \fBzpool events\fR command.
29714574
TF
1740.sp
1741Default value: \fB0\fR.
1742.RE
1743
1744.sp
1745.ne 2
1746.na
1747\fBzil_replay_disable\fR (int)
1748.ad
1749.RS 12n
83426735
D
1750Disable intent logging replay. Can be disabled for recovery from corrupted
1751ZIL
29714574
TF
1752.sp
1753Use \fB1\fR for yes and \fB0\fR for no (default).
1754.RE
1755
1756.sp
1757.ne 2
1758.na
1759\fBzil_slog_limit\fR (ulong)
1760.ad
1761.RS 12n
1762Max commit bytes to separate log device
1763.sp
1764Default value: \fB1,048,576\fR.
1765.RE
1766
29714574
TF
1767.sp
1768.ne 2
1769.na
1770\fBzio_delay_max\fR (int)
1771.ad
1772.RS 12n
83426735 1773A zevent will be logged if a ZIO operation takes more than N milliseconds to
ab9f4b0b 1774complete. Note that this is only a logging facility, not a timeout on
83426735 1775operations.
29714574
TF
1776.sp
1777Default value: \fB30,000\fR.
1778.RE
1779
29714574
TF
1780.sp
1781.ne 2
1782.na
1783\fBzio_requeue_io_start_cut_in_line\fR (int)
1784.ad
1785.RS 12n
1786Prioritize requeued I/O
1787.sp
1788Default value: \fB0\fR.
1789.RE
1790
dcb6bed1
D
1791.sp
1792.ne 2
1793.na
1794\fBzio_taskq_batch_pct\fR (uint)
1795.ad
1796.RS 12n
1797Percentage of online CPUs (or CPU cores, etc) which will run a worker thread
1798for IO. These workers are responsible for IO work such as compression and
1799checksum calculations. Fractional number of CPUs will be rounded down.
1800.sp
1801The default value of 75 was chosen to avoid using all CPUs which can result in
1802latency issues and inconsistent application performance, especially when high
1803compression is enabled.
1804.sp
1805Default value: \fB75\fR.
1806.RE
1807
29714574
TF
1808.sp
1809.ne 2
1810.na
1811\fBzvol_inhibit_dev\fR (uint)
1812.ad
1813.RS 12n
83426735
D
1814Do not create zvol device nodes. This may slightly improve startup time on
1815systems with a very large number of zvols.
29714574
TF
1816.sp
1817Use \fB1\fR for yes and \fB0\fR for no (default).
1818.RE
1819
1820.sp
1821.ne 2
1822.na
1823\fBzvol_major\fR (uint)
1824.ad
1825.RS 12n
83426735 1826Major number for zvol block devices
29714574
TF
1827.sp
1828Default value: \fB230\fR.
1829.RE
1830
1831.sp
1832.ne 2
1833.na
1834\fBzvol_max_discard_blocks\fR (ulong)
1835.ad
1836.RS 12n
83426735
D
1837Discard (aka TRIM) operations done on zvols will be done in batches of this
1838many blocks, where block size is determined by the \fBvolblocksize\fR property
1839of a zvol.
29714574
TF
1840.sp
1841Default value: \fB16,384\fR.
1842.RE
1843
9965059a
BB
1844.sp
1845.ne 2
1846.na
1847\fBzvol_prefetch_bytes\fR (uint)
1848.ad
1849.RS 12n
1850When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
1851from the start and end of the volume. Prefetching these regions
1852of the volume is desirable because they are likely to be accessed
1853immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
1854table.
1855.sp
1856Default value: \fB131,072\fR.
1857.RE
1858
e8b96c60
MA
1859.SH ZFS I/O SCHEDULER
1860ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
1861The I/O scheduler determines when and in what order those operations are
1862issued. The I/O scheduler divides operations into five I/O classes
1863prioritized in the following order: sync read, sync write, async read,
1864async write, and scrub/resilver. Each queue defines the minimum and
1865maximum number of concurrent operations that may be issued to the
1866device. In addition, the device has an aggregate maximum,
1867\fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
1868must not exceed the aggregate maximum. If the sum of the per-queue
1869maximums exceeds the aggregate maximum, then the number of active I/Os
1870may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
1871be issued regardless of whether all per-queue minimums have been met.
1872.sp
1873For many physical devices, throughput increases with the number of
1874concurrent operations, but latency typically suffers. Further, physical
1875devices typically have a limit at which more concurrent operations have no
1876effect on throughput or can actually cause it to decrease.
1877.sp
1878The scheduler selects the next operation to issue by first looking for an
1879I/O class whose minimum has not been satisfied. Once all are satisfied and
1880the aggregate maximum has not been hit, the scheduler looks for classes
1881whose maximum has not been satisfied. Iteration through the I/O classes is
1882done in the order specified above. No further operations are issued if the
1883aggregate maximum number of concurrent operations has been hit or if there
1884are no operations queued for an I/O class that has not hit its maximum.
1885Every time an I/O is queued or an operation completes, the I/O scheduler
1886looks for new operations to issue.
1887.sp
1888In general, smaller max_active's will lead to lower latency of synchronous
1889operations. Larger max_active's may lead to higher overall throughput,
1890depending on underlying storage.
1891.sp
1892The ratio of the queues' max_actives determines the balance of performance
1893between reads, writes, and scrubs. E.g., increasing
1894\fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
1895more quickly, but reads and writes to have higher latency and lower throughput.
1896.sp
1897All I/O classes have a fixed maximum number of outstanding operations
1898except for the async write class. Asynchronous writes represent the data
1899that is committed to stable storage during the syncing stage for
1900transaction groups. Transaction groups enter the syncing state
1901periodically so the number of queued async writes will quickly burst up
1902and then bleed down to zero. Rather than servicing them as quickly as
1903possible, the I/O scheduler changes the maximum number of active async
1904write I/Os according to the amount of dirty data in the pool. Since
1905both throughput and latency typically increase with the number of
1906concurrent operations issued to physical devices, reducing the
1907burstiness in the number of concurrent operations also stabilizes the
1908response time of operations from other -- and in particular synchronous
1909-- queues. In broad strokes, the I/O scheduler will issue more
1910concurrent operations from the async write queue as there's more dirty
1911data in the pool.
1912.sp
1913Async Writes
1914.sp
1915The number of concurrent operations issued for the async write I/O class
1916follows a piece-wise linear function defined by a few adjustable points.
1917.nf
1918
1919 | o---------| <-- zfs_vdev_async_write_max_active
1920 ^ | /^ |
1921 | | / | |
1922active | / | |
1923 I/O | / | |
1924count | / | |
1925 | / | |
1926 |-------o | | <-- zfs_vdev_async_write_min_active
1927 0|_______^______|_________|
1928 0% | | 100% of zfs_dirty_data_max
1929 | |
1930 | `-- zfs_vdev_async_write_active_max_dirty_percent
1931 `--------- zfs_vdev_async_write_active_min_dirty_percent
1932
1933.fi
1934Until the amount of dirty data exceeds a minimum percentage of the dirty
1935data allowed in the pool, the I/O scheduler will limit the number of
1936concurrent operations to the minimum. As that threshold is crossed, the
1937number of concurrent operations issued increases linearly to the maximum at
1938the specified maximum percentage of the dirty data allowed in the pool.
1939.sp
1940Ideally, the amount of dirty data on a busy pool will stay in the sloped
1941part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
1942and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
1943maximum percentage, this indicates that the rate of incoming data is
1944greater than the rate that the backend storage can handle. In this case, we
1945must further throttle incoming writes, as described in the next section.
1946
1947.SH ZFS TRANSACTION DELAY
1948We delay transactions when we've determined that the backend storage
1949isn't able to accommodate the rate of incoming writes.
1950.sp
1951If there is already a transaction waiting, we delay relative to when
1952that transaction will finish waiting. This way the calculated delay time
1953is independent of the number of threads concurrently executing
1954transactions.
1955.sp
1956If we are the only waiter, wait relative to when the transaction
1957started, rather than the current time. This credits the transaction for
1958"time already served", e.g. reading indirect blocks.
1959.sp
1960The minimum time for a transaction to take is calculated as:
1961.nf
1962 min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
1963 min_time is then capped at 100 milliseconds.
1964.fi
1965.sp
1966The delay has two degrees of freedom that can be adjusted via tunables. The
1967percentage of dirty data at which we start to delay is defined by
1968\fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
1969\fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
1970delay after writing at full speed has failed to keep up with the incoming write
1971rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
1972this variable determines the amount of delay at the midpoint of the curve.
1973.sp
1974.nf
1975delay
1976 10ms +-------------------------------------------------------------*+
1977 | *|
1978 9ms + *+
1979 | *|
1980 8ms + *+
1981 | * |
1982 7ms + * +
1983 | * |
1984 6ms + * +
1985 | * |
1986 5ms + * +
1987 | * |
1988 4ms + * +
1989 | * |
1990 3ms + * +
1991 | * |
1992 2ms + (midpoint) * +
1993 | | ** |
1994 1ms + v *** +
1995 | zfs_delay_scale ----------> ******** |
1996 0 +-------------------------------------*********----------------+
1997 0% <- zfs_dirty_data_max -> 100%
1998.fi
1999.sp
2000Note that since the delay is added to the outstanding time remaining on the
2001most recent transaction, the delay is effectively the inverse of IOPS.
2002Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
2003was chosen such that small changes in the amount of accumulated dirty data
2004in the first 3/4 of the curve yield relatively small differences in the
2005amount of delay.
2006.sp
2007The effects can be easier to understand when the amount of delay is
2008represented on a log scale:
2009.sp
2010.nf
2011delay
2012100ms +-------------------------------------------------------------++
2013 + +
2014 | |
2015 + *+
2016 10ms + *+
2017 + ** +
2018 | (midpoint) ** |
2019 + | ** +
2020 1ms + v **** +
2021 + zfs_delay_scale ----------> ***** +
2022 | **** |
2023 + **** +
2024100us + ** +
2025 + * +
2026 | * |
2027 + * +
2028 10us + * +
2029 + +
2030 | |
2031 + +
2032 +--------------------------------------------------------------+
2033 0% <- zfs_dirty_data_max -> 100%
2034.fi
2035.sp
2036Note here that only as the amount of dirty data approaches its limit does
2037the delay start to increase rapidly. The goal of a properly tuned system
2038should be to keep the amount of dirty data out of that range by first
2039ensuring that the appropriate limits are set for the I/O scheduler to reach
2040optimal throughput on the backend storage, and then by changing the value
2041of \fBzfs_delay_scale\fR to increase the steepness of the curve.