zfs_prefetch_disable Parameter
- Description
-
This parameter determines a file-level prefetching mechanism called
zfetch. This mechanism looks at the patterns of reads to files and anticipates on some reads, thereby reducing application wait times. The current behavior suffers from two drawbacks:-
Sequential read patterns made of small reads very often hit in the cache. In this case, the current behavior consumes a significant amount of CPU time trying to find the next I/O to issue, whereas performance is governed more by the CPU availability.
-
The
zfetchcode has been observed to limit scalability of some loads. CPU profiling can be done by using thelockstat‐I command orer_kernel. For detailed descriptions, see the following sources:Although never recommended, you can disable prefetching by setting
zfs_prefetch_disablein a file the/etc/system.ddirectory. For instructions, see /etc/system.d/ Directory Files.Device-level prefetching is disabled when
zfs_vdev_cache_sizeis disabled. This means that tuningvdev cache shiftis no longer necessary ifzfs_vdev_cache_sizeis disabled.
-
- Data Type
-
Boolean
- Default
-
0 (enabled)
- Range
-
0 (enabled) or 1 (disabled)
- Dynamic?
-
Yes
- Validation
-
No
- When to Change
-
If the results of
er_kernelshow significant time inzfetch_*functions, or if lock profiling withlockstatshows contention aroundzfetchlocks, and if the affected workload is critical, then disabling file level prefetching should be considered. Other workloads that are running concurrently can be degraded. - Commitment Level
-
Unstable