Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: linux-btrfs@vger.kernel.org, hch@infradead.org, dsterba@suse.cz
Subject: Re: [PATCH v3 00/10] btrfs: zoned: write-time activation of metadata block group
Date: Thu, 10 Aug 2023 09:34:58 -0400	[thread overview]
Message-ID: <20230810133458.GB2621164@perftesting> (raw)
In-Reply-To: <cover.1691424260.git.naohiro.aota@wdc.com>

On Tue, Aug 08, 2023 at 01:12:30AM +0900, Naohiro Aota wrote:
> In the current implementation, block groups are activated at
> reservation time to ensure that all reserved bytes can be written to
> an active metadata block group. However, this approach has proven to
> be less efficient, as it activates block groups more frequently than
> necessary, putting pressure on the active zone resource and leading to
> potential issues such as early ENOSPC or hung_task.
> 
> Another drawback of the current method is that it hampers metadata
> over-commit, and necessitates additional flush operations and block
> group allocations, resulting in decreased overall performance.
> 
> Actually, we don't need so many active metadata block groups because
> there is only one sequential metadata write stream.
> 
> So, this series introduces a write-time activation of metadata and
> system block group. This involves reserving at least one active block
> group specifically for a metadata and system block group. When the
> write goes into a new block group, it should have allocated all the
> regions in the current active block group. So, we can wait for IOs to
> fill the space, and then switch to a new block group.
> 
> Switching to the write-time activation solves the above issue and will
> lead to better performance.
> 
> * Performance
> 
> There is a significant difference with a workload (buffered write without
> sync) because we re-enable metadata over-commit.
> 
> before the patch:  741.00 MB/sec
> after the patch:  1430.27 MB/sec (+ 93%)
> 
> * Organization
> 
> Patches 1-5 are preparation patches involves meta_write_pointer check.
> 
> Patches 6 and 7 are the main part of this series, implementing the
> write-time activation.
> 
> Patches 8-10 addresses code for reserve time activation: counting fresh
> block group as zone_unusable, activating a block group on allocation,
> and disabling metadata over-commit.
> 
> * Changes

Additionally you had these failures in the CI setup

btrfs/220 btrfs/237 btrfs/239 btrfs/273 btrfs/295 generic/551 generic/574

I've excluded them so we can catch regressions, but everything except btrfs/220
seem like legitimate failures.  btrfs/220 needs to be updated since zoned
doesn't do discard=async, but you can do that whenever, I'm less worried about
that.  The rest should be investigated at some point, though not as a
prerequisite for merging this series.  Thanks,

Josef

  parent reply	other threads:[~2023-08-10 13:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 16:12 [PATCH v3 00/10] btrfs: zoned: write-time activation of metadata block group Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 01/10] btrfs: introduce struct to consolidate extent buffer write context Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 02/10] btrfs: zoned: introduce block group context to btrfs_eb_write_context Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 03/10] btrfs: zoned: return int from btrfs_check_meta_write_pointer Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 04/10] btrfs: zoned: defer advancing meta_write_pointer Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 05/10] btrfs: zoned: update meta_write_pointer on zone finish Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 06/10] btrfs: zoned: reserve zones for an active metadata/system block group Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 07/10] btrfs: zoned: activate metadata block group on write time Naohiro Aota
2023-08-09 16:42   ` David Sterba
2023-08-07 16:12 ` [PATCH v3 08/10] btrfs: zoned: no longer count fresh BG region as zone unusable Naohiro Aota
2023-08-09 16:49   ` David Sterba
2023-08-07 16:12 ` [PATCH v3 09/10] btrfs: zoned: don't activate non-DATA BG on allocation Naohiro Aota
2023-08-07 16:12 ` [PATCH v3 10/10] btrfs: zoned: re-enable metadata over-commit for zoned mode Naohiro Aota
2023-08-09 18:02 ` [PATCH v3 00/10] btrfs: zoned: write-time activation of metadata block group David Sterba
2023-08-10 12:59 ` Josef Bacik
2023-08-10 14:13   ` Naohiro Aota
2023-08-10 13:34 ` Josef Bacik [this message]
2023-08-10 14:34   ` Naohiro Aota
2023-08-10 14:36     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230810133458.GB2621164@perftesting \
    --to=josef@toxicpanda.com \
    --cc=dsterba@suse.cz \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox