From: Kent Overstreet <kent.overstreet@gmail.com>
To: "Marcin Mirosław" <marcin@mejor.pl>
Cc: linux-bcache@vger.kernel.org
Subject: Re: [bcachefs] time of mounting filesystem with high number of dirs
Date: Fri, 9 Sep 2016 01:00:49 -0800 [thread overview]
Message-ID: <20160909090049.o45khhwy5t52icch@kmo-pixel> (raw)
In-Reply-To: <6720d1e4-29f9-28a2-18ba-63c7380a3ee8@mejor.pl>
On Fri, Sep 09, 2016 at 09:52:56AM +0200, Marcin Mirosław wrote:
> I'm using defaults from bcache format, knobs don't have description
> aboutwneh I should change some options or when I should don't touch it.
> On this, particular filesystem btree_node_size=128k according to sysfs.
Yeah, documentation needs work. Next time you format maybe try 256k, I'd like to
know if that helps.
> > Mounting taking 12 minutes (and the amount of IO you were seeing) implies to me
> > that a metadata isn't being cached as well as it should be though, which is odd
> > considering outside of journal replay we aren't doing random access, all the
> > metadata access is inorder scans. So yeah, definitely want that timing
> > information...
> As I mentioned in emai, box has 1GB of RAM, maybe this is bottleneck?
Yeah, but with fsck off we'll be down to one pass over the dirents btree, so it
won't matter then.
> Timing from dmesg:
>
> [ 375.537762] bcache (sde1): starting mark and sweep:
> [ 376.220196] bcache (sde1): mark and sweep done
> [ 376.220489] bcache (sde1): starting journal replay:
> [ 376.220493] bcache (sde1): journal replay done, 0 keys in 1 entries,
> seq 133015
> [ 376.220496] bcache (sde1): journal replay done
> [ 376.220498] bcache (sde1): starting fs gc:
> [ 575.205355] bcache (sde1): fs gc done
> [ 575.205362] bcache (sde1): starting fsck:
> [ 822.522269] bcache (sde1): fsck done
Initial mark and sweep (walking the extents btree) is fast - that's really good
to know.
So there's no actual need to run the fsck on every mount - I just left it that
way out of an abundance of caution and because on SSD it's cheap. I just add a
mount option to skip the fsck - use mount -o nofsck. That'll cut another few
minutes off your mount time.
> >> # time find /mnt/test/ -type d |wc -l
> >> 10564259
>
> >> real 10m30.305s
> >> user 1m6.080s
> >> sys 3m43.770s
>
> >> # time find /mnt/test/ -type f |wc -l
> >> 9145093
>
> >> real 6m28.812s
> >> user 1m3.940s
> >> sys 3m46.210s
Do you know around how long those find operations take on ext4 with similar
hardware/filesystem contents? I hope we don't just suck at walking directories.
next prev parent reply other threads:[~2016-09-09 9:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 20:09 [bcachefs] time of mounting filesystem with high number of dirs Marcin
2016-09-07 21:12 ` Kent Overstreet
2016-09-09 1:56 ` Kent Overstreet
2016-09-09 2:07 ` Christopher James Halse Rogers
2016-09-09 7:52 ` Marcin Mirosław
2016-09-09 9:00 ` Kent Overstreet [this message]
2016-09-12 12:59 ` Marcin
2016-09-13 2:35 ` Kent Overstreet
2016-10-05 12:51 ` Marcin Mirosław
2016-10-06 13:01 ` Kent Overstreet
2016-10-18 12:14 ` [bcachefs] time of mounting filesystem with high number of dirs aka ageing filesystem Marcin Mirosław
2016-10-18 12:45 ` Kent Overstreet
2016-10-18 12:51 ` Marcin Mirosław
2016-10-18 13:04 ` Kent Overstreet
2016-10-18 13:13 ` Marcin Mirosław
2016-10-18 13:19 ` Kent Overstreet
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=20160909090049.o45khhwy5t52icch@kmo-pixel \
--to=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=marcin@mejor.pl \
/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