TXG_WAIT in ZIL commit path
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.
Updated by Andriy Gapon about 2 years 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.
Updated by Electric Monk about 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
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 <email@example.com> Reviewed by: Prakash Surya <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>