]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r297832: MFV r297831: 6322 ZFS indirect block predictive prefetch
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 11 May 2016 11:35:37 +0000 (11:35 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 11 May 2016 11:35:37 +0000 (11:35 +0000)
commit956ac5b98ff6a376cabde8fa5503897586c144b9
tree29e6fcfab340e43c3b7c94102e1c71578f6c5420
parentc9e3595d148ae9f6450d3d47d004e58a28db633e
MFC r297832: MFV r297831: 6322 ZFS indirect block predictive prefetch

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Author: Alexander Motin <mav@FreeBSD.org>

Improve speculative prefetch of indirect blocks.

Scalability of many operations on wide ZFS pool can be limited by
requirement to prefetch indirect blocks first.  Recently added
asynchronous indirect block read partially helped, but did not
solve the problem completely.  This patch extends existing prefetcher
functionality to explicitly work with indirect blocks.

Before this change prefetcher issued reads for up to 8MB of data in
advance.  With this change it also issues indirect block reads
for up to 64MB of data in advance, so that when it will be time to
actually read those data, it can be done immediately.  Alike effect
can be achieved by just increasing maximal data prefetch distance,
but at higher memory cost.

Also this change introduces indirect block prefetch for rewrite
operations, that was never done before.  Previously ARC miss for
Indirect blocks regularly blocked rewrites, converting perfectly
aligned asynchronous operations into synchronous read-write pairs,
significantly reducing maximal rewrite speed.

While being there this issue was also fixed:
 - prefetch was done always, even if caching for the dataset was
completely disabled.

Testing on FreeBSD with zvol on top of 6x striped 2x mirrored pool
of 12 assorted HDDs shown me such performance numbers:
------- BEFORE --------
Write       491363677 bytes/sec
Read        312430631 bytes/sec
Rewrite      97680464 bytes/sec
-------- AFTER --------
Write       493524146 bytes/sec
Read        438598079 bytes/sec
Rewrite     277506044 bytes/sec

Closes #65
Closes #80

openzfs/openzfs@792fd28ac04f78cc5e43ead2d72a96f244ea84e8

git-svn-id: svn://svn.freebsd.org/base/stable/10@299433 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
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/sys/dmu_zfetch.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h