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