]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reduce taskq and context-switch cost of zio pipe
authormav <mav@FreeBSD.org>
Fri, 3 Aug 2018 02:16:45 +0000 (02:16 +0000)
committermav <mav@FreeBSD.org>
Fri, 3 Aug 2018 02:16:45 +0000 (02:16 +0000)
commit592eca31793c2701bb921e959e0cf7894f9d076f
treea1863de998d9997e08bff5c01e2dfcc9f8d770e4
parenta68b7794d2a2a35fbd22a5a59f6999ae63250d2e
Reduce taskq and context-switch cost of zio pipe

When doing a read from disk, ZFS creates 3 ZIO's: a zio_null(), the
logical zio_read(), and then a physical zio. Currently, each of these
results in a separate taskq_dispatch(zio_execute).

On high-read-iops workloads, this causes a significant performance
impact. By processing all 3 ZIO's in a single taskq entry, we reduce the
overhead on taskq locking and context switching.  We accomplish this by
allowing zio_done() to return a "next zio to execute" to zio_execute().

This results in a ~12% performance increase for random reads, from
96,000 iops to 108,000 iops (with recordsize=8k, on SSD's).

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: George Wilson <george.wilson@delphix.com>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
External-issue: DLPX-59292
Closes #7736

zfsonlinux/zfs@62840030a7dceaee013ddbcc1eebcfc7922edf7c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c