freebsd-skq/cmd
Andriy Gapon f3dbcb8c81 8585 improve batching done in zil_commit()
illumos/illumos-gate@1271e4b10d
1271e4b10d

https://www.illumos.org/issues/8585
  The current implementation of zil_commit() can introduce significant
  latency, beyond what is inherent due to the latency of the underlying
  storage. The additional latency comes from two main problems:
  1. When there's outstanding ZIL blocks being written (i.e. there's
      already a "writer thread" in progress), then any new calls to
      zil_commit() will block waiting for the currently oustanding ZIL
      blocks to complete. The blocks written for each "writer thread" is
      coined a "batch", and there can only ever be a single "batch" being
      written at a time. When a batch is being written, any new ZIL
      transactions will have to wait for the next batch to be written,
      which won't occur until the current batch finishes.
  As a result, the underlying storage may not be used as efficiently
      as possible. While "new" threads enter zil_commit() and are blocked
      waiting for the next batch, it's possible that the underlying
      storage isn't fully utilized by the current batch of ZIL blocks. In
      that case, it'd be better to allow these new threads to generate
      (and issue) a new ZIL block, such that it could be serviced by the
      underlying storage concurrently with the other ZIL blocks that are
      being serviced.
  2. Any call to zil_commit() must wait for all ZIL blocks in its "batch"
      to complete, prior to zil_commit() returning. The size of any given
      batch is proportional to the number of ZIL transaction in the queue
      at the time that the batch starts processing the queue; which
      doesn't occur until the previous batch completes. Thus, if there's a
      lot of transactions in the queue, the batch could be composed of
      many ZIL blocks, and each call to zil_commit() will have to wait for
      all of these writes to complete (even if the thread calling
      zil_commit() only cared about one of the transactions in the batch).

Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>
2017-09-13 10:59:36 +00:00
..
dtrace fix up r319744, add new files 2017-06-09 15:06:50 +00:00
lockstat Import the lockstat(1) sources from OpenSolaris as of 20080410. 2009-06-18 17:25:38 +00:00
mdb/tools/common Vendor import of the full userland contrib part of DTrace support from 2008-04-26 00:54:52 +00:00
plockstat Import plockstat from OpenSolaris r12768. 2010-07-19 14:57:01 +00:00
pyzfs Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00
sgs Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00
stat/common Update vendor/illumos/dist and vendor-sys/illumos/dist 2013-02-11 08:07:56 +00:00
zdb 8067 zdb should be able to dump literal embedded block pointer 2017-08-08 11:10:37 +00:00
zfs 7431 ZFS Channel Programs 2017-09-13 10:45:49 +00:00
zhack 6314 buffer overflow in dsl_dataset_name 2016-07-12 12:01:54 +00:00
zinject 6531 Provide mechanism to artificially limit disk performance 2016-03-08 16:11:59 +00:00
zlook Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00
zpool 7431 ZFS Channel Programs 2017-09-13 10:45:49 +00:00
zstreamdump 7252 7628 compressed zfs send / receive 2017-04-14 18:07:43 +00:00
ztest 8585 improve batching done in zil_commit() 2017-09-13 10:59:36 +00:00