public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang Yugui <wangyugui@e16-tech.com>
To: Stefan Roesch <shr@fb.com>
Cc: <linux-btrfs@vger.kernel.org>, <kernel-team@fb.com>
Subject: Re: [PATCH v2 4/4] btrfs: increase metadata alloc size to 5GB for volumes > 50GB
Date: Thu, 28 Oct 2021 09:14:53 +0800	[thread overview]
Message-ID: <20211028091453.E622.409509F4@e16-tech.com> (raw)
In-Reply-To: <20211027201441.3813178-5-shr@fb.com>

Hi,

> This increases the metadata default allocation size from 1GB to 5GB for
> volumes with a size greater than 50GB.

If we change the metadata allocation size from 1GB to 5GB, then we have
less frequency that the unused metadata space is under 32M.

Could we begin to alloc metadata space with the size 1G after unused
metadata space is under 32M?  Is this a better way?

Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2021/10/28


> 
> Signed-off-by: Stefan Roesch <shr@fb.com>
> ---
>  fs/btrfs/space-info.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
> index 570acfebeae4..1314b0924512 100644
> --- a/fs/btrfs/space-info.c
> +++ b/fs/btrfs/space-info.c
> @@ -195,7 +195,7 @@ static u64 compute_stripe_size_regular(struct btrfs_fs_info *info, u64 flags)
>  
>  	/* Handle BTRFS_BLOCK_GROUP_METADATA */
>  	if (info->fs_devices->total_rw_bytes > 50ULL * SZ_1G)
> -		return SZ_1G;
> +		return 5ULL * SZ_1G;
>  
>  	return SZ_256M;
>  }
> -- 
> 2.30.2



  reply	other threads:[~2021-10-28  1:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 20:14 [PATCH v2 0/4] btrfs: sysfs: set / query btrfs stripe size Stefan Roesch
2021-10-27 20:14 ` [PATCH v2 1/4] btrfs: store stripe size and chunk size in space-info struct Stefan Roesch
2021-10-28 13:48   ` Josef Bacik
2021-10-27 20:14 ` [PATCH v2 2/4] btrfs: expose stripe and chunk size in sysfs Stefan Roesch
2021-10-27 20:14 ` [PATCH v2 3/4] btrfs: add force_chunk_alloc sysfs entry to force allocation Stefan Roesch
2021-10-27 20:14 ` [PATCH v2 4/4] btrfs: increase metadata alloc size to 5GB for volumes > 50GB Stefan Roesch
2021-10-28  1:14   ` Wang Yugui [this message]
2021-10-28 13:43 ` [PATCH v2 0/4] btrfs: sysfs: set / query btrfs stripe size Josef Bacik
2021-10-28 14:27   ` Josef Bacik
2021-10-28 15:00     ` Johannes Thumshirn
2021-10-29  3:11       ` Stefan Roesch
2021-10-29  8:31         ` Johannes Thumshirn

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=20211028091453.E622.409509F4@e16-tech.com \
    --to=wangyugui@e16-tech.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=shr@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox