]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - contrib/groff/font/devps/HNR
MFV r316917: 7968 multi-threaded spa_sync()
authorAndriy Gapon <avg@FreeBSD.org>
Wed, 24 May 2017 22:21:24 +0000 (22:21 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Wed, 24 May 2017 22:21:24 +0000 (22:21 +0000)
commit5386d7295aba035f0eb7013524ac673701c2d752
tree7a3e80c1f214a9f4cd886ff688cf113de1bafcaf
parent2ba631553c7ceb318098c9a34cbf80a234f99658
parent318cd645a2297f3ec4130b65193684dab4684418
MFV r316917: 7968 multi-threaded spa_sync()

illumos/illumos-gate@94c2d0eb22e9624151ee84a7edbf7178e1bf4087
https://github.com/illumos/illumos-gate/commit/94c2d0eb22e9624151ee84a7edbf7178e1bf4087

https://www.illumos.org/issues/7968
  spa_sync() iterates over all the dirty dnodes and processes each of them by
  calling dnode_sync(). If there are many dirty dnodes (e.g. because we created
  or removed a lot of files), the single thread of spa_sync() calling
  dnode_sync() can become a bottleneck. Additionally, if many dnodes are dirtied
  concurrently in open context (e.g. due to concurrent file creation), the
  os_lock will experience lock contention via dnode_setdirty().
  The solution is to track dirty dnodes on a multilist_t, and for spa_sync() to
  use separate threads to process each of the sublists in the multilist.
  On the concurrent file creation microbenchmark, the performance improvement
  from dnode_setdirty() is up to 7%. Additionally, the wall clock time spent in
  spa_sync() is reduced to 15%-40% of the single-threaded case. In terms of cost/
  reward, once the other bottlenecks are addressed, fixing this bug will provide
  a medium-large performance gain and require a medium amount of effort to
  implement.

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>
MFC after: 3 weeks
15 files changed:
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_objset.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c