linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lionel Bouton <lionel-subscription@bouton.name>
To: Hans van Kranenburg <Hans.van.Kranenburg@mendix.com>,
	"Wilson, Ellis" <ellisw@panasas.com>,
	BTRFS <linux-btrfs@vger.kernel.org>
Subject: [Mount time bug bounty?] was: BTRFS Mount Delay Time Graph
Date: Tue, 4 Dec 2018 17:45:47 +0100	[thread overview]
Message-ID: <0a25ef18-83d1-de59-e2ab-1f36b04d9625@bouton.name> (raw)
In-Reply-To: <57bdbd3d-e605-7dad-4b9a-d78a2f657dce@mendix.com>

Le 03/12/2018 à 23:22, Hans van Kranenburg a écrit :
> [...]
> Yes, I think that's true. See btrfs_read_block_groups in extent-tree.c:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/btrfs/extent-tree.c#n9982
>
> What the code is doing here is starting at the beginning of the extent
> tree, searching forward until it sees the first BLOCK_GROUP_ITEM (which
> is not that far away), and then based on the information in it, computes
> where the next one will be (just after the end of the vaddr+length of
> it), and then jumps over all normal extent items and searches again near
> where the next block group item has to be. So, yes, that means that they
> depend on each other.
>
> Two possible ways to improve this:
>
> 1. Instead, walk the chunk tree (which has all related items packed
> together) instead to find out at which locations in the extent tree the
> block group items are located and then start getting items in parallel.
> If you have storage with a lot of rotating rust that can deliver much
> more random reads if you ask for more of them at the same time, then
> this can already cause a massive speedup.
>
> 2. Move the block group items somewhere else, where they can nicely be
> grouped together, so that the amount of metadata pages that has to be
> looked up is minimal. Quoting from the link below, "slightly tricky
> [...] but there are no fundamental obstacles".
>
> https://www.spinics.net/lists/linux-btrfs/msg71766.html
>
> I think the main obstacle here is finding a developer with enough
> experience and time to do it. :)

I would definitely be interested in sponsoring at least a part of the
needed time through my company (we are too small to hire kernel
developers full-time but we can make a one-time contribution for
something as valuable to us as faster mount delays).

If needed it could be split in two steps with separate bounties :
- providing a patch for the latest LTS kernel with a substantial
decrease in mount time in our case (ideally less than a minute instead
of 15 minutes but <5 minutes is already worth it).
- having it integrated in mainline.

I don't have any experience with company sponsorship/bounties but I'm
willing to learn (don't hesitate to make suggestions). I'll have to
discuss it with our accountant to make sure we do it correctly.

Is it the right place to discuss this kind of subject or should I take
the discussion elsewhere ?

Best regards,

Lionel

  reply	other threads:[~2018-12-04 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 18:20 BTRFS Mount Delay Time Graph Wilson, Ellis
2018-12-03 19:56 ` Lionel Bouton
2018-12-03 20:04   ` Lionel Bouton
2018-12-04  2:52     ` Chris Murphy
2018-12-04 15:08       ` Lionel Bouton
2018-12-03 22:22   ` Hans van Kranenburg
2018-12-04 16:45     ` Lionel Bouton [this message]
2018-12-04  0:16 ` Qu Wenruo
2018-12-04 13:07 ` Nikolay Borisov
2018-12-04 13:31   ` Qu Wenruo
2018-12-04 20:14   ` Wilson, Ellis
2018-12-05  6:55     ` Nikolay Borisov
2018-12-20  5:47       ` Qu Wenruo
2018-12-26  3:43         ` Btrfs_read_block_groups() delay (Was Re: BTRFS Mount Delay Time Graph) 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=0a25ef18-83d1-de59-e2ab-1f36b04d9625@bouton.name \
    --to=lionel-subscription@bouton.name \
    --cc=Hans.van.Kranenburg@mendix.com \
    --cc=ellisw@panasas.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).