All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Corallo <blnxfsl@bluematt.me>
To: Forza <forza@tnonline.net>, Roman Mamedov <rm@romanrm.net>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Salvaging the performance of a high-metadata filesystem
Date: Sat, 4 Mar 2023 17:22:22 -0800	[thread overview]
Message-ID: <5e539171-0ea7-fd2c-e041-54d8f9b3097d@bluematt.me> (raw)
In-Reply-To: <a8c6921c-48a4-9511-8df8-5250d819fb46@tnonline.net>



On 3/4/23 12:24 AM, Forza wrote:
> Unless you need to, replace relatime with noatime. This makes a big difference when you have lots of 
> reflinks or snapshots as it avoids de-duplication of metadata when the atimes are updated.

Yea, I've done that now, thanks. I'm vaguely surprised this big a footgun is the default, and not 
much more aggressively in the subvolume manpage, at least.

> Not sure if running with multiple profiles will cause issues or slowness, but it might be good to 
> try to convert the old raid1c3 data chunks into raid1 over time. You can use balance filters to 
> minimise the work each run.

I don't think that's really an option. It took something like six months or a year to get as much 
raid1c3 as there is, and the filesystem has slowed down considerably since. Trying to rate-limit 
going back just means it'll take forever instead.

> # btrfs balance start -dconvert=raid1,soft,limit=10 /bigraid
> 
> This will avoid balancing blockgroups already in RAID1 (soft option) and limit to only balance 10 
> block groups. You can then schedule this during times with less active I/O.
> 
> It is also possible to defragment the subvolume and extent trees[*]. This could help a little, 
> though if the filesystem is frequently changing it might only be a temporary thing. It can also take 
> a long time to complete.

IIUC that can de-share the metadata from subvolumes though, no? Which is a big part of the 
(presumed) problem currently.

> # btrfs filesystem defragment /path/to/subvolume-root
> 
> [*] https://wiki.tnonline.net/w/Btrfs/Defrag#Defragmenting_the_subvolume_and_extent_trees
> 

  parent reply	other threads:[~2023-03-05  1:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  4:34 Salvaging the performance of a high-metadata filesystem Matt Corallo
2023-03-03  5:22 ` Roman Mamedov
2023-03-03  9:30   ` Forza
2023-03-03 19:04     ` Matt Corallo
2023-03-03 19:05       ` Matt Corallo
2023-03-04  8:24         ` Forza
2023-03-04 17:25           ` Goffredo Baroncelli
2023-03-05  1:22           ` Matt Corallo [this message]
2023-03-05  8:23             ` Forza
2023-03-05  9:36 ` Lukas Straub

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=5e539171-0ea7-fd2c-e041-54d8f9b3097d@bluematt.me \
    --to=blnxfsl@bluematt.me \
    --cc=forza@tnonline.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.