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