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