Project

General

Profile

Bug #6288

dmu_buf_will_dirty could be faster

Added by Matthew Ahrens almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-10-06
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

For some workloads (e.g. deletion of files whose indirect blocks are cached), the time is dominated by spa_sync() repeatedly calling dmu_buf_will_dirty() on the same dbufs (e.g. the dataset's ds_dbuf, the bpobj's bpo_cached_dbuf and bpo_dbuf).

We can improve the performance of dmu_buf_will_dirty() by adding a fast path for already-dirty bufs.

In the example workload (removal of files whose indirect blocks are cached), this fix doubled performance.
trunk bits: dmu_buf_will_dirty() uses 40% of (non-idle) CPU
with fix: dmu_buf_will_dirty() uses <3% of (non-idle) CPU

History

#1

Updated by Electric Monk almost 4 years ago

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

git commit 0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0

commit  0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2015-10-09T17:44:48.000Z

    6288 dmu_buf_will_dirty could be faster
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
    Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF