HomeFreeBSD

MFC r287702: 5987 zfs prefetch code needs work

Description

MFC r287702: 5987 zfs prefetch code needs work

Rewrite the ZFS prefetch code to detect only forward, sequential
streams.

The following kstats have been added:

kstat.zfs.misc.arcstats.sync_wait_for_async

    How many sync reads have waited for async read
    to complete. (less is better)

kstat.zfs.misc.arcstats.demand_hit_predictive_prefetch

    How many demand read didn't have to wait for I/O
    because of predictive prefetch.  (more is better)

zfetch kstats have been similified to hits, misses, and max_streams,
with max_streams representing times when we were not able to create
new stream because we already have the maximum number of sequences
for a file.

The sysctl variable/loader tunable vfs.zfs.zfetch.block_cap have been
replaced by vfs.zfs.zfetch.max_distance, which controls maximum bytes
to prefetch per stream.

illumos/illumos-gate@cf6106c8a0d6598b045811f9650d66e07eb332af

Illumos ZFS issues:

5987 zfs prefetch code needs work
https://www.illumos.org/issues/5987

Details

Provenance
mavAuthored on
Parents
rS288593: MFC r287335 (by allanjude):
Branches
Unknown
Tags
Unknown