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