]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - contrib/ntp/tests/libntp/g_modetoa.cpp
MFV r287624: 5987 zfs prefetch code needs work
authorXin LI <delphij@FreeBSD.org>
Sat, 12 Sep 2015 08:35:51 +0000 (08:35 +0000)
committerXin LI <delphij@FreeBSD.org>
Sat, 12 Sep 2015 08:35:51 +0000 (08:35 +0000)
commit8c4f41ff344d7cae26a7195f82670b65bb185b00
tree295b2de791b277bb1e2c4844d9a29a909692dc20
parentec4f7bd978f65c8ed81399f309002a0ad7e9aea4
parent981f27b3d6af630ebb7dd00cfd600eacc1c56dee
MFV r287624: 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
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h