]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/openzfs/man/man5/zfs-module-parameters.5
MFV 2.0-rc2
[FreeBSD/FreeBSD.git] / sys / contrib / openzfs / man / man5 / zfs-module-parameters.5
1 '\" te
2 .\" Copyright (c) 2013 by Turbo Fredriksson <turbo@bayour.com>. All rights reserved.
3 .\" Copyright (c) 2019, 2020 by Delphix. All rights reserved.
4 .\" Copyright (c) 2019 Datto Inc.
5 .\" The contents of this file are subject to the terms of the Common Development
6 .\" and Distribution License (the "License").  You may not use this file except
7 .\" in compliance with the License. You can obtain a copy of the license at
8 .\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
9 .\"
10 .\" See the License for the specific language governing permissions and
11 .\" limitations under the License. When distributing Covered Code, include this
12 .\" CDDL HEADER in each file and include the License file at
13 .\" usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this
14 .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
15 .\" own identifying information:
16 .\" Portions Copyright [yyyy] [name of copyright owner]
17 .TH ZFS-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS
18 .SH NAME
19 zfs\-module\-parameters \- ZFS module parameters
20 .SH DESCRIPTION
21 .sp
22 .LP
23 Description of the different parameters to the ZFS module.
24
25 .SS "Module parameters"
26 .sp
27 .LP
28
29 .sp
30 .ne 2
31 .na
32 \fBdbuf_cache_max_bytes\fR (ulong)
33 .ad
34 .RS 12n
35 Maximum size in bytes of the dbuf cache.  The target size is determined by the
36 MIN versus \fB1/2^dbuf_cache_shift\fR (1/32) of the target ARC size.  The
37 behavior of the dbuf cache and its associated settings can be observed via the
38 \fB/proc/spl/kstat/zfs/dbufstats\fR kstat.
39 .sp
40 Default value: \fBULONG_MAX\fR.
41 .RE
42
43 .sp
44 .ne 2
45 .na
46 \fBdbuf_metadata_cache_max_bytes\fR (ulong)
47 .ad
48 .RS 12n
49 Maximum size in bytes of the metadata dbuf cache.  The target size is
50 determined by the MIN versus \fB1/2^dbuf_metadata_cache_shift\fR (1/64) of the
51 target ARC size.  The behavior of the metadata dbuf cache and its associated
52 settings can be observed via the \fB/proc/spl/kstat/zfs/dbufstats\fR kstat.
53 .sp
54 Default value: \fBULONG_MAX\fR.
55 .RE
56
57 .sp
58 .ne 2
59 .na
60 \fBdbuf_cache_hiwater_pct\fR (uint)
61 .ad
62 .RS 12n
63 The percentage over \fBdbuf_cache_max_bytes\fR when dbufs must be evicted
64 directly.
65 .sp
66 Default value: \fB10\fR%.
67 .RE
68
69 .sp
70 .ne 2
71 .na
72 \fBdbuf_cache_lowater_pct\fR (uint)
73 .ad
74 .RS 12n
75 The percentage below \fBdbuf_cache_max_bytes\fR when the evict thread stops
76 evicting dbufs.
77 .sp
78 Default value: \fB10\fR%.
79 .RE
80
81 .sp
82 .ne 2
83 .na
84 \fBdbuf_cache_shift\fR (int)
85 .ad
86 .RS 12n
87 Set the size of the dbuf cache, \fBdbuf_cache_max_bytes\fR, to a log2 fraction
88 of the target ARC size.
89 .sp
90 Default value: \fB5\fR.
91 .RE
92
93 .sp
94 .ne 2
95 .na
96 \fBdbuf_metadata_cache_shift\fR (int)
97 .ad
98 .RS 12n
99 Set the size of the dbuf metadata cache, \fBdbuf_metadata_cache_max_bytes\fR,
100 to a log2 fraction of the target ARC size.
101 .sp
102 Default value: \fB6\fR.
103 .RE
104
105 .sp
106 .ne 2
107 .na
108 \fBdmu_object_alloc_chunk_shift\fR (int)
109 .ad
110 .RS 12n
111 dnode slots allocated in a single operation as a power of 2. The default value
112 minimizes lock contention for the bulk operation performed.
113 .sp
114 Default value: \fB7\fR (128).
115 .RE
116
117 .sp
118 .ne 2
119 .na
120 \fBdmu_prefetch_max\fR (int)
121 .ad
122 .RS 12n
123 Limit the amount we can prefetch with one call to this amount (in bytes).
124 This helps to limit the amount of memory that can be used by prefetching.
125 .sp
126 Default value: \fB134,217,728\fR (128MB).
127 .RE
128
129 .sp
130 .ne 2
131 .na
132 \fBignore_hole_birth\fR (int)
133 .ad
134 .RS 12n
135 This is an alias for \fBsend_holes_without_birth_time\fR.
136 .RE
137
138 .sp
139 .ne 2
140 .na
141 \fBl2arc_feed_again\fR (int)
142 .ad
143 .RS 12n
144 Turbo L2ARC warm-up. When the L2ARC is cold the fill interval will be set as
145 fast as possible.
146 .sp
147 Use \fB1\fR for yes (default) and \fB0\fR to disable.
148 .RE
149
150 .sp
151 .ne 2
152 .na
153 \fBl2arc_feed_min_ms\fR (ulong)
154 .ad
155 .RS 12n
156 Min feed interval in milliseconds. Requires \fBl2arc_feed_again=1\fR and only
157 applicable in related situations.
158 .sp
159 Default value: \fB200\fR.
160 .RE
161
162 .sp
163 .ne 2
164 .na
165 \fBl2arc_feed_secs\fR (ulong)
166 .ad
167 .RS 12n
168 Seconds between L2ARC writing
169 .sp
170 Default value: \fB1\fR.
171 .RE
172
173 .sp
174 .ne 2
175 .na
176 \fBl2arc_headroom\fR (ulong)
177 .ad
178 .RS 12n
179 How far through the ARC lists to search for L2ARC cacheable content, expressed
180 as a multiplier of \fBl2arc_write_max\fR.
181 ARC persistence across reboots can be achieved with persistent L2ARC by setting
182 this parameter to \fB0\fR allowing the full length of ARC lists to be searched
183 for cacheable content.
184 .sp
185 Default value: \fB2\fR.
186 .RE
187
188 .sp
189 .ne 2
190 .na
191 \fBl2arc_headroom_boost\fR (ulong)
192 .ad
193 .RS 12n
194 Scales \fBl2arc_headroom\fR by this percentage when L2ARC contents are being
195 successfully compressed before writing. A value of \fB100\fR disables this
196 feature.
197 .sp
198 Default value: \fB200\fR%.
199 .RE
200
201 .sp
202 .ne 2
203 .na
204 \fBl2arc_mfuonly\fR (int)
205 .ad
206 .RS 12n
207 Controls whether only MFU metadata and data are cached from ARC into L2ARC.
208 This may be desired to avoid wasting space on L2ARC when reading/writing large
209 amounts of data that are not expected to be accessed more than once. The
210 default is \fB0\fR, meaning both MRU and MFU data and metadata are cached.
211 When turning off (\fB0\fR) this feature some MRU buffers will still be present
212 in ARC and eventually cached on L2ARC.
213 .sp
214 Use \fB0\fR for no (default) and \fB1\fR for yes.
215 .RE
216
217 .sp
218 .ne 2
219 .na
220 \fBl2arc_meta_percent\fR (int)
221 .ad
222 .RS 12n
223 Percent of ARC size allowed for L2ARC-only headers.
224 Since L2ARC buffers are not evicted on memory pressure, too large amount of
225 headers on system with irrationaly large L2ARC can render it slow or unusable.
226 This parameter limits L2ARC writes and rebuild to achieve it.
227 .sp
228 Default value: \fB33\fR%.
229 .RE
230
231 .sp
232 .ne 2
233 .na
234 \fBl2arc_trim_ahead\fR (ulong)
235 .ad
236 .RS 12n
237 Trims ahead of the current write size (\fBl2arc_write_max\fR) on L2ARC devices
238 by this percentage of write size if we have filled the device. If set to
239 \fB100\fR we TRIM twice the space required to accommodate upcoming writes. A
240 minimum of 64MB will be trimmed. It also enables TRIM of the whole L2ARC device
241 upon creation or addition to an existing pool or if the header of the device is
242 invalid upon importing a pool or onlining a cache device. A value of \fB0\fR
243 disables TRIM on L2ARC altogether and is the default as it can put significant
244 stress on the underlying storage devices. This will vary depending of how well
245 the specific device handles these commands.
246 .sp
247 Default value: \fB0\fR%.
248 .RE
249
250 .sp
251 .ne 2
252 .na
253 \fBl2arc_noprefetch\fR (int)
254 .ad
255 .RS 12n
256 Do not write buffers to L2ARC if they were prefetched but not used by
257 applications.
258 .sp
259 Use \fB1\fR for yes (default) and \fB0\fR to disable.
260 .RE
261
262 .sp
263 .ne 2
264 .na
265 \fBl2arc_norw\fR (int)
266 .ad
267 .RS 12n
268 No reads during writes.
269 .sp
270 Use \fB1\fR for yes and \fB0\fR for no (default).
271 .RE
272
273 .sp
274 .ne 2
275 .na
276 \fBl2arc_write_boost\fR (ulong)
277 .ad
278 .RS 12n
279 Cold L2ARC devices will have \fBl2arc_write_max\fR increased by this amount
280 while they remain cold.
281 .sp
282 Default value: \fB8,388,608\fR.
283 .RE
284
285 .sp
286 .ne 2
287 .na
288 \fBl2arc_write_max\fR (ulong)
289 .ad
290 .RS 12n
291 Max write bytes per interval.
292 .sp
293 Default value: \fB8,388,608\fR.
294 .RE
295
296 .sp
297 .ne 2
298 .na
299 \fBl2arc_rebuild_enabled\fR (int)
300 .ad
301 .RS 12n
302 Rebuild the L2ARC when importing a pool (persistent L2ARC). This can be
303 disabled if there are problems importing a pool or attaching an L2ARC device
304 (e.g. the L2ARC device is slow in reading stored log metadata, or the metadata
305 has become somehow fragmented/unusable).
306 .sp
307 Use \fB1\fR for yes (default) and \fB0\fR for no.
308 .RE
309
310 .sp
311 .ne 2
312 .na
313 \fBl2arc_rebuild_blocks_min_l2size\fR (ulong)
314 .ad
315 .RS 12n
316 Min size (in bytes) of an L2ARC device required in order to write log blocks
317 in it. The log blocks are used upon importing the pool to rebuild
318 the L2ARC (persistent L2ARC). Rationale: for L2ARC devices less than 1GB, the
319 amount of data l2arc_evict() evicts is significant compared to the amount of
320 restored L2ARC data. In this case do not write log blocks in L2ARC in order not
321 to waste space.
322 .sp
323 Default value: \fB1,073,741,824\fR (1GB).
324 .RE
325
326 .sp
327 .ne 2
328 .na
329 \fBmetaslab_aliquot\fR (ulong)
330 .ad
331 .RS 12n
332 Metaslab granularity, in bytes. This is roughly similar to what would be
333 referred to as the "stripe size" in traditional RAID arrays. In normal
334 operation, ZFS will try to write this amount of data to a top-level vdev
335 before moving on to the next one.
336 .sp
337 Default value: \fB524,288\fR.
338 .RE
339
340 .sp
341 .ne 2
342 .na
343 \fBmetaslab_bias_enabled\fR (int)
344 .ad
345 .RS 12n
346 Enable metaslab group biasing based on its vdev's over- or under-utilization
347 relative to the pool.
348 .sp
349 Use \fB1\fR for yes (default) and \fB0\fR for no.
350 .RE
351
352 .sp
353 .ne 2
354 .na
355 \fBmetaslab_force_ganging\fR (ulong)
356 .ad
357 .RS 12n
358 Make some blocks above a certain size be gang blocks.  This option is used
359 by the test suite to facilitate testing.
360 .sp
361 Default value: \fB16,777,217\fR.
362 .RE
363
364 .sp
365 .ne 2
366 .na
367 \fBzfs_keep_log_spacemaps_at_export\fR (int)
368 .ad
369 .RS 12n
370 Prevent log spacemaps from being destroyed during pool exports and destroys.
371 .sp
372 Use \fB1\fR for yes and \fB0\fR for no (default).
373 .RE
374
375 .sp
376 .ne 2
377 .na
378 \fBzfs_metaslab_segment_weight_enabled\fR (int)
379 .ad
380 .RS 12n
381 Enable/disable segment-based metaslab selection.
382 .sp
383 Use \fB1\fR for yes (default) and \fB0\fR for no.
384 .RE
385
386 .sp
387 .ne 2
388 .na
389 \fBzfs_metaslab_switch_threshold\fR (int)
390 .ad
391 .RS 12n
392 When using segment-based metaslab selection, continue allocating
393 from the active metaslab until \fBzfs_metaslab_switch_threshold\fR
394 worth of buckets have been exhausted.
395 .sp
396 Default value: \fB2\fR.
397 .RE
398
399 .sp
400 .ne 2
401 .na
402 \fBmetaslab_debug_load\fR (int)
403 .ad
404 .RS 12n
405 Load all metaslabs during pool import.
406 .sp
407 Use \fB1\fR for yes and \fB0\fR for no (default).
408 .RE
409
410 .sp
411 .ne 2
412 .na
413 \fBmetaslab_debug_unload\fR (int)
414 .ad
415 .RS 12n
416 Prevent metaslabs from being unloaded.
417 .sp
418 Use \fB1\fR for yes and \fB0\fR for no (default).
419 .RE
420
421 .sp
422 .ne 2
423 .na
424 \fBmetaslab_fragmentation_factor_enabled\fR (int)
425 .ad
426 .RS 12n
427 Enable use of the fragmentation metric in computing metaslab weights.
428 .sp
429 Use \fB1\fR for yes (default) and \fB0\fR for no.
430 .RE
431
432 .sp
433 .ne 2
434 .na
435 \fBmetaslab_df_max_search\fR (int)
436 .ad
437 .RS 12n
438 Maximum distance to search forward from the last offset. Without this limit,
439 fragmented pools can see >100,000 iterations and metaslab_block_picker()
440 becomes the performance limiting factor on high-performance storage.
441
442 With the default setting of 16MB, we typically see less than 500 iterations,
443 even with very fragmented, ashift=9 pools. The maximum number of iterations
444 possible is: \fBmetaslab_df_max_search / (2 * (1<<ashift))\fR.
445 With the default setting of 16MB this is 16*1024 (with ashift=9) or 2048
446 (with ashift=12).
447 .sp
448 Default value: \fB16,777,216\fR (16MB)
449 .RE
450
451 .sp
452 .ne 2
453 .na
454 \fBmetaslab_df_use_largest_segment\fR (int)
455 .ad
456 .RS 12n
457 If we are not searching forward (due to metaslab_df_max_search,
458 metaslab_df_free_pct, or metaslab_df_alloc_threshold), this tunable controls
459 what segment is used.  If it is set, we will use the largest free segment.
460 If it is not set, we will use a segment of exactly the requested size (or
461 larger).
462 .sp
463 Use \fB1\fR for yes and \fB0\fR for no (default).
464 .RE
465
466 .sp
467 .ne 2
468 .na
469 \fBzfs_metaslab_max_size_cache_sec\fR (ulong)
470 .ad
471 .RS 12n
472 When we unload a metaslab, we cache the size of the largest free chunk. We use
473 that cached size to determine whether or not to load a metaslab for a given
474 allocation. As more frees accumulate in that metaslab while it's unloaded, the
475 cached max size becomes less and less accurate. After a number of seconds
476 controlled by this tunable, we stop considering the cached max size and start
477 considering only the histogram instead.
478 .sp
479 Default value: \fB3600 seconds\fR (one hour)
480 .RE
481
482 .sp
483 .ne 2
484 .na
485 \fBzfs_metaslab_mem_limit\fR (int)
486 .ad
487 .RS 12n
488 When we are loading a new metaslab, we check the amount of memory being used
489 to store metaslab range trees. If it is over a threshold, we attempt to unload
490 the least recently used metaslab to prevent the system from clogging all of
491 its memory with range trees. This tunable sets the percentage of total system
492 memory that is the threshold.
493 .sp
494 Default value: \fB25 percent\fR
495 .RE
496
497 .sp
498 .ne 2
499 .na
500 \fBzfs_vdev_default_ms_count\fR (int)
501 .ad
502 .RS 12n
503 When a vdev is added target this number of metaslabs per top-level vdev.
504 .sp
505 Default value: \fB200\fR.
506 .RE
507
508 .sp
509 .ne 2
510 .na
511 \fBzfs_vdev_default_ms_shift\fR (int)
512 .ad
513 .RS 12n
514 Default limit for metaslab size.
515 .sp
516 Default value: \fB29\fR [meaning (1 << 29) = 512MB].
517 .RE
518
519 .sp
520 .ne 2
521 .na
522 \fBzfs_vdev_max_auto_ashift\fR (ulong)
523 .ad
524 .RS 12n
525 Maximum ashift used when optimizing for logical -> physical sector size on new
526 top-level vdevs.
527 .sp
528 Default value: \fBASHIFT_MAX\fR (16).
529 .RE
530
531 .sp
532 .ne 2
533 .na
534 \fBzfs_vdev_min_auto_ashift\fR (ulong)
535 .ad
536 .RS 12n
537 Minimum ashift used when creating new top-level vdevs.
538 .sp
539 Default value: \fBASHIFT_MIN\fR (9).
540 .RE
541
542 .sp
543 .ne 2
544 .na
545 \fBzfs_vdev_min_ms_count\fR (int)
546 .ad
547 .RS 12n
548 Minimum number of metaslabs to create in a top-level vdev.
549 .sp
550 Default value: \fB16\fR.
551 .RE
552
553 .sp
554 .ne 2
555 .na
556 \fBvdev_validate_skip\fR (int)
557 .ad
558 .RS 12n
559 Skip label validation steps during pool import. Changing is not recommended
560 unless you know what you are doing and are recovering a damaged label.
561 .sp
562 Default value: \fB0\fR.
563 .RE
564
565 .sp
566 .ne 2
567 .na
568 \fBzfs_vdev_ms_count_limit\fR (int)
569 .ad
570 .RS 12n
571 Practical upper limit of total metaslabs per top-level vdev.
572 .sp
573 Default value: \fB131,072\fR.
574 .RE
575
576 .sp
577 .ne 2
578 .na
579 \fBmetaslab_preload_enabled\fR (int)
580 .ad
581 .RS 12n
582 Enable metaslab group preloading.
583 .sp
584 Use \fB1\fR for yes (default) and \fB0\fR for no.
585 .RE
586
587 .sp
588 .ne 2
589 .na
590 \fBmetaslab_lba_weighting_enabled\fR (int)
591 .ad
592 .RS 12n
593 Give more weight to metaslabs with lower LBAs, assuming they have
594 greater bandwidth as is typically the case on a modern constant
595 angular velocity disk drive.
596 .sp
597 Use \fB1\fR for yes (default) and \fB0\fR for no.
598 .RE
599
600 .sp
601 .ne 2
602 .na
603 \fBmetaslab_unload_delay\fR (int)
604 .ad
605 .RS 12n
606 After a metaslab is used, we keep it loaded for this many txgs, to attempt to
607 reduce unnecessary reloading. Note that both this many txgs and
608 \fBmetaslab_unload_delay_ms\fR milliseconds must pass before unloading will
609 occur.
610 .sp
611 Default value: \fB32\fR.
612 .RE
613
614 .sp
615 .ne 2
616 .na
617 \fBmetaslab_unload_delay_ms\fR (int)
618 .ad
619 .RS 12n
620 After a metaslab is used, we keep it loaded for this many milliseconds, to
621 attempt to reduce unnecessary reloading. Note that both this many
622 milliseconds and \fBmetaslab_unload_delay\fR txgs must pass before unloading
623 will occur.
624 .sp
625 Default value: \fB600000\fR (ten minutes).
626 .RE
627
628 .sp
629 .ne 2
630 .na
631 \fBsend_holes_without_birth_time\fR (int)
632 .ad
633 .RS 12n
634 When set, the hole_birth optimization will not be used, and all holes will
635 always be sent on zfs send.  This is useful if you suspect your datasets are
636 affected by a bug in hole_birth.
637 .sp
638 Use \fB1\fR for on (default) and \fB0\fR for off.
639 .RE
640
641 .sp
642 .ne 2
643 .na
644 \fBspa_config_path\fR (charp)
645 .ad
646 .RS 12n
647 SPA config file
648 .sp
649 Default value: \fB/etc/zfs/zpool.cache\fR.
650 .RE
651
652 .sp
653 .ne 2
654 .na
655 \fBspa_asize_inflation\fR (int)
656 .ad
657 .RS 12n
658 Multiplication factor used to estimate actual disk consumption from the
659 size of data being written. The default value is a worst case estimate,
660 but lower values may be valid for a given pool depending on its
661 configuration.  Pool administrators who understand the factors involved
662 may wish to specify a more realistic inflation factor, particularly if
663 they operate close to quota or capacity limits.
664 .sp
665 Default value: \fB24\fR.
666 .RE
667
668 .sp
669 .ne 2
670 .na
671 \fBspa_load_print_vdev_tree\fR (int)
672 .ad
673 .RS 12n
674 Whether to print the vdev tree in the debugging message buffer during pool import.
675 Use 0 to disable and 1 to enable.
676 .sp
677 Default value: \fB0\fR.
678 .RE
679
680 .sp
681 .ne 2
682 .na
683 \fBspa_load_verify_data\fR (int)
684 .ad
685 .RS 12n
686 Whether to traverse data blocks during an "extreme rewind" (\fB-X\fR)
687 import.  Use 0 to disable and 1 to enable.
688
689 An extreme rewind import normally performs a full traversal of all
690 blocks in the pool for verification.  If this parameter is set to 0,
691 the traversal skips non-metadata blocks.  It can be toggled once the
692 import has started to stop or start the traversal of non-metadata blocks.
693 .sp
694 Default value: \fB1\fR.
695 .RE
696
697 .sp
698 .ne 2
699 .na
700 \fBspa_load_verify_metadata\fR (int)
701 .ad
702 .RS 12n
703 Whether to traverse blocks during an "extreme rewind" (\fB-X\fR)
704 pool import.  Use 0 to disable and 1 to enable.
705
706 An extreme rewind import normally performs a full traversal of all
707 blocks in the pool for verification.  If this parameter is set to 0,
708 the traversal is not performed.  It can be toggled once the import has
709 started to stop or start the traversal.
710 .sp
711 Default value: \fB1\fR.
712 .RE
713
714 .sp
715 .ne 2
716 .na
717 \fBspa_load_verify_shift\fR (int)
718 .ad
719 .RS 12n
720 Sets the maximum number of bytes to consume during pool import to the log2
721 fraction of the target ARC size.
722 .sp
723 Default value: \fB4\fR.
724 .RE
725
726 .sp
727 .ne 2
728 .na
729 \fBspa_slop_shift\fR (int)
730 .ad
731 .RS 12n
732 Normally, we don't allow the last 3.2% (1/(2^spa_slop_shift)) of space
733 in the pool to be consumed.  This ensures that we don't run the pool
734 completely out of space, due to unaccounted changes (e.g. to the MOS).
735 It also limits the worst-case time to allocate space.  If we have
736 less than this amount of free space, most ZPL operations (e.g. write,
737 create) will return ENOSPC.
738 .sp
739 Default value: \fB5\fR.
740 .RE
741
742 .sp
743 .ne 2
744 .na
745 \fBvdev_removal_max_span\fR (int)
746 .ad
747 .RS 12n
748 During top-level vdev removal, chunks of data are copied from the vdev
749 which may include free space in order to trade bandwidth for IOPS.
750 This parameter determines the maximum span of free space (in bytes)
751 which will be included as "unnecessary" data in a chunk of copied data.
752
753 The default value here was chosen to align with
754 \fBzfs_vdev_read_gap_limit\fR, which is a similar concept when doing
755 regular reads (but there's no reason it has to be the same).
756 .sp
757 Default value: \fB32,768\fR.
758 .RE
759
760 .sp
761 .ne 2
762 .na
763 \fBvdev_file_logical_ashift\fR (ulong)
764 .ad
765 .RS 12n
766 Logical ashift for file-based devices.
767 .sp
768 Default value: \fB9\fR.
769 .RE
770
771 .sp
772 .ne 2
773 .na
774 \fBvdev_file_physical_ashift\fR (ulong)
775 .ad
776 .RS 12n
777 Physical ashift for file-based devices.
778 .sp
779 Default value: \fB9\fR.
780 .RE
781
782 .sp
783 .ne 2
784 .na
785 \fBzap_iterate_prefetch\fR (int)
786 .ad
787 .RS 12n
788 If this is set, when we start iterating over a ZAP object, zfs will prefetch
789 the entire object (all leaf blocks).  However, this is limited by
790 \fBdmu_prefetch_max\fR.
791 .sp
792 Use \fB1\fR for on (default) and \fB0\fR for off.
793 .RE
794
795 .sp
796 .ne 2
797 .na
798 \fBzfetch_array_rd_sz\fR (ulong)
799 .ad
800 .RS 12n
801 If prefetching is enabled, disable prefetching for reads larger than this size.
802 .sp
803 Default value: \fB1,048,576\fR.
804 .RE
805
806 .sp
807 .ne 2
808 .na
809 \fBzfetch_max_distance\fR (uint)
810 .ad
811 .RS 12n
812 Max bytes to prefetch per stream (default 8MB).
813 .sp
814 Default value: \fB8,388,608\fR.
815 .RE
816
817 .sp
818 .ne 2
819 .na
820 \fBzfetch_max_streams\fR (uint)
821 .ad
822 .RS 12n
823 Max number of streams per zfetch (prefetch streams per file).
824 .sp
825 Default value: \fB8\fR.
826 .RE
827
828 .sp
829 .ne 2
830 .na
831 \fBzfetch_min_sec_reap\fR (uint)
832 .ad
833 .RS 12n
834 Min time before an active prefetch stream can be reclaimed
835 .sp
836 Default value: \fB2\fR.
837 .RE
838
839 .sp
840 .ne 2
841 .na
842 \fBzfs_abd_scatter_enabled\fR (int)
843 .ad
844 .RS 12n
845 Enables ARC from using scatter/gather lists and forces all allocations to be
846 linear in kernel memory. Disabling can improve performance in some code paths
847 at the expense of fragmented kernel memory.
848 .sp
849 Default value: \fB1\fR.
850 .RE
851
852 .sp
853 .ne 2
854 .na
855 \fBzfs_abd_scatter_max_order\fR (iunt)
856 .ad
857 .RS 12n
858 Maximum number of consecutive memory pages allocated in a single block for
859 scatter/gather lists. Default value is specified by the kernel itself.
860 .sp
861 Default value: \fB10\fR at the time of this writing.
862 .RE
863
864 .sp
865 .ne 2
866 .na
867 \fBzfs_abd_scatter_min_size\fR (uint)
868 .ad
869 .RS 12n
870 This is the minimum allocation size that will use scatter (page-based)
871 ABD's.  Smaller allocations will use linear ABD's.
872 .sp
873 Default value: \fB1536\fR (512B and 1KB allocations will be linear).
874 .RE
875
876 .sp
877 .ne 2
878 .na
879 \fBzfs_arc_dnode_limit\fR (ulong)
880 .ad
881 .RS 12n
882 When the number of bytes consumed by dnodes in the ARC exceeds this number of
883 bytes, try to unpin some of it in response to demand for non-metadata. This
884 value acts as a ceiling to the amount of dnode metadata, and defaults to 0 which
885 indicates that a percent which is based on \fBzfs_arc_dnode_limit_percent\fR of
886 the ARC meta buffers that may be used for dnodes.
887
888 See also \fBzfs_arc_meta_prune\fR which serves a similar purpose but is used
889 when the amount of metadata in the ARC exceeds \fBzfs_arc_meta_limit\fR rather
890 than in response to overall demand for non-metadata.
891
892 .sp
893 Default value: \fB0\fR.
894 .RE
895
896 .sp
897 .ne 2
898 .na
899 \fBzfs_arc_dnode_limit_percent\fR (ulong)
900 .ad
901 .RS 12n
902 Percentage that can be consumed by dnodes of ARC meta buffers.
903 .sp
904 See also \fBzfs_arc_dnode_limit\fR which serves a similar purpose but has a
905 higher priority if set to nonzero value.
906 .sp
907 Default value: \fB10\fR%.
908 .RE
909
910 .sp
911 .ne 2
912 .na
913 \fBzfs_arc_dnode_reduce_percent\fR (ulong)
914 .ad
915 .RS 12n
916 Percentage of ARC dnodes to try to scan in response to demand for non-metadata
917 when the number of bytes consumed by dnodes exceeds \fBzfs_arc_dnode_limit\fR.
918
919 .sp
920 Default value: \fB10\fR% of the number of dnodes in the ARC.
921 .RE
922
923 .sp
924 .ne 2
925 .na
926 \fBzfs_arc_average_blocksize\fR (int)
927 .ad
928 .RS 12n
929 The ARC's buffer hash table is sized based on the assumption of an average
930 block size of \fBzfs_arc_average_blocksize\fR (default 8K).  This works out
931 to roughly 1MB of hash table per 1GB of physical memory with 8-byte pointers.
932 For configurations with a known larger average block size this value can be
933 increased to reduce the memory footprint.
934
935 .sp
936 Default value: \fB8192\fR.
937 .RE
938
939 .sp
940 .ne 2
941 .na
942 \fBzfs_arc_eviction_pct\fR (int)
943 .ad
944 .RS 12n
945 When \fBarc_is_overflowing()\fR, \fBarc_get_data_impl()\fR waits for this
946 percent of the requested amount of data to be evicted.  For example, by
947 default for every 2KB that's evicted, 1KB of it may be "reused" by a new
948 allocation. Since this is above 100%, it ensures that progress is made
949 towards getting \fBarc_size\fR under \fBarc_c\fR.  Since this is finite, it
950 ensures that allocations can still happen, even during the potentially long
951 time that \fBarc_size\fR is more than \fBarc_c\fR.
952 .sp
953 Default value: \fB200\fR.
954 .RE
955
956 .sp
957 .ne 2
958 .na
959 \fBzfs_arc_evict_batch_limit\fR (int)
960 .ad
961 .RS 12n
962 Number ARC headers to evict per sub-list before proceeding to another sub-list.
963 This batch-style operation prevents entire sub-lists from being evicted at once
964 but comes at a cost of additional unlocking and locking.
965 .sp
966 Default value: \fB10\fR.
967 .RE
968
969 .sp
970 .ne 2
971 .na
972 \fBzfs_arc_grow_retry\fR (int)
973 .ad
974 .RS 12n
975 If set to a non zero value, it will replace the arc_grow_retry value with this value.
976 The arc_grow_retry value (default 5) is the number of seconds the ARC will wait before
977 trying to resume growth after a memory pressure event.
978 .sp
979 Default value: \fB0\fR.
980 .RE
981
982 .sp
983 .ne 2
984 .na
985 \fBzfs_arc_lotsfree_percent\fR (int)
986 .ad
987 .RS 12n
988 Throttle I/O when free system memory drops below this percentage of total
989 system memory.  Setting this value to 0 will disable the throttle.
990 .sp
991 Default value: \fB10\fR%.
992 .RE
993
994 .sp
995 .ne 2
996 .na
997 \fBzfs_arc_max\fR (ulong)
998 .ad
999 .RS 12n
1000 Max size of ARC in bytes.  If set to 0 then the max size of ARC is determined
1001 by the amount of system memory installed.  For Linux, 1/2 of system memory will
1002 be used as the limit.  For FreeBSD, the larger of all system memory - 1GB or
1003 5/8 of system memory will be used as the limit.  This value must be at least
1004 67108864 (64 megabytes).
1005 .sp
1006 This value can be changed dynamically with some caveats. It cannot be set back
1007 to 0 while running and reducing it below the current ARC size will not cause
1008 the ARC to shrink without memory pressure to induce shrinking.
1009 .sp
1010 Default value: \fB0\fR.
1011 .RE
1012
1013 .sp
1014 .ne 2
1015 .na
1016 \fBzfs_arc_meta_adjust_restarts\fR (ulong)
1017 .ad
1018 .RS 12n
1019 The number of restart passes to make while scanning the ARC attempting
1020 the free buffers in order to stay below the \fBzfs_arc_meta_limit\fR.
1021 This value should not need to be tuned but is available to facilitate
1022 performance analysis.
1023 .sp
1024 Default value: \fB4096\fR.
1025 .RE
1026
1027 .sp
1028 .ne 2
1029 .na
1030 \fBzfs_arc_meta_limit\fR (ulong)
1031 .ad
1032 .RS 12n
1033 The maximum allowed size in bytes that meta data buffers are allowed to
1034 consume in the ARC.  When this limit is reached meta data buffers will
1035 be reclaimed even if the overall arc_c_max has not been reached.  This
1036 value defaults to 0 which indicates that a percent which is based on
1037 \fBzfs_arc_meta_limit_percent\fR of the ARC may be used for meta data.
1038 .sp
1039 This value my be changed dynamically except that it cannot be set back to 0
1040 for a specific percent of the ARC; it must be set to an explicit value.
1041 .sp
1042 Default value: \fB0\fR.
1043 .RE
1044
1045 .sp
1046 .ne 2
1047 .na
1048 \fBzfs_arc_meta_limit_percent\fR (ulong)
1049 .ad
1050 .RS 12n
1051 Percentage of ARC buffers that can be used for meta data.
1052
1053 See also \fBzfs_arc_meta_limit\fR which serves a similar purpose but has a
1054 higher priority if set to nonzero value.
1055
1056 .sp
1057 Default value: \fB75\fR%.
1058 .RE
1059
1060 .sp
1061 .ne 2
1062 .na
1063 \fBzfs_arc_meta_min\fR (ulong)
1064 .ad
1065 .RS 12n
1066 The minimum allowed size in bytes that meta data buffers may consume in
1067 the ARC.  This value defaults to 0 which disables a floor on the amount
1068 of the ARC devoted meta data.
1069 .sp
1070 Default value: \fB0\fR.
1071 .RE
1072
1073 .sp
1074 .ne 2
1075 .na
1076 \fBzfs_arc_meta_prune\fR (int)
1077 .ad
1078 .RS 12n
1079 The number of dentries and inodes to be scanned looking for entries
1080 which can be dropped.  This may be required when the ARC reaches the
1081 \fBzfs_arc_meta_limit\fR because dentries and inodes can pin buffers
1082 in the ARC.  Increasing this value will cause to dentry and inode caches
1083 to be pruned more aggressively.  Setting this value to 0 will disable
1084 pruning the inode and dentry caches.
1085 .sp
1086 Default value: \fB10,000\fR.
1087 .RE
1088
1089 .sp
1090 .ne 2
1091 .na
1092 \fBzfs_arc_meta_strategy\fR (int)
1093 .ad
1094 .RS 12n
1095 Define the strategy for ARC meta data buffer eviction (meta reclaim strategy).
1096 A value of 0 (META_ONLY) will evict only the ARC meta data buffers.
1097 A value of 1 (BALANCED) indicates that additional data buffers may be evicted if
1098 that is required to in order to evict the required number of meta data buffers.
1099 .sp
1100 Default value: \fB1\fR.
1101 .RE
1102
1103 .sp
1104 .ne 2
1105 .na
1106 \fBzfs_arc_min\fR (ulong)
1107 .ad
1108 .RS 12n
1109 Min size of ARC in bytes. If set to 0 then arc_c_min will default to
1110 consuming the larger of 32M or 1/32 of total system memory.
1111 .sp
1112 Default value: \fB0\fR.
1113 .RE
1114
1115 .sp
1116 .ne 2
1117 .na
1118 \fBzfs_arc_min_prefetch_ms\fR (int)
1119 .ad
1120 .RS 12n
1121 Minimum time prefetched blocks are locked in the ARC, specified in ms.
1122 A value of \fB0\fR will default to 1000 ms.
1123 .sp
1124 Default value: \fB0\fR.
1125 .RE
1126
1127 .sp
1128 .ne 2
1129 .na
1130 \fBzfs_arc_min_prescient_prefetch_ms\fR (int)
1131 .ad
1132 .RS 12n
1133 Minimum time "prescient prefetched" blocks are locked in the ARC, specified
1134 in ms. These blocks are meant to be prefetched fairly aggressively ahead of
1135 the code that may use them. A value of \fB0\fR will default to 6000 ms.
1136 .sp
1137 Default value: \fB0\fR.
1138 .RE
1139
1140 .sp
1141 .ne 2
1142 .na
1143 \fBzfs_max_missing_tvds\fR (int)
1144 .ad
1145 .RS 12n
1146 Number of missing top-level vdevs which will be allowed during
1147 pool import (only in read-only mode).
1148 .sp
1149 Default value: \fB0\fR
1150 .RE
1151
1152 .sp
1153 .ne 2
1154 .na
1155 \fBzfs_max_nvlist_src_size\fR (ulong)
1156 .ad
1157 .RS 12n
1158 Maximum size in bytes allowed to be passed as zc_nvlist_src_size for ioctls on
1159 /dev/zfs. This prevents a user from causing the kernel to allocate an excessive
1160 amount of memory. When the limit is exceeded, the ioctl fails with EINVAL and a
1161 description of the error is sent to the zfs-dbgmsg log. This parameter should
1162 not need to be touched under normal circumstances. On FreeBSD, the default is
1163 based on the system limit on user wired memory. On Linux, the default is
1164 \fBKMALLOC_MAX_SIZE\fR .
1165 .sp
1166 Default value: \fB0\fR (kernel decides)
1167 .RE
1168
1169 .sp
1170 .ne 2
1171 .na
1172 \fBzfs_multilist_num_sublists\fR (int)
1173 .ad
1174 .RS 12n
1175 To allow more fine-grained locking, each ARC state contains a series
1176 of lists for both data and meta data objects.  Locking is performed at
1177 the level of these "sub-lists".  This parameters controls the number of
1178 sub-lists per ARC state, and also applies to other uses of the
1179 multilist data structure.
1180 .sp
1181 Default value: \fB4\fR or the number of online CPUs, whichever is greater
1182 .RE
1183
1184 .sp
1185 .ne 2
1186 .na
1187 \fBzfs_arc_overflow_shift\fR (int)
1188 .ad
1189 .RS 12n
1190 The ARC size is considered to be overflowing if it exceeds the current
1191 ARC target size (arc_c) by a threshold determined by this parameter.
1192 The threshold is calculated as a fraction of arc_c using the formula
1193 "arc_c >> \fBzfs_arc_overflow_shift\fR".
1194
1195 The default value of 8 causes the ARC to be considered to be overflowing
1196 if it exceeds the target size by 1/256th (0.3%) of the target size.
1197
1198 When the ARC is overflowing, new buffer allocations are stalled until
1199 the reclaim thread catches up and the overflow condition no longer exists.
1200 .sp
1201 Default value: \fB8\fR.
1202 .RE
1203
1204 .sp
1205 .ne 2
1206 .na
1207
1208 \fBzfs_arc_p_min_shift\fR (int)
1209 .ad
1210 .RS 12n
1211 If set to a non zero value, this will update arc_p_min_shift (default 4)
1212 with the new value.
1213 arc_p_min_shift is used to shift of arc_c for calculating both min and max
1214 max arc_p
1215 .sp
1216 Default value: \fB0\fR.
1217 .RE
1218
1219 .sp
1220 .ne 2
1221 .na
1222 \fBzfs_arc_p_dampener_disable\fR (int)
1223 .ad
1224 .RS 12n
1225 Disable arc_p adapt dampener
1226 .sp
1227 Use \fB1\fR for yes (default) and \fB0\fR to disable.
1228 .RE
1229
1230 .sp
1231 .ne 2
1232 .na
1233 \fBzfs_arc_shrink_shift\fR (int)
1234 .ad
1235 .RS 12n
1236 If set to a non zero value, this will update arc_shrink_shift (default 7)
1237 with the new value.
1238 .sp
1239 Default value: \fB0\fR.
1240 .RE
1241
1242 .sp
1243 .ne 2
1244 .na
1245 \fBzfs_arc_pc_percent\fR (uint)
1246 .ad
1247 .RS 12n
1248 Percent of pagecache to reclaim arc to
1249
1250 This tunable allows ZFS arc to play more nicely with the kernel's LRU
1251 pagecache. It can guarantee that the ARC size won't collapse under scanning
1252 pressure on the pagecache, yet still allows arc to be reclaimed down to
1253 zfs_arc_min if necessary. This value is specified as percent of pagecache
1254 size (as measured by NR_FILE_PAGES) where that percent may exceed 100. This
1255 only operates during memory pressure/reclaim.
1256 .sp
1257 Default value: \fB0\fR% (disabled).
1258 .RE
1259
1260 .sp
1261 .ne 2
1262 .na
1263 \fBzfs_arc_shrinker_limit\fR (int)
1264 .ad
1265 .RS 12n
1266 This is a limit on how many pages the ARC shrinker makes available for
1267 eviction in response to one page allocation attempt.  Note that in
1268 practice, the kernel's shrinker can ask us to evict up to about 4x this
1269 for one allocation attempt.
1270 .sp
1271 The default limit of 10,000 (in practice, 160MB per allocation attempt with
1272 4K pages) limits the amount of time spent attempting to reclaim ARC memory to
1273 less than 100ms per allocation attempt, even with a small average compressed
1274 block size of ~8KB.
1275 .sp
1276 The parameter can be set to 0 (zero) to disable the limit.
1277 .sp
1278 This parameter only applies on Linux.
1279 .sp
1280 Default value: \fB10,000\fR.
1281 .RE
1282
1283 .sp
1284 .ne 2
1285 .na
1286 \fBzfs_arc_sys_free\fR (ulong)
1287 .ad
1288 .RS 12n
1289 The target number of bytes the ARC should leave as free memory on the system.
1290 Defaults to the larger of 1/64 of physical memory or 512K.  Setting this
1291 option to a non-zero value will override the default.
1292 .sp
1293 Default value: \fB0\fR.
1294 .RE
1295
1296 .sp
1297 .ne 2
1298 .na
1299 \fBzfs_autoimport_disable\fR (int)
1300 .ad
1301 .RS 12n
1302 Disable pool import at module load by ignoring the cache file (typically \fB/etc/zfs/zpool.cache\fR).
1303 .sp
1304 Use \fB1\fR for yes (default) and \fB0\fR for no.
1305 .RE
1306
1307 .sp
1308 .ne 2
1309 .na
1310 \fBzfs_checksum_events_per_second\fR (uint)
1311 .ad
1312 .RS 12n
1313 Rate limit checksum events to this many per second.  Note that this should
1314 not be set below the zed thresholds (currently 10 checksums over 10 sec)
1315 or else zed may not trigger any action.
1316 .sp
1317 Default value: 20
1318 .RE
1319
1320 .sp
1321 .ne 2
1322 .na
1323 \fBzfs_commit_timeout_pct\fR (int)
1324 .ad
1325 .RS 12n
1326 This controls the amount of time that a ZIL block (lwb) will remain "open"
1327 when it isn't "full", and it has a thread waiting for it to be committed to
1328 stable storage.  The timeout is scaled based on a percentage of the last lwb
1329 latency to avoid significantly impacting the latency of each individual
1330 transaction record (itx).
1331 .sp
1332 Default value: \fB5\fR%.
1333 .RE
1334
1335 .sp
1336 .ne 2
1337 .na
1338 \fBzfs_condense_indirect_commit_entry_delay_ms\fR (int)
1339 .ad
1340 .RS 12n
1341 Vdev indirection layer (used for device removal) sleeps for this many
1342 milliseconds during mapping generation. Intended for use with the test suite
1343 to throttle vdev removal speed.
1344 .sp
1345 Default value: \fB0\fR (no throttle).
1346 .RE
1347
1348 .sp
1349 .ne 2
1350 .na
1351 \fBzfs_condense_indirect_vdevs_enable\fR (int)
1352 .ad
1353 .RS 12n
1354 Enable condensing indirect vdev mappings.  When set to a non-zero value,
1355 attempt to condense indirect vdev mappings if the mapping uses more than
1356 \fBzfs_condense_min_mapping_bytes\fR bytes of memory and if the obsolete
1357 space map object uses more than \fBzfs_condense_max_obsolete_bytes\fR
1358 bytes on-disk.  The condensing process is an attempt to save memory by
1359 removing obsolete mappings.
1360 .sp
1361 Default value: \fB1\fR.
1362 .RE
1363
1364 .sp
1365 .ne 2
1366 .na
1367 \fBzfs_condense_max_obsolete_bytes\fR (ulong)
1368 .ad
1369 .RS 12n
1370 Only attempt to condense indirect vdev mappings if the on-disk size
1371 of the obsolete space map object is greater than this number of bytes
1372 (see \fBfBzfs_condense_indirect_vdevs_enable\fR).
1373 .sp
1374 Default value: \fB1,073,741,824\fR.
1375 .RE
1376
1377 .sp
1378 .ne 2
1379 .na
1380 \fBzfs_condense_min_mapping_bytes\fR (ulong)
1381 .ad
1382 .RS 12n
1383 Minimum size vdev mapping to attempt to condense (see
1384 \fBzfs_condense_indirect_vdevs_enable\fR).
1385 .sp
1386 Default value: \fB131,072\fR.
1387 .RE
1388
1389 .sp
1390 .ne 2
1391 .na
1392 \fBzfs_dbgmsg_enable\fR (int)
1393 .ad
1394 .RS 12n
1395 Internally ZFS keeps a small log to facilitate debugging.  By default the log
1396 is disabled, to enable it set this option to 1.  The contents of the log can
1397 be accessed by reading the /proc/spl/kstat/zfs/dbgmsg file.  Writing 0 to
1398 this proc file clears the log.
1399 .sp
1400 Default value: \fB0\fR.
1401 .RE
1402
1403 .sp
1404 .ne 2
1405 .na
1406 \fBzfs_dbgmsg_maxsize\fR (int)
1407 .ad
1408 .RS 12n
1409 The maximum size in bytes of the internal ZFS debug log.
1410 .sp
1411 Default value: \fB4M\fR.
1412 .RE
1413
1414 .sp
1415 .ne 2
1416 .na
1417 \fBzfs_dbuf_state_index\fR (int)
1418 .ad
1419 .RS 12n
1420 This feature is currently unused. It is normally used for controlling what
1421 reporting is available under /proc/spl/kstat/zfs.
1422 .sp
1423 Default value: \fB0\fR.
1424 .RE
1425
1426 .sp
1427 .ne 2
1428 .na
1429 \fBzfs_deadman_enabled\fR (int)
1430 .ad
1431 .RS 12n
1432 When a pool sync operation takes longer than \fBzfs_deadman_synctime_ms\fR
1433 milliseconds, or when an individual I/O takes longer than
1434 \fBzfs_deadman_ziotime_ms\fR milliseconds, then the operation is considered to
1435 be "hung".  If \fBzfs_deadman_enabled\fR is set then the deadman behavior is
1436 invoked as described by the \fBzfs_deadman_failmode\fR module option.
1437 By default the deadman is enabled and configured to \fBwait\fR which results
1438 in "hung" I/Os only being logged.  The deadman is automatically disabled
1439 when a pool gets suspended.
1440 .sp
1441 Default value: \fB1\fR.
1442 .RE
1443
1444 .sp
1445 .ne 2
1446 .na
1447 \fBzfs_deadman_failmode\fR (charp)
1448 .ad
1449 .RS 12n
1450 Controls the failure behavior when the deadman detects a "hung" I/O.  Valid
1451 values are \fBwait\fR, \fBcontinue\fR, and \fBpanic\fR.
1452 .sp
1453 \fBwait\fR - Wait for a "hung" I/O to complete.  For each "hung" I/O a
1454 "deadman" event will be posted describing that I/O.
1455 .sp
1456 \fBcontinue\fR - Attempt to recover from a "hung" I/O by re-dispatching it
1457 to the I/O pipeline if possible.
1458 .sp
1459 \fBpanic\fR - Panic the system.  This can be used to facilitate an automatic
1460 fail-over to a properly configured fail-over partner.
1461 .sp
1462 Default value: \fBwait\fR.
1463 .RE
1464
1465 .sp
1466 .ne 2
1467 .na
1468 \fBzfs_deadman_checktime_ms\fR (int)
1469 .ad
1470 .RS 12n
1471 Check time in milliseconds. This defines the frequency at which we check
1472 for hung I/O and potentially invoke the \fBzfs_deadman_failmode\fR behavior.
1473 .sp
1474 Default value: \fB60,000\fR.
1475 .RE
1476
1477 .sp
1478 .ne 2
1479 .na
1480 \fBzfs_deadman_synctime_ms\fR (ulong)
1481 .ad
1482 .RS 12n
1483 Interval in milliseconds after which the deadman is triggered and also
1484 the interval after which a pool sync operation is considered to be "hung".
1485 Once this limit is exceeded the deadman will be invoked every
1486 \fBzfs_deadman_checktime_ms\fR milliseconds until the pool sync completes.
1487 .sp
1488 Default value: \fB600,000\fR.
1489 .RE
1490
1491 .sp
1492 .ne 2
1493 .na
1494 \fBzfs_deadman_ziotime_ms\fR (ulong)
1495 .ad
1496 .RS 12n
1497 Interval in milliseconds after which the deadman is triggered and an
1498 individual I/O operation is considered to be "hung".  As long as the I/O
1499 remains "hung" the deadman will be invoked every \fBzfs_deadman_checktime_ms\fR
1500 milliseconds until the I/O completes.
1501 .sp
1502 Default value: \fB300,000\fR.
1503 .RE
1504
1505 .sp
1506 .ne 2
1507 .na
1508 \fBzfs_dedup_prefetch\fR (int)
1509 .ad
1510 .RS 12n
1511 Enable prefetching dedup-ed blks
1512 .sp
1513 Use \fB1\fR for yes and \fB0\fR to disable (default).
1514 .RE
1515
1516 .sp
1517 .ne 2
1518 .na
1519 \fBzfs_delay_min_dirty_percent\fR (int)
1520 .ad
1521 .RS 12n
1522 Start to delay each transaction once there is this amount of dirty data,
1523 expressed as a percentage of \fBzfs_dirty_data_max\fR.
1524 This value should be >= zfs_vdev_async_write_active_max_dirty_percent.
1525 See the section "ZFS TRANSACTION DELAY".
1526 .sp
1527 Default value: \fB60\fR%.
1528 .RE
1529
1530 .sp
1531 .ne 2
1532 .na
1533 \fBzfs_delay_scale\fR (int)
1534 .ad
1535 .RS 12n
1536 This controls how quickly the transaction delay approaches infinity.
1537 Larger values cause longer delays for a given amount of dirty data.
1538 .sp
1539 For the smoothest delay, this value should be about 1 billion divided
1540 by the maximum number of operations per second.  This will smoothly
1541 handle between 10x and 1/10th this number.
1542 .sp
1543 See the section "ZFS TRANSACTION DELAY".
1544 .sp
1545 Note: \fBzfs_delay_scale\fR * \fBzfs_dirty_data_max\fR must be < 2^64.
1546 .sp
1547 Default value: \fB500,000\fR.
1548 .RE
1549
1550 .sp
1551 .ne 2
1552 .na
1553 \fBzfs_disable_ivset_guid_check\fR (int)
1554 .ad
1555 .RS 12n
1556 Disables requirement for IVset guids to be present and match when doing a raw
1557 receive of encrypted datasets. Intended for users whose pools were created with
1558 ZFS on Linux pre-release versions and now have compatibility issues.
1559 .sp
1560 Default value: \fB0\fR.
1561 .RE
1562
1563 .sp
1564 .ne 2
1565 .na
1566 \fBzfs_key_max_salt_uses\fR (ulong)
1567 .ad
1568 .RS 12n
1569 Maximum number of uses of a single salt value before generating a new one for
1570 encrypted datasets. The default value is also the maximum that will be
1571 accepted.
1572 .sp
1573 Default value: \fB400,000,000\fR.
1574 .RE
1575
1576 .sp
1577 .ne 2
1578 .na
1579 \fBzfs_object_mutex_size\fR (uint)
1580 .ad
1581 .RS 12n
1582 Size of the znode hashtable used for holds.
1583
1584 Due to the need to hold locks on objects that may not exist yet, kernel mutexes
1585 are not created per-object and instead a hashtable is used where collisions
1586 will result in objects waiting when there is not actually contention on the
1587 same object.
1588 .sp
1589 Default value: \fB64\fR.
1590 .RE
1591
1592 .sp
1593 .ne 2
1594 .na
1595 \fBzfs_slow_io_events_per_second\fR (int)
1596 .ad
1597 .RS 12n
1598 Rate limit delay zevents (which report slow I/Os) to this many per second.
1599 .sp
1600 Default value: 20
1601 .RE
1602
1603 .sp
1604 .ne 2
1605 .na
1606 \fBzfs_unflushed_max_mem_amt\fR (ulong)
1607 .ad
1608 .RS 12n
1609 Upper-bound limit for unflushed metadata changes to be held by the
1610 log spacemap in memory (in bytes).
1611 .sp
1612 Default value: \fB1,073,741,824\fR (1GB).
1613 .RE
1614
1615 .sp
1616 .ne 2
1617 .na
1618 \fBzfs_unflushed_max_mem_ppm\fR (ulong)
1619 .ad
1620 .RS 12n
1621 Percentage of the overall system memory that ZFS allows to be used
1622 for unflushed metadata changes by the log spacemap.
1623 (value is calculated over 1000000 for finer granularity).
1624 .sp
1625 Default value: \fB1000\fR (which is divided by 1000000, resulting in
1626 the limit to be \fB0.1\fR% of memory)
1627 .RE
1628
1629 .sp
1630 .ne 2
1631 .na
1632 \fBzfs_unflushed_log_block_max\fR (ulong)
1633 .ad
1634 .RS 12n
1635 Describes the maximum number of log spacemap blocks allowed for each pool.
1636 The default value of 262144 means that the space in all the log spacemaps
1637 can add up to no more than 262144 blocks (which means 32GB of logical
1638 space before compression and ditto blocks, assuming that blocksize is
1639 128k).
1640 .sp
1641 This tunable is important because it involves a trade-off between import
1642 time after an unclean export and the frequency of flushing metaslabs.
1643 The higher this number is, the more log blocks we allow when the pool is
1644 active which means that we flush metaslabs less often and thus decrease
1645 the number of I/Os for spacemap updates per TXG.
1646 At the same time though, that means that in the event of an unclean export,
1647 there will be more log spacemap blocks for us to read, inducing overhead
1648 in the import time of the pool.
1649 The lower the number, the amount of flushing increases destroying log
1650 blocks quicker as they become obsolete faster, which leaves less blocks
1651 to be read during import time after a crash.
1652 .sp
1653 Each log spacemap block existing during pool import leads to approximately
1654 one extra logical I/O issued.
1655 This is the reason why this tunable is exposed in terms of blocks rather
1656 than space used.
1657 .sp
1658 Default value: \fB262144\fR (256K).
1659 .RE
1660
1661 .sp
1662 .ne 2
1663 .na
1664 \fBzfs_unflushed_log_block_min\fR (ulong)
1665 .ad
1666 .RS 12n
1667 If the number of metaslabs is small and our incoming rate is high, we
1668 could get into a situation that we are flushing all our metaslabs every
1669 TXG.
1670 Thus we always allow at least this many log blocks.
1671 .sp
1672 Default value: \fB1000\fR.
1673 .RE
1674
1675 .sp
1676 .ne 2
1677 .na
1678 \fBzfs_unflushed_log_block_pct\fR (ulong)
1679 .ad
1680 .RS 12n
1681 Tunable used to determine the number of blocks that can be used for
1682 the spacemap log, expressed as a percentage of the total number of
1683 metaslabs in the pool.
1684 .sp
1685 Default value: \fB400\fR (read as \fB400\fR% - meaning that the number
1686 of log spacemap blocks are capped at 4 times the number of
1687 metaslabs in the pool).
1688 .RE
1689
1690 .sp
1691 .ne 2
1692 .na
1693 \fBzfs_unlink_suspend_progress\fR (uint)
1694 .ad
1695 .RS 12n
1696 When enabled, files will not be asynchronously removed from the list of pending
1697 unlinks and the space they consume will be leaked. Once this option has been
1698 disabled and the dataset is remounted, the pending unlinks will be processed
1699 and the freed space returned to the pool.
1700 This option is used by the test suite to facilitate testing.
1701 .sp
1702 Uses \fB0\fR (default) to allow progress and \fB1\fR to pause progress.
1703 .RE
1704
1705 .sp
1706 .ne 2
1707 .na
1708 \fBzfs_delete_blocks\fR (ulong)
1709 .ad
1710 .RS 12n
1711 This is the used to define a large file for the purposes of delete.  Files
1712 containing more than \fBzfs_delete_blocks\fR will be deleted asynchronously
1713 while smaller files are deleted synchronously.  Decreasing this value will
1714 reduce the time spent in an unlink(2) system call at the expense of a longer
1715 delay before the freed space is available.
1716 .sp
1717 Default value: \fB20,480\fR.
1718 .RE
1719
1720 .sp
1721 .ne 2
1722 .na
1723 \fBzfs_dirty_data_max\fR (int)
1724 .ad
1725 .RS 12n
1726 Determines the dirty space limit in bytes.  Once this limit is exceeded, new
1727 writes are halted until space frees up. This parameter takes precedence
1728 over \fBzfs_dirty_data_max_percent\fR.
1729 See the section "ZFS TRANSACTION DELAY".
1730 .sp
1731 Default value: \fB10\fR% of physical RAM, capped at \fBzfs_dirty_data_max_max\fR.
1732 .RE
1733
1734 .sp
1735 .ne 2
1736 .na
1737 \fBzfs_dirty_data_max_max\fR (int)
1738 .ad
1739 .RS 12n
1740 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed in bytes.
1741 This limit is only enforced at module load time, and will be ignored if
1742 \fBzfs_dirty_data_max\fR is later changed.  This parameter takes
1743 precedence over \fBzfs_dirty_data_max_max_percent\fR. See the section
1744 "ZFS TRANSACTION DELAY".
1745 .sp
1746 Default value: \fB25\fR% of physical RAM.
1747 .RE
1748
1749 .sp
1750 .ne 2
1751 .na
1752 \fBzfs_dirty_data_max_max_percent\fR (int)
1753 .ad
1754 .RS 12n
1755 Maximum allowable value of \fBzfs_dirty_data_max\fR, expressed as a
1756 percentage of physical RAM.  This limit is only enforced at module load
1757 time, and will be ignored if \fBzfs_dirty_data_max\fR is later changed.
1758 The parameter \fBzfs_dirty_data_max_max\fR takes precedence over this
1759 one. See the section "ZFS TRANSACTION DELAY".
1760 .sp
1761 Default value: \fB25\fR%.
1762 .RE
1763
1764 .sp
1765 .ne 2
1766 .na
1767 \fBzfs_dirty_data_max_percent\fR (int)
1768 .ad
1769 .RS 12n
1770 Determines the dirty space limit, expressed as a percentage of all
1771 memory.  Once this limit is exceeded, new writes are halted until space frees
1772 up.  The parameter \fBzfs_dirty_data_max\fR takes precedence over this
1773 one.  See the section "ZFS TRANSACTION DELAY".
1774 .sp
1775 Default value: \fB10\fR%, subject to \fBzfs_dirty_data_max_max\fR.
1776 .RE
1777
1778 .sp
1779 .ne 2
1780 .na
1781 \fBzfs_dirty_data_sync_percent\fR (int)
1782 .ad
1783 .RS 12n
1784 Start syncing out a transaction group if there's at least this much dirty data
1785 as a percentage of \fBzfs_dirty_data_max\fR.  This should be less than
1786 \fBzfs_vdev_async_write_active_min_dirty_percent\fR.
1787 .sp
1788 Default value: \fB20\fR% of \fBzfs_dirty_data_max\fR.
1789 .RE
1790
1791 .sp
1792 .ne 2
1793 .na
1794 \fBzfs_fallocate_reserve_percent\fR (uint)
1795 .ad
1796 .RS 12n
1797 Since ZFS is a copy-on-write filesystem with snapshots, blocks cannot be
1798 preallocated for a file in order to guarantee that later writes will not
1799 run out of space.  Instead, fallocate() space preallocation only checks
1800 that sufficient space is currently available in the pool or the user's
1801 project quota allocation, and then creates a sparse file of the requested
1802 size. The requested space is multiplied by \fBzfs_fallocate_reserve_percent\fR
1803 to allow additional space for indirect blocks and other internal metadata.
1804 Setting this value to 0 disables support for fallocate(2) and returns
1805 EOPNOTSUPP for fallocate() space preallocation again.
1806 .sp
1807 Default value: \fB110\fR%
1808 .RE
1809
1810 .sp
1811 .ne 2
1812 .na
1813 \fBzfs_fletcher_4_impl\fR (string)
1814 .ad
1815 .RS 12n
1816 Select a fletcher 4 implementation.
1817 .sp
1818 Supported selectors are: \fBfastest\fR, \fBscalar\fR, \fBsse2\fR, \fBssse3\fR,
1819 \fBavx2\fR, \fBavx512f\fR, \fBavx512bw\fR, and \fBaarch64_neon\fR.
1820 All of the selectors except \fBfastest\fR and \fBscalar\fR require instruction
1821 set extensions to be available and will only appear if ZFS detects that they are
1822 present at runtime. If multiple implementations of fletcher 4 are available,
1823 the \fBfastest\fR will be chosen using a micro benchmark. Selecting \fBscalar\fR
1824 results in the original, CPU based calculation, being used. Selecting any option
1825 other than \fBfastest\fR and \fBscalar\fR results in vector instructions from
1826 the respective CPU instruction set being used.
1827 .sp
1828 Default value: \fBfastest\fR.
1829 .RE
1830
1831 .sp
1832 .ne 2
1833 .na
1834 \fBzfs_free_bpobj_enabled\fR (int)
1835 .ad
1836 .RS 12n
1837 Enable/disable the processing of the free_bpobj object.
1838 .sp
1839 Default value: \fB1\fR.
1840 .RE
1841
1842 .sp
1843 .ne 2
1844 .na
1845 \fBzfs_async_block_max_blocks\fR (ulong)
1846 .ad
1847 .RS 12n
1848 Maximum number of blocks freed in a single txg.
1849 .sp
1850 Default value: \fBULONG_MAX\fR (unlimited).
1851 .RE
1852
1853 .sp
1854 .ne 2
1855 .na
1856 \fBzfs_max_async_dedup_frees\fR (ulong)
1857 .ad
1858 .RS 12n
1859 Maximum number of dedup blocks freed in a single txg.
1860 .sp
1861 Default value: \fB100,000\fR.
1862 .RE
1863
1864 .sp
1865 .ne 2
1866 .na
1867 \fBzfs_override_estimate_recordsize\fR (ulong)
1868 .ad
1869 .RS 12n
1870 Record size calculation override for zfs send estimates.
1871 .sp
1872 Default value: \fB0\fR.
1873 .RE
1874
1875 .sp
1876 .ne 2
1877 .na
1878 \fBzfs_vdev_async_read_max_active\fR (int)
1879 .ad
1880 .RS 12n
1881 Maximum asynchronous read I/Os active to each device.
1882 See the section "ZFS I/O SCHEDULER".
1883 .sp
1884 Default value: \fB3\fR.
1885 .RE
1886
1887 .sp
1888 .ne 2
1889 .na
1890 \fBzfs_vdev_async_read_min_active\fR (int)
1891 .ad
1892 .RS 12n
1893 Minimum asynchronous read I/Os active to each device.
1894 See the section "ZFS I/O SCHEDULER".
1895 .sp
1896 Default value: \fB1\fR.
1897 .RE
1898
1899 .sp
1900 .ne 2
1901 .na
1902 \fBzfs_vdev_async_write_active_max_dirty_percent\fR (int)
1903 .ad
1904 .RS 12n
1905 When the pool has more than
1906 \fBzfs_vdev_async_write_active_max_dirty_percent\fR dirty data, use
1907 \fBzfs_vdev_async_write_max_active\fR to limit active async writes.  If
1908 the dirty data is between min and max, the active I/O limit is linearly
1909 interpolated. See the section "ZFS I/O SCHEDULER".
1910 .sp
1911 Default value: \fB60\fR%.
1912 .RE
1913
1914 .sp
1915 .ne 2
1916 .na
1917 \fBzfs_vdev_async_write_active_min_dirty_percent\fR (int)
1918 .ad
1919 .RS 12n
1920 When the pool has less than
1921 \fBzfs_vdev_async_write_active_min_dirty_percent\fR dirty data, use
1922 \fBzfs_vdev_async_write_min_active\fR to limit active async writes.  If
1923 the dirty data is between min and max, the active I/O limit is linearly
1924 interpolated. See the section "ZFS I/O SCHEDULER".
1925 .sp
1926 Default value: \fB30\fR%.
1927 .RE
1928
1929 .sp
1930 .ne 2
1931 .na
1932 \fBzfs_vdev_async_write_max_active\fR (int)
1933 .ad
1934 .RS 12n
1935 Maximum asynchronous write I/Os active to each device.
1936 See the section "ZFS I/O SCHEDULER".
1937 .sp
1938 Default value: \fB10\fR.
1939 .RE
1940
1941 .sp
1942 .ne 2
1943 .na
1944 \fBzfs_vdev_async_write_min_active\fR (int)
1945 .ad
1946 .RS 12n
1947 Minimum asynchronous write I/Os active to each device.
1948 See the section "ZFS I/O SCHEDULER".
1949 .sp
1950 Lower values are associated with better latency on rotational media but poorer
1951 resilver performance. The default value of 2 was chosen as a compromise. A
1952 value of 3 has been shown to improve resilver performance further at a cost of
1953 further increasing latency.
1954 .sp
1955 Default value: \fB2\fR.
1956 .RE
1957
1958 .sp
1959 .ne 2
1960 .na
1961 \fBzfs_vdev_initializing_max_active\fR (int)
1962 .ad
1963 .RS 12n
1964 Maximum initializing I/Os active to each device.
1965 See the section "ZFS I/O SCHEDULER".
1966 .sp
1967 Default value: \fB1\fR.
1968 .RE
1969
1970 .sp
1971 .ne 2
1972 .na
1973 \fBzfs_vdev_initializing_min_active\fR (int)
1974 .ad
1975 .RS 12n
1976 Minimum initializing I/Os active to each device.
1977 See the section "ZFS I/O SCHEDULER".
1978 .sp
1979 Default value: \fB1\fR.
1980 .RE
1981
1982 .sp
1983 .ne 2
1984 .na
1985 \fBzfs_vdev_max_active\fR (int)
1986 .ad
1987 .RS 12n
1988 The maximum number of I/Os active to each device.  Ideally, this will be >=
1989 the sum of each queue's max_active.  It must be at least the sum of each
1990 queue's min_active.  See the section "ZFS I/O SCHEDULER".
1991 .sp
1992 Default value: \fB1,000\fR.
1993 .RE
1994
1995 .sp
1996 .ne 2
1997 .na
1998 \fBzfs_vdev_rebuild_max_active\fR (int)
1999 .ad
2000 .RS 12n
2001 Maximum sequential resilver I/Os active to each device.
2002 See the section "ZFS I/O SCHEDULER".
2003 .sp
2004 Default value: \fB3\fR.
2005 .RE
2006
2007 .sp
2008 .ne 2
2009 .na
2010 \fBzfs_vdev_rebuild_min_active\fR (int)
2011 .ad
2012 .RS 12n
2013 Minimum sequential resilver I/Os active to each device.
2014 See the section "ZFS I/O SCHEDULER".
2015 .sp
2016 Default value: \fB1\fR.
2017 .RE
2018
2019 .sp
2020 .ne 2
2021 .na
2022 \fBzfs_vdev_removal_max_active\fR (int)
2023 .ad
2024 .RS 12n
2025 Maximum removal I/Os active to each device.
2026 See the section "ZFS I/O SCHEDULER".
2027 .sp
2028 Default value: \fB2\fR.
2029 .RE
2030
2031 .sp
2032 .ne 2
2033 .na
2034 \fBzfs_vdev_removal_min_active\fR (int)
2035 .ad
2036 .RS 12n
2037 Minimum removal I/Os active to each device.
2038 See the section "ZFS I/O SCHEDULER".
2039 .sp
2040 Default value: \fB1\fR.
2041 .RE
2042
2043 .sp
2044 .ne 2
2045 .na
2046 \fBzfs_vdev_scrub_max_active\fR (int)
2047 .ad
2048 .RS 12n
2049 Maximum scrub I/Os active to each device.
2050 See the section "ZFS I/O SCHEDULER".
2051 .sp
2052 Default value: \fB2\fR.
2053 .RE
2054
2055 .sp
2056 .ne 2
2057 .na
2058 \fBzfs_vdev_scrub_min_active\fR (int)
2059 .ad
2060 .RS 12n
2061 Minimum scrub I/Os active to each device.
2062 See the section "ZFS I/O SCHEDULER".
2063 .sp
2064 Default value: \fB1\fR.
2065 .RE
2066
2067 .sp
2068 .ne 2
2069 .na
2070 \fBzfs_vdev_sync_read_max_active\fR (int)
2071 .ad
2072 .RS 12n
2073 Maximum synchronous read I/Os active to each device.
2074 See the section "ZFS I/O SCHEDULER".
2075 .sp
2076 Default value: \fB10\fR.
2077 .RE
2078
2079 .sp
2080 .ne 2
2081 .na
2082 \fBzfs_vdev_sync_read_min_active\fR (int)
2083 .ad
2084 .RS 12n
2085 Minimum synchronous read I/Os active to each device.
2086 See the section "ZFS I/O SCHEDULER".
2087 .sp
2088 Default value: \fB10\fR.
2089 .RE
2090
2091 .sp
2092 .ne 2
2093 .na
2094 \fBzfs_vdev_sync_write_max_active\fR (int)
2095 .ad
2096 .RS 12n
2097 Maximum synchronous write I/Os active to each device.
2098 See the section "ZFS I/O SCHEDULER".
2099 .sp
2100 Default value: \fB10\fR.
2101 .RE
2102
2103 .sp
2104 .ne 2
2105 .na
2106 \fBzfs_vdev_sync_write_min_active\fR (int)
2107 .ad
2108 .RS 12n
2109 Minimum synchronous write I/Os active to each device.
2110 See the section "ZFS I/O SCHEDULER".
2111 .sp
2112 Default value: \fB10\fR.
2113 .RE
2114
2115 .sp
2116 .ne 2
2117 .na
2118 \fBzfs_vdev_trim_max_active\fR (int)
2119 .ad
2120 .RS 12n
2121 Maximum trim/discard I/Os active to each device.
2122 See the section "ZFS I/O SCHEDULER".
2123 .sp
2124 Default value: \fB2\fR.
2125 .RE
2126
2127 .sp
2128 .ne 2
2129 .na
2130 \fBzfs_vdev_trim_min_active\fR (int)
2131 .ad
2132 .RS 12n
2133 Minimum trim/discard I/Os active to each device.
2134 See the section "ZFS I/O SCHEDULER".
2135 .sp
2136 Default value: \fB1\fR.
2137 .RE
2138
2139 .sp
2140 .ne 2
2141 .na
2142 \fBzfs_vdev_queue_depth_pct\fR (int)
2143 .ad
2144 .RS 12n
2145 Maximum number of queued allocations per top-level vdev expressed as
2146 a percentage of \fBzfs_vdev_async_write_max_active\fR which allows the
2147 system to detect devices that are more capable of handling allocations
2148 and to allocate more blocks to those devices.  It allows for dynamic
2149 allocation distribution when devices are imbalanced as fuller devices
2150 will tend to be slower than empty devices.
2151
2152 See also \fBzio_dva_throttle_enabled\fR.
2153 .sp
2154 Default value: \fB1000\fR%.
2155 .RE
2156
2157 .sp
2158 .ne 2
2159 .na
2160 \fBzfs_expire_snapshot\fR (int)
2161 .ad
2162 .RS 12n
2163 Seconds to expire .zfs/snapshot
2164 .sp
2165 Default value: \fB300\fR.
2166 .RE
2167
2168 .sp
2169 .ne 2
2170 .na
2171 \fBzfs_admin_snapshot\fR (int)
2172 .ad
2173 .RS 12n
2174 Allow the creation, removal, or renaming of entries in the .zfs/snapshot
2175 directory to cause the creation, destruction, or renaming of snapshots.
2176 When enabled this functionality works both locally and over NFS exports
2177 which have the 'no_root_squash' option set. This functionality is disabled
2178 by default.
2179 .sp
2180 Use \fB1\fR for yes and \fB0\fR for no (default).
2181 .RE
2182
2183 .sp
2184 .ne 2
2185 .na
2186 \fBzfs_flags\fR (int)
2187 .ad
2188 .RS 12n
2189 Set additional debugging flags. The following flags may be bitwise-or'd
2190 together.
2191 .sp
2192 .TS
2193 box;
2194 rB lB
2195 lB lB
2196 r l.
2197 Value   Symbolic Name
2198         Description
2199 _
2200 1       ZFS_DEBUG_DPRINTF
2201         Enable dprintf entries in the debug log.
2202 _
2203 2       ZFS_DEBUG_DBUF_VERIFY *
2204         Enable extra dbuf verifications.
2205 _
2206 4       ZFS_DEBUG_DNODE_VERIFY *
2207         Enable extra dnode verifications.
2208 _
2209 8       ZFS_DEBUG_SNAPNAMES
2210         Enable snapshot name verification.
2211 _
2212 16      ZFS_DEBUG_MODIFY
2213         Check for illegally modified ARC buffers.
2214 _
2215 64      ZFS_DEBUG_ZIO_FREE
2216         Enable verification of block frees.
2217 _
2218 128     ZFS_DEBUG_HISTOGRAM_VERIFY
2219         Enable extra spacemap histogram verifications.
2220 _
2221 256     ZFS_DEBUG_METASLAB_VERIFY
2222         Verify space accounting on disk matches in-core range_trees.
2223 _
2224 512     ZFS_DEBUG_SET_ERROR
2225         Enable SET_ERROR and dprintf entries in the debug log.
2226 _
2227 1024    ZFS_DEBUG_INDIRECT_REMAP
2228         Verify split blocks created by device removal.
2229 _
2230 2048    ZFS_DEBUG_TRIM
2231         Verify TRIM ranges are always within the allocatable range tree.
2232 _
2233 4096    ZFS_DEBUG_LOG_SPACEMAP
2234         Verify that the log summary is consistent with the spacemap log
2235         and enable zfs_dbgmsgs for metaslab loading and flushing.
2236 .TE
2237 .sp
2238 * Requires debug build.
2239 .sp
2240 Default value: \fB0\fR.
2241 .RE
2242
2243 .sp
2244 .ne 2
2245 .na
2246 \fBzfs_free_leak_on_eio\fR (int)
2247 .ad
2248 .RS 12n
2249 If destroy encounters an EIO while reading metadata (e.g. indirect
2250 blocks), space referenced by the missing metadata can not be freed.
2251 Normally this causes the background destroy to become "stalled", as
2252 it is unable to make forward progress.  While in this stalled state,
2253 all remaining space to free from the error-encountering filesystem is
2254 "temporarily leaked".  Set this flag to cause it to ignore the EIO,
2255 permanently leak the space from indirect blocks that can not be read,
2256 and continue to free everything else that it can.
2257
2258 The default, "stalling" behavior is useful if the storage partially
2259 fails (i.e. some but not all i/os fail), and then later recovers.  In
2260 this case, we will be able to continue pool operations while it is
2261 partially failed, and when it recovers, we can continue to free the
2262 space, with no leaks.  However, note that this case is actually
2263 fairly rare.
2264
2265 Typically pools either (a) fail completely (but perhaps temporarily,
2266 e.g. a top-level vdev going offline), or (b) have localized,
2267 permanent errors (e.g. disk returns the wrong data due to bit flip or
2268 firmware bug).  In case (a), this setting does not matter because the
2269 pool will be suspended and the sync thread will not be able to make
2270 forward progress regardless.  In case (b), because the error is
2271 permanent, the best we can do is leak the minimum amount of space,
2272 which is what setting this flag will do.  Therefore, it is reasonable
2273 for this flag to normally be set, but we chose the more conservative
2274 approach of not setting it, so that there is no possibility of
2275 leaking space in the "partial temporary" failure case.
2276 .sp
2277 Default value: \fB0\fR.
2278 .RE
2279
2280 .sp
2281 .ne 2
2282 .na
2283 \fBzfs_free_min_time_ms\fR (int)
2284 .ad
2285 .RS 12n
2286 During a \fBzfs destroy\fR operation using \fBfeature@async_destroy\fR a minimum
2287 of this much time will be spent working on freeing blocks per txg.
2288 .sp
2289 Default value: \fB1,000\fR.
2290 .RE
2291
2292 .sp
2293 .ne 2
2294 .na
2295 \fBzfs_obsolete_min_time_ms\fR (int)
2296 .ad
2297 .RS 12n
2298 Similar to \fBzfs_free_min_time_ms\fR but for cleanup of old indirection records
2299 for removed vdevs.
2300 .sp
2301 Default value: \fB500\fR.
2302 .RE
2303
2304 .sp
2305 .ne 2
2306 .na
2307 \fBzfs_immediate_write_sz\fR (long)
2308 .ad
2309 .RS 12n
2310 Largest data block to write to zil. Larger blocks will be treated as if the
2311 dataset being written to had the property setting \fBlogbias=throughput\fR.
2312 .sp
2313 Default value: \fB32,768\fR.
2314 .RE
2315
2316 .sp
2317 .ne 2
2318 .na
2319 \fBzfs_initialize_value\fR (ulong)
2320 .ad
2321 .RS 12n
2322 Pattern written to vdev free space by \fBzpool initialize\fR.
2323 .sp
2324 Default value: \fB16,045,690,984,833,335,022\fR (0xdeadbeefdeadbeee).
2325 .RE
2326
2327 .sp
2328 .ne 2
2329 .na
2330 \fBzfs_initialize_chunk_size\fR (ulong)
2331 .ad
2332 .RS 12n
2333 Size of writes used by \fBzpool initialize\fR.
2334 This option is used by the test suite to facilitate testing.
2335 .sp
2336 Default value: \fB1,048,576\fR
2337 .RE
2338
2339 .sp
2340 .ne 2
2341 .na
2342 \fBzfs_livelist_max_entries\fR (ulong)
2343 .ad
2344 .RS 12n
2345 The threshold size (in block pointers) at which we create a new sub-livelist.
2346 Larger sublists are more costly from a memory perspective but the fewer
2347 sublists there are, the lower the cost of insertion.
2348 .sp
2349 Default value: \fB500,000\fR.
2350 .RE
2351
2352 .sp
2353 .ne 2
2354 .na
2355 \fBzfs_livelist_min_percent_shared\fR (int)
2356 .ad
2357 .RS 12n
2358 If the amount of shared space between a snapshot and its clone drops below
2359 this threshold, the clone turns off the livelist and reverts to the old deletion
2360 method. This is in place because once a clone has been overwritten enough
2361 livelists no long give us a benefit.
2362 .sp
2363 Default value: \fB75\fR.
2364 .RE
2365
2366 .sp
2367 .ne 2
2368 .na
2369 \fBzfs_livelist_condense_new_alloc\fR (int)
2370 .ad
2371 .RS 12n
2372 Incremented each time an extra ALLOC blkptr is added to a livelist entry while
2373 it is being condensed.
2374 This option is used by the test suite to track race conditions.
2375 .sp
2376 Default value: \fB0\fR.
2377 .RE
2378
2379 .sp
2380 .ne 2
2381 .na
2382 \fBzfs_livelist_condense_sync_cancel\fR (int)
2383 .ad
2384 .RS 12n
2385 Incremented each time livelist condensing is canceled while in
2386 spa_livelist_condense_sync.
2387 This option is used by the test suite to track race conditions.
2388 .sp
2389 Default value: \fB0\fR.
2390 .RE
2391
2392 .sp
2393 .ne 2
2394 .na
2395 \fBzfs_livelist_condense_sync_pause\fR (int)
2396 .ad
2397 .RS 12n
2398 When set, the livelist condense process pauses indefinitely before
2399 executing the synctask - spa_livelist_condense_sync.
2400 This option is used by the test suite to trigger race conditions.
2401 .sp
2402 Default value: \fB0\fR.
2403 .RE
2404
2405 .sp
2406 .ne 2
2407 .na
2408 \fBzfs_livelist_condense_zthr_cancel\fR (int)
2409 .ad
2410 .RS 12n
2411 Incremented each time livelist condensing is canceled while in
2412 spa_livelist_condense_cb.
2413 This option is used by the test suite to track race conditions.
2414 .sp
2415 Default value: \fB0\fR.
2416 .RE
2417
2418 .sp
2419 .ne 2
2420 .na
2421 \fBzfs_livelist_condense_zthr_pause\fR (int)
2422 .ad
2423 .RS 12n
2424 When set, the livelist condense process pauses indefinitely before
2425 executing the open context condensing work in spa_livelist_condense_cb.
2426 This option is used by the test suite to trigger race conditions.
2427 .sp
2428 Default value: \fB0\fR.
2429 .RE
2430
2431 .sp
2432 .ne 2
2433 .na
2434 \fBzfs_lua_max_instrlimit\fR (ulong)
2435 .ad
2436 .RS 12n
2437 The maximum execution time limit that can be set for a ZFS channel program,
2438 specified as a number of Lua instructions.
2439 .sp
2440 Default value: \fB100,000,000\fR.
2441 .RE
2442
2443 .sp
2444 .ne 2
2445 .na
2446 \fBzfs_lua_max_memlimit\fR (ulong)
2447 .ad
2448 .RS 12n
2449 The maximum memory limit that can be set for a ZFS channel program, specified
2450 in bytes.
2451 .sp
2452 Default value: \fB104,857,600\fR.
2453 .RE
2454
2455 .sp
2456 .ne 2
2457 .na
2458 \fBzfs_max_dataset_nesting\fR (int)
2459 .ad
2460 .RS 12n
2461 The maximum depth of nested datasets.  This value can be tuned temporarily to
2462 fix existing datasets that exceed the predefined limit.
2463 .sp
2464 Default value: \fB50\fR.
2465 .RE
2466
2467 .sp
2468 .ne 2
2469 .na
2470 \fBzfs_max_log_walking\fR (ulong)
2471 .ad
2472 .RS 12n
2473 The number of past TXGs that the flushing algorithm of the log spacemap
2474 feature uses to estimate incoming log blocks.
2475 .sp
2476 Default value: \fB5\fR.
2477 .RE
2478
2479 .sp
2480 .ne 2
2481 .na
2482 \fBzfs_max_logsm_summary_length\fR (ulong)
2483 .ad
2484 .RS 12n
2485 Maximum number of rows allowed in the summary of the spacemap log.
2486 .sp
2487 Default value: \fB10\fR.
2488 .RE
2489
2490 .sp
2491 .ne 2
2492 .na
2493 \fBzfs_max_recordsize\fR (int)
2494 .ad
2495 .RS 12n
2496 We currently support block sizes from 512 bytes to 16MB.  The benefits of
2497 larger blocks, and thus larger I/O, need to be weighed against the cost of
2498 COWing a giant block to modify one byte.  Additionally, very large blocks
2499 can have an impact on i/o latency, and also potentially on the memory
2500 allocator.  Therefore, we do not allow the recordsize to be set larger than
2501 zfs_max_recordsize (default 1MB).  Larger blocks can be created by changing
2502 this tunable, and pools with larger blocks can always be imported and used,
2503 regardless of this setting.
2504 .sp
2505 Default value: \fB1,048,576\fR.
2506 .RE
2507
2508 .sp
2509 .ne 2
2510 .na
2511 \fBzfs_allow_redacted_dataset_mount\fR (int)
2512 .ad
2513 .RS 12n
2514 Allow datasets received with redacted send/receive to be mounted. Normally
2515 disabled because these datasets may be missing key data.
2516 .sp
2517 Default value: \fB0\fR.
2518 .RE
2519
2520 .sp
2521 .ne 2
2522 .na
2523 \fBzfs_min_metaslabs_to_flush\fR (ulong)
2524 .ad
2525 .RS 12n
2526 Minimum number of metaslabs to flush per dirty TXG
2527 .sp
2528 Default value: \fB1\fR.
2529 .RE
2530
2531 .sp
2532 .ne 2
2533 .na
2534 \fBzfs_metaslab_fragmentation_threshold\fR (int)
2535 .ad
2536 .RS 12n
2537 Allow metaslabs to keep their active state as long as their fragmentation
2538 percentage is less than or equal to this value. An active metaslab that
2539 exceeds this threshold will no longer keep its active status allowing
2540 better metaslabs to be selected.
2541 .sp
2542 Default value: \fB70\fR.
2543 .RE
2544
2545 .sp
2546 .ne 2
2547 .na
2548 \fBzfs_mg_fragmentation_threshold\fR (int)
2549 .ad
2550 .RS 12n
2551 Metaslab groups are considered eligible for allocations if their
2552 fragmentation metric (measured as a percentage) is less than or equal to
2553 this value. If a metaslab group exceeds this threshold then it will be
2554 skipped unless all metaslab groups within the metaslab class have also
2555 crossed this threshold.
2556 .sp
2557 Default value: \fB95\fR.
2558 .RE
2559
2560 .sp
2561 .ne 2
2562 .na
2563 \fBzfs_mg_noalloc_threshold\fR (int)
2564 .ad
2565 .RS 12n
2566 Defines a threshold at which metaslab groups should be eligible for
2567 allocations.  The value is expressed as a percentage of free space
2568 beyond which a metaslab group is always eligible for allocations.
2569 If a metaslab group's free space is less than or equal to the
2570 threshold, the allocator will avoid allocating to that group
2571 unless all groups in the pool have reached the threshold.  Once all
2572 groups have reached the threshold, all groups are allowed to accept
2573 allocations.  The default value of 0 disables the feature and causes
2574 all metaslab groups to be eligible for allocations.
2575
2576 This parameter allows one to deal with pools having heavily imbalanced
2577 vdevs such as would be the case when a new vdev has been added.
2578 Setting the threshold to a non-zero percentage will stop allocations
2579 from being made to vdevs that aren't filled to the specified percentage
2580 and allow lesser filled vdevs to acquire more allocations than they
2581 otherwise would under the old \fBzfs_mg_alloc_failures\fR facility.
2582 .sp
2583 Default value: \fB0\fR.
2584 .RE
2585
2586 .sp
2587 .ne 2
2588 .na
2589 \fBzfs_ddt_data_is_special\fR (int)
2590 .ad
2591 .RS 12n
2592 If enabled, ZFS will place DDT data into the special allocation class.
2593 .sp
2594 Default value: \fB1\fR.
2595 .RE
2596
2597 .sp
2598 .ne 2
2599 .na
2600 \fBzfs_user_indirect_is_special\fR (int)
2601 .ad
2602 .RS 12n
2603 If enabled, ZFS will place user data (both file and zvol) indirect blocks
2604 into the special allocation class.
2605 .sp
2606 Default value: \fB1\fR.
2607 .RE
2608
2609 .sp
2610 .ne 2
2611 .na
2612 \fBzfs_multihost_history\fR (int)
2613 .ad
2614 .RS 12n
2615 Historical statistics for the last N multihost updates will be available in
2616 \fB/proc/spl/kstat/zfs/<pool>/multihost\fR
2617 .sp
2618 Default value: \fB0\fR.
2619 .RE
2620
2621 .sp
2622 .ne 2
2623 .na
2624 \fBzfs_multihost_interval\fR (ulong)
2625 .ad
2626 .RS 12n
2627 Used to control the frequency of multihost writes which are performed when the
2628 \fBmultihost\fR pool property is on.  This is one factor used to determine the
2629 length of the activity check during import.
2630 .sp
2631 The multihost write period is \fBzfs_multihost_interval / leaf-vdevs\fR
2632 milliseconds.  On average a multihost write will be issued for each leaf vdev
2633 every \fBzfs_multihost_interval\fR milliseconds.  In practice, the observed
2634 period can vary with the I/O load and this observed value is the delay which is
2635 stored in the uberblock.
2636 .sp
2637 Default value: \fB1000\fR.
2638 .RE
2639
2640 .sp
2641 .ne 2
2642 .na
2643 \fBzfs_multihost_import_intervals\fR (uint)
2644 .ad
2645 .RS 12n
2646 Used to control the duration of the activity test on import.  Smaller values of
2647 \fBzfs_multihost_import_intervals\fR will reduce the import time but increase
2648 the risk of failing to detect an active pool.  The total activity check time is
2649 never allowed to drop below one second.
2650 .sp
2651 On import the activity check waits a minimum amount of time determined by
2652 \fBzfs_multihost_interval * zfs_multihost_import_intervals\fR, or the same
2653 product computed on the host which last had the pool imported (whichever is
2654 greater).  The activity check time may be further extended if the value of mmp
2655 delay found in the best uberblock indicates actual multihost updates happened
2656 at longer intervals than \fBzfs_multihost_interval\fR.  A minimum value of
2657 \fB100ms\fR is enforced.
2658 .sp
2659 A value of 0 is ignored and treated as if it was set to 1.
2660 .sp
2661 Default value: \fB20\fR.
2662 .RE
2663
2664 .sp
2665 .ne 2
2666 .na
2667 \fBzfs_multihost_fail_intervals\fR (uint)
2668 .ad
2669 .RS 12n
2670 Controls the behavior of the pool when multihost write failures or delays are
2671 detected.
2672 .sp
2673 When \fBzfs_multihost_fail_intervals = 0\fR, multihost write failures or delays
2674 are ignored.  The failures will still be reported to the ZED which depending on
2675 its configuration may take action such as suspending the pool or offlining a
2676 device.
2677
2678 .sp
2679 When \fBzfs_multihost_fail_intervals > 0\fR, the pool will be suspended if
2680 \fBzfs_multihost_fail_intervals * zfs_multihost_interval\fR milliseconds pass
2681 without a successful mmp write.  This guarantees the activity test will see
2682 mmp writes if the pool is imported.  A value of 1 is ignored and treated as
2683 if it was set to 2.  This is necessary to prevent the pool from being suspended
2684 due to normal, small I/O latency variations.
2685
2686 .sp
2687 Default value: \fB10\fR.
2688 .RE
2689
2690 .sp
2691 .ne 2
2692 .na
2693 \fBzfs_no_scrub_io\fR (int)
2694 .ad
2695 .RS 12n
2696 Set for no scrub I/O. This results in scrubs not actually scrubbing data and
2697 simply doing a metadata crawl of the pool instead.
2698 .sp
2699 Use \fB1\fR for yes and \fB0\fR for no (default).
2700 .RE
2701
2702 .sp
2703 .ne 2
2704 .na
2705 \fBzfs_no_scrub_prefetch\fR (int)
2706 .ad
2707 .RS 12n
2708 Set to disable block prefetching for scrubs.
2709 .sp
2710 Use \fB1\fR for yes and \fB0\fR for no (default).
2711 .RE
2712
2713 .sp
2714 .ne 2
2715 .na
2716 \fBzfs_nocacheflush\fR (int)
2717 .ad
2718 .RS 12n
2719 Disable cache flush operations on disks when writing.  Setting this will
2720 cause pool corruption on power loss if a volatile out-of-order write cache
2721 is enabled.
2722 .sp
2723 Use \fB1\fR for yes and \fB0\fR for no (default).
2724 .RE
2725
2726 .sp
2727 .ne 2
2728 .na
2729 \fBzfs_nopwrite_enabled\fR (int)
2730 .ad
2731 .RS 12n
2732 Enable NOP writes
2733 .sp
2734 Use \fB1\fR for yes (default) and \fB0\fR to disable.
2735 .RE
2736
2737 .sp
2738 .ne 2
2739 .na
2740 \fBzfs_dmu_offset_next_sync\fR (int)
2741 .ad
2742 .RS 12n
2743 Enable forcing txg sync to find holes. When enabled forces ZFS to act
2744 like prior versions when SEEK_HOLE or SEEK_DATA flags are used, which
2745 when a dnode is dirty causes txg's to be synced so that this data can be
2746 found.
2747 .sp
2748 Use \fB1\fR for yes and \fB0\fR to disable (default).
2749 .RE
2750
2751 .sp
2752 .ne 2
2753 .na
2754 \fBzfs_pd_bytes_max\fR (int)
2755 .ad
2756 .RS 12n
2757 The number of bytes which should be prefetched during a pool traversal
2758 (eg: \fBzfs send\fR or other data crawling operations)
2759 .sp
2760 Default value: \fB52,428,800\fR.
2761 .RE
2762
2763 .sp
2764 .ne 2
2765 .na
2766 \fBzfs_per_txg_dirty_frees_percent \fR (ulong)
2767 .ad
2768 .RS 12n
2769 Tunable to control percentage of dirtied indirect blocks from frees allowed
2770 into one TXG. After this threshold is crossed, additional frees will wait until
2771 the next TXG.
2772 A value of zero will disable this throttle.
2773 .sp
2774 Default value: \fB5\fR, set to \fB0\fR to disable.
2775 .RE
2776
2777 .sp
2778 .ne 2
2779 .na
2780 \fBzfs_prefetch_disable\fR (int)
2781 .ad
2782 .RS 12n
2783 This tunable disables predictive prefetch.  Note that it leaves "prescient"
2784 prefetch (e.g. prefetch for zfs send) intact.  Unlike predictive prefetch,
2785 prescient prefetch never issues i/os that end up not being needed, so it
2786 can't hurt performance.
2787 .sp
2788 Use \fB1\fR for yes and \fB0\fR for no (default).
2789 .RE
2790
2791 .sp
2792 .ne 2
2793 .na
2794 \fBzfs_qat_checksum_disable\fR (int)
2795 .ad
2796 .RS 12n
2797 This tunable disables qat hardware acceleration for sha256 checksums. It
2798 may be set after the zfs modules have been loaded to initialize the qat
2799 hardware as long as support is compiled in and the qat driver is present.
2800 .sp
2801 Use \fB1\fR for yes and \fB0\fR for no (default).
2802 .RE
2803
2804 .sp
2805 .ne 2
2806 .na
2807 \fBzfs_qat_compress_disable\fR (int)
2808 .ad
2809 .RS 12n
2810 This tunable disables qat hardware acceleration for gzip compression. It
2811 may be set after the zfs modules have been loaded to initialize the qat
2812 hardware as long as support is compiled in and the qat driver is present.
2813 .sp
2814 Use \fB1\fR for yes and \fB0\fR for no (default).
2815 .RE
2816
2817 .sp
2818 .ne 2
2819 .na
2820 \fBzfs_qat_encrypt_disable\fR (int)
2821 .ad
2822 .RS 12n
2823 This tunable disables qat hardware acceleration for AES-GCM encryption. It
2824 may be set after the zfs modules have been loaded to initialize the qat
2825 hardware as long as support is compiled in and the qat driver is present.
2826 .sp
2827 Use \fB1\fR for yes and \fB0\fR for no (default).
2828 .RE
2829
2830 .sp
2831 .ne 2
2832 .na
2833 \fBzfs_read_chunk_size\fR (long)
2834 .ad
2835 .RS 12n
2836 Bytes to read per chunk
2837 .sp
2838 Default value: \fB1,048,576\fR.
2839 .RE
2840
2841 .sp
2842 .ne 2
2843 .na
2844 \fBzfs_read_history\fR (int)
2845 .ad
2846 .RS 12n
2847 Historical statistics for the last N reads will be available in
2848 \fB/proc/spl/kstat/zfs/<pool>/reads\fR
2849 .sp
2850 Default value: \fB0\fR (no data is kept).
2851 .RE
2852
2853 .sp
2854 .ne 2
2855 .na
2856 \fBzfs_read_history_hits\fR (int)
2857 .ad
2858 .RS 12n
2859 Include cache hits in read history
2860 .sp
2861 Use \fB1\fR for yes and \fB0\fR for no (default).
2862 .RE
2863
2864 .sp
2865 .ne 2
2866 .na
2867 \fBzfs_rebuild_max_segment\fR (ulong)
2868 .ad
2869 .RS 12n
2870 Maximum read segment size to issue when sequentially resilvering a
2871 top-level vdev.
2872 .sp
2873 Default value: \fB1,048,576\fR.
2874 .RE
2875
2876 .sp
2877 .ne 2
2878 .na
2879 \fBzfs_reconstruct_indirect_combinations_max\fR (int)
2880 .ad
2881 .RS 12na
2882 If an indirect split block contains more than this many possible unique
2883 combinations when being reconstructed, consider it too computationally
2884 expensive to check them all. Instead, try at most
2885 \fBzfs_reconstruct_indirect_combinations_max\fR randomly-selected
2886 combinations each time the block is accessed.  This allows all segment
2887 copies to participate fairly in the reconstruction when all combinations
2888 cannot be checked and prevents repeated use of one bad copy.
2889 .sp
2890 Default value: \fB4096\fR.
2891 .RE
2892
2893 .sp
2894 .ne 2
2895 .na
2896 \fBzfs_recover\fR (int)
2897 .ad
2898 .RS 12n
2899 Set to attempt to recover from fatal errors. This should only be used as a
2900 last resort, as it typically results in leaked space, or worse.
2901 .sp
2902 Use \fB1\fR for yes and \fB0\fR for no (default).
2903 .RE
2904
2905 .sp
2906 .ne 2
2907 .na
2908 \fBzfs_removal_ignore_errors\fR (int)
2909 .ad
2910 .RS 12n
2911 .sp
2912 Ignore hard IO errors during device removal.  When set, if a device encounters
2913 a hard IO error during the removal process the removal will not be cancelled.
2914 This can result in a normally recoverable block becoming permanently damaged
2915 and is not recommended.  This should only be used as a last resort when the
2916 pool cannot be returned to a healthy state prior to removing the device.
2917 .sp
2918 Default value: \fB0\fR.
2919 .RE
2920
2921 .sp
2922 .ne 2
2923 .na
2924 \fBzfs_removal_suspend_progress\fR (int)
2925 .ad
2926 .RS 12n
2927 .sp
2928 This is used by the test suite so that it can ensure that certain actions
2929 happen while in the middle of a removal.
2930 .sp
2931 Default value: \fB0\fR.
2932 .RE
2933
2934 .sp
2935 .ne 2
2936 .na
2937 \fBzfs_remove_max_segment\fR (int)
2938 .ad
2939 .RS 12n
2940 .sp
2941 The largest contiguous segment that we will attempt to allocate when removing
2942 a device.  This can be no larger than 16MB.  If there is a performance
2943 problem with attempting to allocate large blocks, consider decreasing this.
2944 .sp
2945 Default value: \fB16,777,216\fR (16MB).
2946 .RE
2947
2948 .sp
2949 .ne 2
2950 .na
2951 \fBzfs_resilver_disable_defer\fR (int)
2952 .ad
2953 .RS 12n
2954 Disables the \fBresilver_defer\fR feature, causing an operation that would
2955 start a resilver to restart one in progress immediately.
2956 .sp
2957 Default value: \fB0\fR (feature enabled).
2958 .RE
2959
2960 .sp
2961 .ne 2
2962 .na
2963 \fBzfs_resilver_min_time_ms\fR (int)
2964 .ad
2965 .RS 12n
2966 Resilvers are processed by the sync thread. While resilvering it will spend
2967 at least this much time working on a resilver between txg flushes.
2968 .sp
2969 Default value: \fB3,000\fR.
2970 .RE
2971
2972 .sp
2973 .ne 2
2974 .na
2975 \fBzfs_scan_ignore_errors\fR (int)
2976 .ad
2977 .RS 12n
2978 If set to a nonzero value, remove the DTL (dirty time list) upon
2979 completion of a pool scan (scrub) even if there were unrepairable
2980 errors.  It is intended to be used during pool repair or recovery to
2981 stop resilvering when the pool is next imported.
2982 .sp
2983 Default value: \fB0\fR.
2984 .RE
2985
2986 .sp
2987 .ne 2
2988 .na
2989 \fBzfs_scrub_min_time_ms\fR (int)
2990 .ad
2991 .RS 12n
2992 Scrubs are processed by the sync thread. While scrubbing it will spend
2993 at least this much time working on a scrub between txg flushes.
2994 .sp
2995 Default value: \fB1,000\fR.
2996 .RE
2997
2998 .sp
2999 .ne 2
3000 .na
3001 \fBzfs_scan_checkpoint_intval\fR (int)
3002 .ad
3003 .RS 12n
3004 To preserve progress across reboots the sequential scan algorithm periodically
3005 needs to stop metadata scanning and issue all the verifications I/Os to disk.
3006 The frequency of this flushing is determined by the
3007 \fBzfs_scan_checkpoint_intval\fR tunable.
3008 .sp
3009 Default value: \fB7200\fR seconds (every 2 hours).
3010 .RE
3011
3012 .sp
3013 .ne 2
3014 .na
3015 \fBzfs_scan_fill_weight\fR (int)
3016 .ad
3017 .RS 12n
3018 This tunable affects how scrub and resilver I/O segments are ordered. A higher
3019 number indicates that we care more about how filled in a segment is, while a
3020 lower number indicates we care more about the size of the extent without
3021 considering the gaps within a segment. This value is only tunable upon module
3022 insertion. Changing the value afterwards will have no affect on scrub or
3023 resilver performance.
3024 .sp
3025 Default value: \fB3\fR.
3026 .RE
3027
3028 .sp
3029 .ne 2
3030 .na
3031 \fBzfs_scan_issue_strategy\fR (int)
3032 .ad
3033 .RS 12n
3034 Determines the order that data will be verified while scrubbing or resilvering.
3035 If set to \fB1\fR, data will be verified as sequentially as possible, given the
3036 amount of memory reserved for scrubbing (see \fBzfs_scan_mem_lim_fact\fR). This
3037 may improve scrub performance if the pool's data is very fragmented. If set to
3038 \fB2\fR, the largest mostly-contiguous chunk of found data will be verified
3039 first. By deferring scrubbing of small segments, we may later find adjacent data
3040 to coalesce and increase the segment size. If set to \fB0\fR, zfs will use
3041 strategy \fB1\fR during normal verification and strategy \fB2\fR while taking a
3042 checkpoint.
3043 .sp
3044 Default value: \fB0\fR.
3045 .RE
3046
3047 .sp
3048 .ne 2
3049 .na
3050 \fBzfs_scan_legacy\fR (int)
3051 .ad
3052 .RS 12n
3053 A value of 0 indicates that scrubs and resilvers will gather metadata in
3054 memory before issuing sequential I/O. A value of 1 indicates that the legacy
3055 algorithm will be used where I/O is initiated as soon as it is discovered.
3056 Changing this value to 0 will not affect scrubs or resilvers that are already
3057 in progress.
3058 .sp
3059 Default value: \fB0\fR.
3060 .RE
3061
3062 .sp
3063 .ne 2
3064 .na
3065 \fBzfs_scan_max_ext_gap\fR (int)
3066 .ad
3067 .RS 12n
3068 Indicates the largest gap in bytes between scrub / resilver I/Os that will still
3069 be considered sequential for sorting purposes. Changing this value will not
3070 affect scrubs or resilvers that are already in progress.
3071 .sp
3072 Default value: \fB2097152 (2 MB)\fR.
3073 .RE
3074
3075 .sp
3076 .ne 2
3077 .na
3078 \fBzfs_scan_mem_lim_fact\fR (int)
3079 .ad
3080 .RS 12n
3081 Maximum fraction of RAM used for I/O sorting by sequential scan algorithm.
3082 This tunable determines the hard limit for I/O sorting memory usage.
3083 When the hard limit is reached we stop scanning metadata and start issuing
3084 data verification I/O. This is done until we get below the soft limit.
3085 .sp
3086 Default value: \fB20\fR which is 5% of RAM (1/20).
3087 .RE
3088
3089 .sp
3090 .ne 2
3091 .na
3092 \fBzfs_scan_mem_lim_soft_fact\fR (int)
3093 .ad
3094 .RS 12n
3095 The fraction of the hard limit used to determined the soft limit for I/O sorting
3096 by the sequential scan algorithm. When we cross this limit from below no action
3097 is taken. When we cross this limit from above it is because we are issuing
3098 verification I/O. In this case (unless the metadata scan is done) we stop
3099 issuing verification I/O and start scanning metadata again until we get to the
3100 hard limit.
3101 .sp
3102 Default value: \fB20\fR which is 5% of the hard limit (1/20).
3103 .RE
3104
3105 .sp
3106 .ne 2
3107 .na
3108 \fBzfs_scan_strict_mem_lim\fR (int)
3109 .ad
3110 .RS 12n
3111 Enforces tight memory limits on pool scans when a sequential scan is in
3112 progress. When disabled the memory limit may be exceeded by fast disks.
3113 .sp
3114 Default value: \fB0\fR.
3115 .RE
3116
3117 .sp
3118 .ne 2
3119 .na
3120 \fBzfs_scan_suspend_progress\fR (int)
3121 .ad
3122 .RS 12n
3123 Freezes a scrub/resilver in progress without actually pausing it. Intended for
3124 testing/debugging.
3125 .sp
3126 Default value: \fB0\fR.
3127 .RE
3128
3129
3130 .sp
3131 .ne 2
3132 .na
3133 \fBzfs_scan_vdev_limit\fR (int)
3134 .ad
3135 .RS 12n
3136 Maximum amount of data that can be concurrently issued at once for scrubs and
3137 resilvers per leaf device, given in bytes.
3138 .sp
3139 Default value: \fB41943040\fR.
3140 .RE
3141
3142 .sp
3143 .ne 2
3144 .na
3145 \fBzfs_send_corrupt_data\fR (int)
3146 .ad
3147 .RS 12n
3148 Allow sending of corrupt data (ignore read/checksum errors when sending data)
3149 .sp
3150 Use \fB1\fR for yes and \fB0\fR for no (default).
3151 .RE
3152
3153 .sp
3154 .ne 2
3155 .na
3156 \fBzfs_send_unmodified_spill_blocks\fR (int)
3157 .ad
3158 .RS 12n
3159 Include unmodified spill blocks in the send stream. Under certain circumstances
3160 previous versions of ZFS could incorrectly remove the spill block from an
3161 existing object.  Including unmodified copies of the spill blocks creates a
3162 backwards compatible stream which will recreate a spill block if it was
3163 incorrectly removed.
3164 .sp
3165 Use \fB1\fR for yes (default) and \fB0\fR for no.
3166 .RE
3167
3168 .sp
3169 .ne 2
3170 .na
3171 \fBzfs_send_no_prefetch_queue_ff\fR (int)
3172 .ad
3173 .RS 12n
3174 The fill fraction of the \fBzfs send\fR internal queues. The fill fraction
3175 controls the timing with which internal threads are woken up.
3176 .sp
3177 Default value: \fB20\fR.
3178 .RE
3179
3180 .sp
3181 .ne 2
3182 .na
3183 \fBzfs_send_no_prefetch_queue_length\fR (int)
3184 .ad
3185 .RS 12n
3186 The maximum number of bytes allowed in \fBzfs send\fR's internal queues.
3187 .sp
3188 Default value: \fB1,048,576\fR.
3189 .RE
3190
3191 .sp
3192 .ne 2
3193 .na
3194 \fBzfs_send_queue_ff\fR (int)
3195 .ad
3196 .RS 12n
3197 The fill fraction of the \fBzfs send\fR prefetch queue. The fill fraction
3198 controls the timing with which internal threads are woken up.
3199 .sp
3200 Default value: \fB20\fR.
3201 .RE
3202
3203 .sp
3204 .ne 2
3205 .na
3206 \fBzfs_send_queue_length\fR (int)
3207 .ad
3208 .RS 12n
3209 The maximum number of bytes allowed that will be prefetched by \fBzfs send\fR.
3210 This value must be at least twice the maximum block size in use.
3211 .sp
3212 Default value: \fB16,777,216\fR.
3213 .RE
3214
3215 .sp
3216 .ne 2
3217 .na
3218 \fBzfs_recv_queue_ff\fR (int)
3219 .ad
3220 .RS 12n
3221 The fill fraction of the \fBzfs receive\fR queue. The fill fraction
3222 controls the timing with which internal threads are woken up.
3223 .sp
3224 Default value: \fB20\fR.
3225 .RE
3226
3227 .sp
3228 .ne 2
3229 .na
3230 \fBzfs_recv_queue_length\fR (int)
3231 .ad
3232 .RS 12n
3233 The maximum number of bytes allowed in the \fBzfs receive\fR queue. This value
3234 must be at least twice the maximum block size in use.
3235 .sp
3236 Default value: \fB16,777,216\fR.
3237 .RE
3238
3239 .sp
3240 .ne 2
3241 .na
3242 \fBzfs_recv_write_batch_size\fR (int)
3243 .ad
3244 .RS 12n
3245 The maximum amount of data (in bytes) that \fBzfs receive\fR will write in
3246 one DMU transaction.  This is the uncompressed size, even when receiving a
3247 compressed send stream.  This setting will not reduce the write size below
3248 a single block. Capped at a maximum of 32MB
3249 .sp
3250 Default value: \fB1MB\fR.
3251 .RE
3252
3253 .sp
3254 .ne 2
3255 .na
3256 \fBzfs_override_estimate_recordsize\fR (ulong)
3257 .ad
3258 .RS 12n
3259 Setting this variable overrides the default logic for estimating block
3260 sizes when doing a zfs send. The default heuristic is that the average
3261 block size will be the current recordsize. Override this value if most data
3262 in your dataset is not of that size and you require accurate zfs send size
3263 estimates.
3264 .sp
3265 Default value: \fB0\fR.
3266 .RE
3267
3268 .sp
3269 .ne 2
3270 .na
3271 \fBzfs_sync_pass_deferred_free\fR (int)
3272 .ad
3273 .RS 12n
3274 Flushing of data to disk is done in passes. Defer frees starting in this pass
3275 .sp
3276 Default value: \fB2\fR.
3277 .RE
3278
3279 .sp
3280 .ne 2
3281 .na
3282 \fBzfs_spa_discard_memory_limit\fR (int)
3283 .ad
3284 .RS 12n
3285 Maximum memory used for prefetching a checkpoint's space map on each
3286 vdev while discarding the checkpoint.
3287 .sp
3288 Default value: \fB16,777,216\fR.
3289 .RE
3290
3291 .sp
3292 .ne 2
3293 .na
3294 \fBzfs_special_class_metadata_reserve_pct\fR (int)
3295 .ad
3296 .RS 12n
3297 Only allow small data blocks to be allocated on the special and dedup vdev
3298 types when the available free space percentage on these vdevs exceeds this
3299 value. This ensures reserved space is available for pool meta data as the
3300 special vdevs approach capacity.
3301 .sp
3302 Default value: \fB25\fR.
3303 .RE
3304
3305 .sp
3306 .ne 2
3307 .na
3308 \fBzfs_sync_pass_dont_compress\fR (int)
3309 .ad
3310 .RS 12n
3311 Starting in this sync pass, we disable compression (including of metadata).
3312 With the default setting, in practice, we don't have this many sync passes,
3313 so this has no effect.
3314 .sp
3315 The original intent was that disabling compression would help the sync passes
3316 to converge. However, in practice disabling compression increases the average
3317 number of sync passes, because when we turn compression off, a lot of block's
3318 size will change and thus we have to re-allocate (not overwrite) them. It
3319 also increases the number of 128KB allocations (e.g. for indirect blocks and
3320 spacemaps) because these will not be compressed. The 128K allocations are
3321 especially detrimental to performance on highly fragmented systems, which may
3322 have very few free segments of this size, and may need to load new metaslabs
3323 to satisfy 128K allocations.
3324 .sp
3325 Default value: \fB8\fR.
3326 .RE
3327
3328 .sp
3329 .ne 2
3330 .na
3331 \fBzfs_sync_pass_rewrite\fR (int)
3332 .ad
3333 .RS 12n
3334 Rewrite new block pointers starting in this pass
3335 .sp
3336 Default value: \fB2\fR.
3337 .RE
3338
3339 .sp
3340 .ne 2
3341 .na
3342 \fBzfs_sync_taskq_batch_pct\fR (int)
3343 .ad
3344 .RS 12n
3345 This controls the number of threads used by the dp_sync_taskq.  The default
3346 value of 75% will create a maximum of one thread per cpu.
3347 .sp
3348 Default value: \fB75\fR%.
3349 .RE
3350
3351 .sp
3352 .ne 2
3353 .na
3354 \fBzfs_trim_extent_bytes_max\fR (uint)
3355 .ad
3356 .RS 12n
3357 Maximum size of TRIM command.  Ranges larger than this will be split in to
3358 chunks no larger than \fBzfs_trim_extent_bytes_max\fR bytes before being
3359 issued to the device.
3360 .sp
3361 Default value: \fB134,217,728\fR.
3362 .RE
3363
3364 .sp
3365 .ne 2
3366 .na
3367 \fBzfs_trim_extent_bytes_min\fR (uint)
3368 .ad
3369 .RS 12n
3370 Minimum size of TRIM commands.  TRIM ranges smaller than this will be skipped
3371 unless they're part of a larger range which was broken in to chunks.  This is
3372 done because it's common for these small TRIMs to negatively impact overall
3373 performance.  This value can be set to 0 to TRIM all unallocated space.
3374 .sp
3375 Default value: \fB32,768\fR.
3376 .RE
3377
3378 .sp
3379 .ne 2
3380 .na
3381 \fBzfs_trim_metaslab_skip\fR (uint)
3382 .ad
3383 .RS 12n
3384 Skip uninitialized metaslabs during the TRIM process.  This option is useful
3385 for pools constructed from large thinly-provisioned devices where TRIM
3386 operations are slow.  As a pool ages an increasing fraction of the pools
3387 metaslabs will be initialized progressively degrading the usefulness of
3388 this option.  This setting is stored when starting a manual TRIM and will
3389 persist for the duration of the requested TRIM.
3390 .sp
3391 Default value: \fB0\fR.
3392 .RE
3393
3394 .sp
3395 .ne 2
3396 .na
3397 \fBzfs_trim_queue_limit\fR (uint)
3398 .ad
3399 .RS 12n
3400 Maximum number of queued TRIMs outstanding per leaf vdev.  The number of
3401 concurrent TRIM commands issued to the device is controlled by the
3402 \fBzfs_vdev_trim_min_active\fR and \fBzfs_vdev_trim_max_active\fR module
3403 options.
3404 .sp
3405 Default value: \fB10\fR.
3406 .RE
3407
3408 .sp
3409 .ne 2
3410 .na
3411 \fBzfs_trim_txg_batch\fR (uint)
3412 .ad
3413 .RS 12n
3414 The number of transaction groups worth of frees which should be aggregated
3415 before TRIM operations are issued to the device.  This setting represents a
3416 trade-off between issuing larger, more efficient TRIM operations and the
3417 delay before the recently trimmed space is available for use by the device.
3418 .sp
3419 Increasing this value will allow frees to be aggregated for a longer time.
3420 This will result is larger TRIM operations and potentially increased memory
3421 usage.  Decreasing this value will have the opposite effect.  The default
3422 value of 32 was determined to be a reasonable compromise.
3423 .sp
3424 Default value: \fB32\fR.
3425 .RE
3426
3427 .sp
3428 .ne 2
3429 .na
3430 \fBzfs_txg_history\fR (int)
3431 .ad
3432 .RS 12n
3433 Historical statistics for the last N txgs will be available in
3434 \fB/proc/spl/kstat/zfs/<pool>/txgs\fR
3435 .sp
3436 Default value: \fB0\fR.
3437 .RE
3438
3439 .sp
3440 .ne 2
3441 .na
3442 \fBzfs_txg_timeout\fR (int)
3443 .ad
3444 .RS 12n
3445 Flush dirty data to disk at least every N seconds (maximum txg duration)
3446 .sp
3447 Default value: \fB5\fR.
3448 .RE
3449
3450 .sp
3451 .ne 2
3452 .na
3453 \fBzfs_vdev_aggregate_trim\fR (int)
3454 .ad
3455 .RS 12n
3456 Allow TRIM I/Os to be aggregated.  This is normally not helpful because
3457 the extents to be trimmed will have been already been aggregated by the
3458 metaslab.  This option is provided for debugging and performance analysis.
3459 .sp
3460 Default value: \fB0\fR.
3461 .RE
3462
3463 .sp
3464 .ne 2
3465 .na
3466 \fBzfs_vdev_aggregation_limit\fR (int)
3467 .ad
3468 .RS 12n
3469 Max vdev I/O aggregation size
3470 .sp
3471 Default value: \fB1,048,576\fR.
3472 .RE
3473
3474 .sp
3475 .ne 2
3476 .na
3477 \fBzfs_vdev_aggregation_limit_non_rotating\fR (int)
3478 .ad
3479 .RS 12n
3480 Max vdev I/O aggregation size for non-rotating media
3481 .sp
3482 Default value: \fB131,072\fR.
3483 .RE
3484
3485 .sp
3486 .ne 2
3487 .na
3488 \fBzfs_vdev_cache_bshift\fR (int)
3489 .ad
3490 .RS 12n
3491 Shift size to inflate reads too
3492 .sp
3493 Default value: \fB16\fR (effectively 65536).
3494 .RE
3495
3496 .sp
3497 .ne 2
3498 .na
3499 \fBzfs_vdev_cache_max\fR (int)
3500 .ad
3501 .RS 12n
3502 Inflate reads smaller than this value to meet the \fBzfs_vdev_cache_bshift\fR
3503 size (default 64k).
3504 .sp
3505 Default value: \fB16384\fR.
3506 .RE
3507
3508 .sp
3509 .ne 2
3510 .na
3511 \fBzfs_vdev_cache_size\fR (int)
3512 .ad
3513 .RS 12n
3514 Total size of the per-disk cache in bytes.
3515 .sp
3516 Currently this feature is disabled as it has been found to not be helpful
3517 for performance and in some cases harmful.
3518 .sp
3519 Default value: \fB0\fR.
3520 .RE
3521
3522 .sp
3523 .ne 2
3524 .na
3525 \fBzfs_vdev_mirror_rotating_inc\fR (int)
3526 .ad
3527 .RS 12n
3528 A number by which the balancing algorithm increments the load calculation for
3529 the purpose of selecting the least busy mirror member when an I/O immediately
3530 follows its predecessor on rotational vdevs for the purpose of making decisions
3531 based on load.
3532 .sp
3533 Default value: \fB0\fR.
3534 .RE
3535
3536 .sp
3537 .ne 2
3538 .na
3539 \fBzfs_vdev_mirror_rotating_seek_inc\fR (int)
3540 .ad
3541 .RS 12n
3542 A number by which the balancing algorithm increments the load calculation for
3543 the purpose of selecting the least busy mirror member when an I/O lacks
3544 locality as defined by the zfs_vdev_mirror_rotating_seek_offset.  I/Os within
3545 this that are not immediately following the previous I/O are incremented by
3546 half.
3547 .sp
3548 Default value: \fB5\fR.
3549 .RE
3550
3551 .sp
3552 .ne 2
3553 .na
3554 \fBzfs_vdev_mirror_rotating_seek_offset\fR (int)
3555 .ad
3556 .RS 12n
3557 The maximum distance for the last queued I/O in which the balancing algorithm
3558 considers an I/O to have locality.
3559 See the section "ZFS I/O SCHEDULER".
3560 .sp
3561 Default value: \fB1048576\fR.
3562 .RE
3563
3564 .sp
3565 .ne 2
3566 .na
3567 \fBzfs_vdev_mirror_non_rotating_inc\fR (int)
3568 .ad
3569 .RS 12n
3570 A number by which the balancing algorithm increments the load calculation for
3571 the purpose of selecting the least busy mirror member on non-rotational vdevs
3572 when I/Os do not immediately follow one another.
3573 .sp
3574 Default value: \fB0\fR.
3575 .RE
3576
3577 .sp
3578 .ne 2
3579 .na
3580 \fBzfs_vdev_mirror_non_rotating_seek_inc\fR (int)
3581 .ad
3582 .RS 12n
3583 A number by which the balancing algorithm increments the load calculation for
3584 the purpose of selecting the least busy mirror member when an I/O lacks
3585 locality as defined by the zfs_vdev_mirror_rotating_seek_offset. I/Os within
3586 this that are not immediately following the previous I/O are incremented by
3587 half.
3588 .sp
3589 Default value: \fB1\fR.
3590 .RE
3591
3592 .sp
3593 .ne 2
3594 .na
3595 \fBzfs_vdev_read_gap_limit\fR (int)
3596 .ad
3597 .RS 12n
3598 Aggregate read I/O operations if the gap on-disk between them is within this
3599 threshold.
3600 .sp
3601 Default value: \fB32,768\fR.
3602 .RE
3603
3604 .sp
3605 .ne 2
3606 .na
3607 \fBzfs_vdev_write_gap_limit\fR (int)
3608 .ad
3609 .RS 12n
3610 Aggregate write I/O over gap
3611 .sp
3612 Default value: \fB4,096\fR.
3613 .RE
3614
3615 .sp
3616 .ne 2
3617 .na
3618 \fBzfs_vdev_raidz_impl\fR (string)
3619 .ad
3620 .RS 12n
3621 Parameter for selecting raidz parity implementation to use.
3622
3623 Options marked (always) below may be selected on module load as they are
3624 supported on all systems.
3625 The remaining options may only be set after the module is loaded, as they
3626 are available only if the implementations are compiled in and supported
3627 on the running system.
3628
3629 Once the module is loaded, the content of
3630 /sys/module/zfs/parameters/zfs_vdev_raidz_impl will show available options
3631 with the currently selected one enclosed in [].
3632 Possible options are:
3633   fastest  - (always) implementation selected using built-in benchmark
3634   original - (always) original raidz implementation
3635   scalar   - (always) scalar raidz implementation
3636   sse2     - implementation using SSE2 instruction set (64bit x86 only)
3637   ssse3    - implementation using SSSE3 instruction set (64bit x86 only)
3638   avx2     - implementation using AVX2 instruction set (64bit x86 only)
3639   avx512f  - implementation using AVX512F instruction set (64bit x86 only)
3640   avx512bw - implementation using AVX512F & AVX512BW instruction sets (64bit x86 only)
3641   aarch64_neon - implementation using NEON (Aarch64/64 bit ARMv8 only)
3642   aarch64_neonx2 - implementation using NEON with more unrolling (Aarch64/64 bit ARMv8 only)
3643   powerpc_altivec - implementation using Altivec (PowerPC only)
3644 .sp
3645 Default value: \fBfastest\fR.
3646 .RE
3647
3648 .sp
3649 .ne 2
3650 .na
3651 \fBzfs_vdev_scheduler\fR (charp)
3652 .ad
3653 .RS 12n
3654 \fBDEPRECATED\fR: This option exists for compatibility with older user
3655 configurations. It does nothing except print a warning to the kernel log if
3656 set.
3657 .sp
3658 .RE
3659
3660 .sp
3661 .ne 2
3662 .na
3663 \fBzfs_zevent_cols\fR (int)
3664 .ad
3665 .RS 12n
3666 When zevents are logged to the console use this as the word wrap width.
3667 .sp
3668 Default value: \fB80\fR.
3669 .RE
3670
3671 .sp
3672 .ne 2
3673 .na
3674 \fBzfs_zevent_console\fR (int)
3675 .ad
3676 .RS 12n
3677 Log events to the console
3678 .sp
3679 Use \fB1\fR for yes and \fB0\fR for no (default).
3680 .RE
3681
3682 .sp
3683 .ne 2
3684 .na
3685 \fBzfs_zevent_len_max\fR (int)
3686 .ad
3687 .RS 12n
3688 Max event queue length. A value of 0 will result in a calculated value which
3689 increases with the number of CPUs in the system (minimum 64 events). Events
3690 in the queue can be viewed with the \fBzpool events\fR command.
3691 .sp
3692 Default value: \fB0\fR.
3693 .RE
3694
3695 .sp
3696 .ne 2
3697 .na
3698 \fBzfs_zevent_retain_max\fR (int)
3699 .ad
3700 .RS 12n
3701 Maximum recent zevent records to retain for duplicate checking.  Setting
3702 this value to zero disables duplicate detection.
3703 .sp
3704 Default value: \fB2000\fR.
3705 .RE
3706
3707 .sp
3708 .ne 2
3709 .na
3710 \fBzfs_zevent_retain_expire_secs\fR (int)
3711 .ad
3712 .RS 12n
3713 Lifespan for a recent ereport that was retained for duplicate checking.
3714 .sp
3715 Default value: \fB900\fR.
3716 .RE
3717
3718 .na
3719 \fBzfs_zil_clean_taskq_maxalloc\fR (int)
3720 .ad
3721 .RS 12n
3722 The maximum number of taskq entries that are allowed to be cached.  When this
3723 limit is exceeded transaction records (itxs) will be cleaned synchronously.
3724 .sp
3725 Default value: \fB1048576\fR.
3726 .RE
3727
3728 .sp
3729 .ne 2
3730 .na
3731 \fBzfs_zil_clean_taskq_minalloc\fR (int)
3732 .ad
3733 .RS 12n
3734 The number of taskq entries that are pre-populated when the taskq is first
3735 created and are immediately available for use.
3736 .sp
3737 Default value: \fB1024\fR.
3738 .RE
3739
3740 .sp
3741 .ne 2
3742 .na
3743 \fBzfs_zil_clean_taskq_nthr_pct\fR (int)
3744 .ad
3745 .RS 12n
3746 This controls the number of threads used by the dp_zil_clean_taskq.  The default
3747 value of 100% will create a maximum of one thread per cpu.
3748 .sp
3749 Default value: \fB100\fR%.
3750 .RE
3751
3752 .sp
3753 .ne 2
3754 .na
3755 \fBzil_maxblocksize\fR (int)
3756 .ad
3757 .RS 12n
3758 This sets the maximum block size used by the ZIL.  On very fragmented pools,
3759 lowering this (typically to 36KB) can improve performance.
3760 .sp
3761 Default value: \fB131072\fR (128KB).
3762 .RE
3763
3764 .sp
3765 .ne 2
3766 .na
3767 \fBzil_nocacheflush\fR (int)
3768 .ad
3769 .RS 12n
3770 Disable the cache flush commands that are normally sent to the disk(s) by
3771 the ZIL after an LWB write has completed. Setting this will cause ZIL
3772 corruption on power loss if a volatile out-of-order write cache is enabled.
3773 .sp
3774 Use \fB1\fR for yes and \fB0\fR for no (default).
3775 .RE
3776
3777 .sp
3778 .ne 2
3779 .na
3780 \fBzil_replay_disable\fR (int)
3781 .ad
3782 .RS 12n
3783 Disable intent logging replay. Can be disabled for recovery from corrupted
3784 ZIL
3785 .sp
3786 Use \fB1\fR for yes and \fB0\fR for no (default).
3787 .RE
3788
3789 .sp
3790 .ne 2
3791 .na
3792 \fBzil_slog_bulk\fR (ulong)
3793 .ad
3794 .RS 12n
3795 Limit SLOG write size per commit executed with synchronous priority.
3796 Any writes above that will be executed with lower (asynchronous) priority
3797 to limit potential SLOG device abuse by single active ZIL writer.
3798 .sp
3799 Default value: \fB786,432\fR.
3800 .RE
3801
3802 .sp
3803 .ne 2
3804 .na
3805 \fBzio_deadman_log_all\fR (int)
3806 .ad
3807 .RS 12n
3808 If non-zero, the zio deadman will produce debugging messages (see
3809 \fBzfs_dbgmsg_enable\fR) for all zios, rather than only for leaf
3810 zios possessing a vdev. This is meant to be used by developers to gain
3811 diagnostic information for hang conditions which don't involve a mutex
3812 or other locking primitive; typically conditions in which a thread in
3813 the zio pipeline is looping indefinitely.
3814 .sp
3815 Default value: \fB0\fR.
3816 .RE
3817
3818 .sp
3819 .ne 2
3820 .na
3821 \fBzio_decompress_fail_fraction\fR (int)
3822 .ad
3823 .RS 12n
3824 If non-zero, this value represents the denominator of the probability that zfs
3825 should induce a decompression failure. For instance, for a 5% decompression
3826 failure rate, this value should be set to 20.
3827 .sp
3828 Default value: \fB0\fR.
3829 .RE
3830
3831 .sp
3832 .ne 2
3833 .na
3834 \fBzio_slow_io_ms\fR (int)
3835 .ad
3836 .RS 12n
3837 When an I/O operation takes more than \fBzio_slow_io_ms\fR milliseconds to
3838 complete is marked as a slow I/O.  Each slow I/O causes a delay zevent.  Slow
3839 I/O counters can be seen with "zpool status -s".
3840
3841 .sp
3842 Default value: \fB30,000\fR.
3843 .RE
3844
3845 .sp
3846 .ne 2
3847 .na
3848 \fBzio_dva_throttle_enabled\fR (int)
3849 .ad
3850 .RS 12n
3851 Throttle block allocations in the I/O pipeline. This allows for
3852 dynamic allocation distribution when devices are imbalanced.
3853 When enabled, the maximum number of pending allocations per top-level vdev
3854 is limited by \fBzfs_vdev_queue_depth_pct\fR.
3855 .sp
3856 Default value: \fB1\fR.
3857 .RE
3858
3859 .sp
3860 .ne 2
3861 .na
3862 \fBzio_requeue_io_start_cut_in_line\fR (int)
3863 .ad
3864 .RS 12n
3865 Prioritize requeued I/O
3866 .sp
3867 Default value: \fB0\fR.
3868 .RE
3869
3870 .sp
3871 .ne 2
3872 .na
3873 \fBzio_taskq_batch_pct\fR (uint)
3874 .ad
3875 .RS 12n
3876 Percentage of online CPUs (or CPU cores, etc) which will run a worker thread
3877 for I/O. These workers are responsible for I/O work such as compression and
3878 checksum calculations. Fractional number of CPUs will be rounded down.
3879 .sp
3880 The default value of 75 was chosen to avoid using all CPUs which can result in
3881 latency issues and inconsistent application performance, especially when high
3882 compression is enabled.
3883 .sp
3884 Default value: \fB75\fR.
3885 .RE
3886
3887 .sp
3888 .ne 2
3889 .na
3890 \fBzvol_inhibit_dev\fR (uint)
3891 .ad
3892 .RS 12n
3893 Do not create zvol device nodes. This may slightly improve startup time on
3894 systems with a very large number of zvols.
3895 .sp
3896 Use \fB1\fR for yes and \fB0\fR for no (default).
3897 .RE
3898
3899 .sp
3900 .ne 2
3901 .na
3902 \fBzvol_major\fR (uint)
3903 .ad
3904 .RS 12n
3905 Major number for zvol block devices
3906 .sp
3907 Default value: \fB230\fR.
3908 .RE
3909
3910 .sp
3911 .ne 2
3912 .na
3913 \fBzvol_max_discard_blocks\fR (ulong)
3914 .ad
3915 .RS 12n
3916 Discard (aka TRIM) operations done on zvols will be done in batches of this
3917 many blocks, where block size is determined by the \fBvolblocksize\fR property
3918 of a zvol.
3919 .sp
3920 Default value: \fB16,384\fR.
3921 .RE
3922
3923 .sp
3924 .ne 2
3925 .na
3926 \fBzvol_prefetch_bytes\fR (uint)
3927 .ad
3928 .RS 12n
3929 When adding a zvol to the system prefetch \fBzvol_prefetch_bytes\fR
3930 from the start and end of the volume.  Prefetching these regions
3931 of the volume is desirable because they are likely to be accessed
3932 immediately by \fBblkid(8)\fR or by the kernel scanning for a partition
3933 table.
3934 .sp
3935 Default value: \fB131,072\fR.
3936 .RE
3937
3938 .sp
3939 .ne 2
3940 .na
3941 \fBzvol_request_sync\fR (uint)
3942 .ad
3943 .RS 12n
3944 When processing I/O requests for a zvol submit them synchronously.  This
3945 effectively limits the queue depth to 1 for each I/O submitter.  When set
3946 to 0 requests are handled asynchronously by a thread pool.  The number of
3947 requests which can be handled concurrently is controller by \fBzvol_threads\fR.
3948 .sp
3949 Default value: \fB0\fR.
3950 .RE
3951
3952 .sp
3953 .ne 2
3954 .na
3955 \fBzvol_threads\fR (uint)
3956 .ad
3957 .RS 12n
3958 Max number of threads which can handle zvol I/O requests concurrently.
3959 .sp
3960 Default value: \fB32\fR.
3961 .RE
3962
3963 .sp
3964 .ne 2
3965 .na
3966 \fBzvol_volmode\fR (uint)
3967 .ad
3968 .RS 12n
3969 Defines zvol block devices behaviour when \fBvolmode\fR is set to \fBdefault\fR.
3970 Valid values are \fB1\fR (full), \fB2\fR (dev) and \fB3\fR (none).
3971 .sp
3972 Default value: \fB1\fR.
3973 .RE
3974
3975 .SH ZFS I/O SCHEDULER
3976 ZFS issues I/O operations to leaf vdevs to satisfy and complete I/Os.
3977 The I/O scheduler determines when and in what order those operations are
3978 issued.  The I/O scheduler divides operations into five I/O classes
3979 prioritized in the following order: sync read, sync write, async read,
3980 async write, and scrub/resilver.  Each queue defines the minimum and
3981 maximum number of concurrent operations that may be issued to the
3982 device.  In addition, the device has an aggregate maximum,
3983 \fBzfs_vdev_max_active\fR. Note that the sum of the per-queue minimums
3984 must not exceed the aggregate maximum.  If the sum of the per-queue
3985 maximums exceeds the aggregate maximum, then the number of active I/Os
3986 may reach \fBzfs_vdev_max_active\fR, in which case no further I/Os will
3987 be issued regardless of whether all per-queue minimums have been met.
3988 .sp
3989 For many physical devices, throughput increases with the number of
3990 concurrent operations, but latency typically suffers. Further, physical
3991 devices typically have a limit at which more concurrent operations have no
3992 effect on throughput or can actually cause it to decrease.
3993 .sp
3994 The scheduler selects the next operation to issue by first looking for an
3995 I/O class whose minimum has not been satisfied. Once all are satisfied and
3996 the aggregate maximum has not been hit, the scheduler looks for classes
3997 whose maximum has not been satisfied. Iteration through the I/O classes is
3998 done in the order specified above. No further operations are issued if the
3999 aggregate maximum number of concurrent operations has been hit or if there
4000 are no operations queued for an I/O class that has not hit its maximum.
4001 Every time an I/O is queued or an operation completes, the I/O scheduler
4002 looks for new operations to issue.
4003 .sp
4004 In general, smaller max_active's will lead to lower latency of synchronous
4005 operations.  Larger max_active's may lead to higher overall throughput,
4006 depending on underlying storage.
4007 .sp
4008 The ratio of the queues' max_actives determines the balance of performance
4009 between reads, writes, and scrubs.  E.g., increasing
4010 \fBzfs_vdev_scrub_max_active\fR will cause the scrub or resilver to complete
4011 more quickly, but reads and writes to have higher latency and lower throughput.
4012 .sp
4013 All I/O classes have a fixed maximum number of outstanding operations
4014 except for the async write class. Asynchronous writes represent the data
4015 that is committed to stable storage during the syncing stage for
4016 transaction groups. Transaction groups enter the syncing state
4017 periodically so the number of queued async writes will quickly burst up
4018 and then bleed down to zero. Rather than servicing them as quickly as
4019 possible, the I/O scheduler changes the maximum number of active async
4020 write I/Os according to the amount of dirty data in the pool.  Since
4021 both throughput and latency typically increase with the number of
4022 concurrent operations issued to physical devices, reducing the
4023 burstiness in the number of concurrent operations also stabilizes the
4024 response time of operations from other -- and in particular synchronous
4025 -- queues. In broad strokes, the I/O scheduler will issue more
4026 concurrent operations from the async write queue as there's more dirty
4027 data in the pool.
4028 .sp
4029 Async Writes
4030 .sp
4031 The number of concurrent operations issued for the async write I/O class
4032 follows a piece-wise linear function defined by a few adjustable points.
4033 .nf
4034
4035        |              o---------| <-- zfs_vdev_async_write_max_active
4036   ^    |             /^         |
4037   |    |            / |         |
4038 active |           /  |         |
4039  I/O   |          /   |         |
4040 count  |         /    |         |
4041        |        /     |         |
4042        |-------o      |         | <-- zfs_vdev_async_write_min_active
4043       0|_______^______|_________|
4044        0%      |      |       100% of zfs_dirty_data_max
4045                |      |
4046                |      `-- zfs_vdev_async_write_active_max_dirty_percent
4047                `--------- zfs_vdev_async_write_active_min_dirty_percent
4048
4049 .fi
4050 Until the amount of dirty data exceeds a minimum percentage of the dirty
4051 data allowed in the pool, the I/O scheduler will limit the number of
4052 concurrent operations to the minimum. As that threshold is crossed, the
4053 number of concurrent operations issued increases linearly to the maximum at
4054 the specified maximum percentage of the dirty data allowed in the pool.
4055 .sp
4056 Ideally, the amount of dirty data on a busy pool will stay in the sloped
4057 part of the function between \fBzfs_vdev_async_write_active_min_dirty_percent\fR
4058 and \fBzfs_vdev_async_write_active_max_dirty_percent\fR. If it exceeds the
4059 maximum percentage, this indicates that the rate of incoming data is
4060 greater than the rate that the backend storage can handle. In this case, we
4061 must further throttle incoming writes, as described in the next section.
4062
4063 .SH ZFS TRANSACTION DELAY
4064 We delay transactions when we've determined that the backend storage
4065 isn't able to accommodate the rate of incoming writes.
4066 .sp
4067 If there is already a transaction waiting, we delay relative to when
4068 that transaction will finish waiting.  This way the calculated delay time
4069 is independent of the number of threads concurrently executing
4070 transactions.
4071 .sp
4072 If we are the only waiter, wait relative to when the transaction
4073 started, rather than the current time.  This credits the transaction for
4074 "time already served", e.g. reading indirect blocks.
4075 .sp
4076 The minimum time for a transaction to take is calculated as:
4077 .nf
4078     min_time = zfs_delay_scale * (dirty - min) / (max - dirty)
4079     min_time is then capped at 100 milliseconds.
4080 .fi
4081 .sp
4082 The delay has two degrees of freedom that can be adjusted via tunables.  The
4083 percentage of dirty data at which we start to delay is defined by
4084 \fBzfs_delay_min_dirty_percent\fR. This should typically be at or above
4085 \fBzfs_vdev_async_write_active_max_dirty_percent\fR so that we only start to
4086 delay after writing at full speed has failed to keep up with the incoming write
4087 rate. The scale of the curve is defined by \fBzfs_delay_scale\fR. Roughly speaking,
4088 this variable determines the amount of delay at the midpoint of the curve.
4089 .sp
4090 .nf
4091 delay
4092  10ms +-------------------------------------------------------------*+
4093       |                                                             *|
4094   9ms +                                                             *+
4095       |                                                             *|
4096   8ms +                                                             *+
4097       |                                                            * |
4098   7ms +                                                            * +
4099       |                                                            * |
4100   6ms +                                                            * +
4101       |                                                            * |
4102   5ms +                                                           *  +
4103       |                                                           *  |
4104   4ms +                                                           *  +
4105       |                                                           *  |
4106   3ms +                                                          *   +
4107       |                                                          *   |
4108   2ms +                                              (midpoint) *    +
4109       |                                                  |    **     |
4110   1ms +                                                  v ***       +
4111       |             zfs_delay_scale ---------->     ********         |
4112     0 +-------------------------------------*********----------------+
4113       0%                    <- zfs_dirty_data_max ->               100%
4114 .fi
4115 .sp
4116 Note that since the delay is added to the outstanding time remaining on the
4117 most recent transaction, the delay is effectively the inverse of IOPS.
4118 Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve
4119 was chosen such that small changes in the amount of accumulated dirty data
4120 in the first 3/4 of the curve yield relatively small differences in the
4121 amount of delay.
4122 .sp
4123 The effects can be easier to understand when the amount of delay is
4124 represented on a log scale:
4125 .sp
4126 .nf
4127 delay
4128 100ms +-------------------------------------------------------------++
4129       +                                                              +
4130       |                                                              |
4131       +                                                             *+
4132  10ms +                                                             *+
4133       +                                                           ** +
4134       |                                              (midpoint)  **  |
4135       +                                                  |     **    +
4136   1ms +                                                  v ****      +
4137       +             zfs_delay_scale ---------->        *****         +
4138       |                                             ****             |
4139       +                                          ****                +
4140 100us +                                        **                    +
4141       +                                       *                      +
4142       |                                      *                       |
4143       +                                     *                        +
4144  10us +                                     *                        +
4145       +                                                              +
4146       |                                                              |
4147       +                                                              +
4148       +--------------------------------------------------------------+
4149       0%                    <- zfs_dirty_data_max ->               100%
4150 .fi
4151 .sp
4152 Note here that only as the amount of dirty data approaches its limit does
4153 the delay start to increase rapidly. The goal of a properly tuned system
4154 should be to keep the amount of dirty data out of that range by first
4155 ensuring that the appropriate limits are set for the I/O scheduler to reach
4156 optimal throughput on the backend storage, and then by changing the value
4157 of \fBzfs_delay_scale\fR to increase the steepness of the curve.