All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: Anand Jain <anand.jain@oracle.com>,
	Jingyun He <jingyun.ho@gmail.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Naohiro Aota <Naohiro.Aota@wdc.com>
Subject: Re: btrfs mount takes too long time
Date: Tue, 31 Aug 2021 18:47:44 +0200	[thread overview]
Message-ID: <20210831164744.GM3379@twin.jikos.cz> (raw)
In-Reply-To: <PH0PR04MB74166604ACA14137484EA6E59BCC9@PH0PR04MB7416.namprd04.prod.outlook.com>

On Tue, Aug 31, 2021 at 01:10:38PM +0000, Johannes Thumshirn wrote:
> [ +Cc Naohiro ]
> 
> On 31/08/2021 14:11, Anand Jain wrote:
> > But let's see what part in btrfs_load_block_group_zone_info() is taking
> > most of the time. Could you please help get this output?
> 
> I'd suspect it's the btrfs_get_dev_zone() call that we need to do for 
> each block group in order to determine the current write pointer to
> set block_group->alloc_offset.
> 
> We could speed up the mount process by caching the device's REPORT ZONES
> response, as we're doing a REPORT ZONES once to get all zones and then 
> again per block group load. On a 14TB SMR drive this results in 
> (14  * 1024 * 1024) / 256 + 1 = 57345 REPORT ZONES calls. OTOH 
> struct blk_zone is 64 bytes per zone resulting in 64 * 57344 = 3584kB
> data to be cached.
> 
> So the solution should probably somewhere in between, aka caching X 
> REPORT ZONES responses before we need to do a new one.

That sounds like a good option. The number of new members in block group
struct has grown due to zoned support, this means higher memory
requirements, scaling up with device size. We'll have to do something
about that eventually.

  reply	other threads:[~2021-08-31 16:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28 11:58 btrfs mount takes too long time Jingyun He
2021-08-28 23:47 ` Anand Jain
     [not found]   ` <CAHQ7scVkHp8Lcfxx2QZXv2ghkW-nYpiFGntyZa0Toz2hU3S-tQ@mail.gmail.com>
2021-08-30  1:27     ` Anand Jain
     [not found]       ` <CAHQ7scUiNLVD_4---ArBet-0DqzfmmH5Y9JgQY0grYrUv8yhiQ@mail.gmail.com>
2021-08-30 13:04         ` Anand Jain
2021-08-30 13:04         ` Anand Jain
     [not found]           ` <CAHQ7scVOYuzz58KcO_fo2rph44CCC46ef=LFVZF8XzoKYq27ig@mail.gmail.com>
2021-08-31 11:09             ` Anand Jain
2021-08-31 13:10               ` Johannes Thumshirn
2021-08-31 16:47                 ` David Sterba [this message]
2021-09-07  5:29                   ` Naohiro Aota
     [not found]               ` <CAHQ7scXp9gTANB9gWHqQgXUsnF-YvTOKrK1waUScmqvHU_0ifw@mail.gmail.com>
2021-09-07  9:52                 ` Anand Jain
2021-09-01 16:11           ` Dāvis Mosāns
2021-09-01 21:30             ` Anand Jain
2021-09-02 16:56               ` Dāvis Mosāns
2021-09-03  9:56                 ` Anand Jain
2021-09-02 17:34               ` Joshua
2021-09-01 23:42             ` 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=20210831164744.GM3379@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=anand.jain@oracle.com \
    --cc=jingyun.ho@gmail.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 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.