Bug #8373

TXG_WAIT in ZIL commit path

Added by Andriy Gapon 2 months ago. Updated 26 days ago.

Status:ClosedStart date:2017-06-12
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:zfs - Zettabyte File System
Target version:-
Difficulty:Medium Tags:needs-triage

Description

The code that writes ZIL blocks uses dmu_tx_assign(TXG_WAIT) to assign a transaction to a transaction group.
That seems to be logically incorrect as writing of the ZIL block does not introduce any new dirty data.
Also, when there is a lot of dirty data, the call can introduce significant delays into the ZIL commit path,
thus affecting all synchronous writes. Additionally, ARC throttling may affect the ZIL writing.

We probably need a new mechanism similar to dmu_tx_create_assigned to assign ZIL transactions.
(Ab)using TXG_WAITED does not seem to be sufficient.

History

#1 Updated by Andriy Gapon about 2 months ago

I was wrong about the ARC throttling having an effect on ZIL writes.
Because the ZIL write tx does not have any holds, its estimate of write space is zero and, so, no throttling is applied.

So, the only issue with using TXG_WAITED is a possibility to get an error when the pool is suspended.
That error can be easily handled.

#3 Updated by Electric Monk 26 days ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit d28671a3b094af696bea87f52272d4c4d89321c7

commit  d28671a3b094af696bea87f52272d4c4d89321c7
Author: Andriy Gapon <avg@FreeBSD.org>
Date:   2017-07-25T19:16:48.000Z

    8373 TXG_WAIT in ZIL commit path
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom