From: "joshua" <joshua@mailmag.net>
To: waxhead@dirtcellar.net
Cc: "Remi Gauvin" <remi@georgianit.com>, "Qu Wenruo" <wqu@suse.com>,
dsterba@suse.cz, "linux-btrfs" <linux-btrfs@vger.kernel.org>
Subject: Re: Does btrfs filesystem defragment -r also include the trees?
Date: Fri, 21 Apr 2023 14:40:10 -0700 [thread overview]
Message-ID: <3d-64430280-9-3e3db080@90317688> (raw)
In-Reply-To: <59643ed9-3e51-f1b1-3719-a30c3c449f1d@dirtcellar.net>
On Friday, April 21, 2023 10:41 PDT, waxhead <waxhead@dirtcellar.net> wrote:
> > On 2023-04-21 3:57 a.m., Qu Wenruo wrote:
> >>
> >
> >>
> >> I did a quick glance, btrfs_defrag_root() only defrags the target
> >> subvolume, thus there is no way to defrag internal trees.
> >>
> >
> > It did *something* that allows Nautilus and Nemo to navigate a large
> > directory structure without stalling for > 10 seconds when moving back
> > and forth between subdirectories.
> >
> Are you sure that it is not just files being cached?
>
> If you run something like find -type f | parallel md5sum{} on the
> directory/subvolume you can see if it has the same effect.
It's definitely not ONLY files being cached.
I have a large array with 13 HDD's in it, and a total of 53GB of metadata.
I constantly have issues with the mount time being so long that Linux times out and drops to recovery mode.
However, if I regularly run `btrfs fi defrag` on each of my sub-volumes and the root volume, it makes a noticeable difference to mount time. (Though still bad enough I gave up trying to have systemd mount my array and start my services.)
--
--Joshua Villwock
next prev parent reply other threads:[~2023-04-21 21:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 12:37 Does btrfs filesystem defragment -r also include the trees? Remi Gauvin
2023-04-20 22:42 ` David Sterba
2023-04-21 7:57 ` Qu Wenruo
2023-04-21 12:21 ` Remi Gauvin
2023-04-21 17:41 ` waxhead
2023-04-21 21:00 ` Forza
2023-04-21 21:27 ` Remi Gauvin
2023-04-21 21:40 ` joshua [this message]
2023-04-21 22:55 ` Qu Wenruo
2023-04-21 23:25 ` joshua
2023-04-22 0:42 ` Qu Wenruo
2023-04-23 9:34 ` waxhead
2023-04-23 10:50 ` Qu Wenruo
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=3d-64430280-9-3e3db080@90317688 \
--to=joshua@mailmag.net \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=remi@georgianit.com \
--cc=waxhead@dirtcellar.net \
--cc=wqu@suse.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 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.