From: Wang Yugui <wangyugui@e16-tech.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Qu Wenruo <wqu@suse.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: simple Chunk allocator like calculation to replace Factor based calculation
Date: Fri, 02 Oct 2020 17:01:25 +0800 [thread overview]
Message-ID: <20201002170124.20D8.409509F4@e16-tech.com> (raw)
In-Reply-To: <3cf4a1c4-b4a3-732d-6852-5b13e0cb1bf4@gmx.com>
Hi,
We have another user case difficult to process.
Use case:
Add 10T disk * 4 to near full full RAID10 10T *4;
free space maybe be such as 10T,10T,10T,10T,2G,2G,2G,2G.
There maybe a lot of iterations for this case because of 2G chunk size,
and then result in bad performance?
Best Regards
王玉贵
2020/10/02
>
>
> On 2020/10/2 上午9:59, Wang Yugui wrote:
> > Hi,
> >
> >
> >>> such as
> >>> 1) RAID10 with 8T,1T,1T,1T,1T
> >>> the virtal chunk size of 1st iteration: 1T or 0.33T?
> >>> 1T chunk will use 4T at most
> >>> 0.33T chunk will use 5.33T at most?
> >>
> >> You didn't get the point.
> >> For the each loop we:
> >> - Sort the devices with their free space.
> >> In this case, it's 8, 1, 1, 1, 1.
> >>
> >> - Round down to dev increament
> >> Then we got 8, 1, 1, 1.
> >>
> >> - Then allocate chunk
> >> Since the biggest unallocated space is 1T, we allocate a RAID10 with
> >> 1T stripe size, which will be a 2T chunk.
> >>
> >> The remaining size is 7, 0, 0, 0, 1.
> >
> > That is the problem. 1T chunk size is too big for this case.
> >
> > if we use 1/3T chunk size, the result will be same as 1G chunk size.
> >
> > 1st: 8T - 1/3T 2/3T, 2/3T, 2/3T, 1T
> > 2nd: 8T -2/3T 2/3T, 1/3T, 1/3T, 2/3T
> > 3rd: 8T -1T 1/3T, 1/3T, 0T, 1/3T
> > 4th: 8T -4/3T 0T, 0T, 0T, 0T
>
> You're right, smaller balloon chunk size would make the allocation more
> accurate to real chunk allocator.
>
> However that would slow down the calculation, don't forget that we need
> to run that calculation on each chunk allocation.
> Changing the balloon chunk allocation size dynamically may improve this.
>
> But please also keep in mind that, with less and less space left, our
> predication will be more and more accurate, and under estimate is always
> less a problem.
>
> So I'll keep your suggestion for future enhancement.
>
> Thanks for pointing out the pitfall of current calculation,
> Qu
>
> >
> > Best Regards
> > 王玉贵
> > 2020/10/02
> >
> >>
> >> - We go to next round.
> >> No way to allocate new chunk.
> >>
> >> In this case, we can only get 2T chunk.
> >> Just as the chunk allocator do.
> >>
> >>>
> >>> 2) RAID10 with 8T,1T,1T,1T,0.5T
> >>> the virtal chunk size of 1st iteration:0.5T or smaller?
> >>
> >> Still the same, 2T chunk can be allocated using the largest 4 devices.
> >>
> >> Thanks,
> >> Qu
> >>
> >>>
> >>> Best Regards
> >>> 王玉贵
> >>> 2020/10/02
> >>>
> >>>
> >>> --------------------------------------
> >>> 北京京垓科技有限公司
> >>> 王玉贵 wangyugui@e16-tech.com
> >>> 电话:+86-136-71123776
> >>>
> >>
> >
> > --------------------------------------
> > 北京京垓科技有限公司
> > 王玉贵 wangyugui@e16-tech.com
> > 电话:+86-136-71123776
> >
>
--------------------------------------
北京京垓科技有限公司
王玉贵 wangyugui@e16-tech.com
电话:+86-136-71123776
next prev parent reply other threads:[~2020-10-02 9:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201001212617.82BC.409509F4@e16-tech.com>
[not found] ` <20201001233649.888B.409509F4@e16-tech.com>
2020-10-01 23:38 ` simple Chunk allocator like calculation to replace Factor based calculation Qu Wenruo
2020-10-02 1:30 ` Wang Yugui
2020-10-02 1:46 ` Qu Wenruo
2020-10-02 1:59 ` Wang Yugui
2020-10-02 3:06 ` Qu Wenruo
2020-10-02 9:01 ` Wang Yugui [this message]
2020-10-02 9:15 ` Qu Wenruo
2020-10-02 9:06 ` Wang Yugui
2020-10-02 10:13 ` Hugo Mills
2020-10-02 10:23 ` Hugo Mills
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=20201002170124.20D8.409509F4@e16-tech.com \
--to=wangyugui@e16-tech.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox