From: Dmitrii Tcvetkov <demfloro@demfloro.ru>
To: Timofey Titovets <nefelim4ag@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V3] Btrfs: enchanse raid1/10 balance heuristic
Date: Mon, 1 Jan 2018 22:53:14 +0300 [thread overview]
Message-ID: <20180101225314.340c53e7@xps.localdomain> (raw)
In-Reply-To: <20171231002902.70599c8d@demfloro.ru>
[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]
On Sun, 31 Dec 2017 00:29:11 +0300
Dmitrii Tcvetkov <demfloro@demfloro.ru> wrote:
> On Sat, 30 Dec 2017 23:32:04 +0300
> Timofey Titovets <nefelim4ag@gmail.com> wrote:
>
> > Currently btrfs raid1/10 balancer balance requests to mirrors,
> > based on pid % num of mirrors.
> >
> > Make logic understood:
> > - if one of underline devices are non rotational
> > - Queue leght to underline devices
> >
> > By default try use pid % num_mirrors guessing, but:
> > - If one of mirrors are non rotational, repick optimal to it
> > - If underline mirror have less queue leght then optimal,
> > repick to that mirror
> >
> > For avoid round-robin request balancing,
> > lets round down queue leght:
> > - By 8 for rotational devs
> > - By 2 for all non rotational devs
> >
> > Changes:
> > v1 -> v2:
> > - Use helper part_in_flight() from genhd.c
> > to get queue lenght
> > - Move guess code to guess_optimal()
> > - Change balancer logic, try use pid % mirror by default
> > Make balancing on spinning rust if one of underline devices
> > are overloaded
> > v2 -> v3:
> > - Fix arg for RAID10 - use sub_stripes, instead of num_stripes
> >
> > Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
>
> Reviewed-by: Dmitrii Tcvetkov <demfloro@demfloro.ru>
>
Tested-by: Dmitrii Tcvetkov <demfloro@demfloro.ru>
Benchmark summary (arithmetic mean of 3 runs):
Mainline Patch
--------------------------------------------------------------
RAID1 | 18.9 MiB/s | 26.5 MiB/s
RAID10 | 30.7 MiB/s | 30.7 MiB/s
fio configuration:
[global]
ioengine=libaio
buffered=0
direct=1
bssplit=32k/100
size=8G
directory=/mnt/
iodepth=16
time_based
runtime=900
[test-fio]
rw=randread
All tests were run on 4 HDD btrfs filesystem in a VM with 4 Gb
of ram on idle host. Full results attached to the email.
[-- Attachment #2: results.tar.gz --]
[-- Type: application/gzip, Size: 4026 bytes --]
next prev parent reply other threads:[~2018-01-01 19:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-30 20:32 [PATCH V3] Btrfs: enchanse raid1/10 balance heuristic Timofey Titovets
2017-12-30 21:29 ` Dmitrii Tcvetkov
2018-01-01 19:53 ` Dmitrii Tcvetkov [this message]
2018-01-02 18:31 ` Liu Bo
2018-01-02 21:23 ` Timofey Titovets
2018-02-20 15:45 ` Timofey Titovets
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=20180101225314.340c53e7@xps.localdomain \
--to=demfloro@demfloro.ru \
--cc=linux-btrfs@vger.kernel.org \
--cc=nefelim4ag@gmail.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;
as well as URLs for NNTP newsgroup(s).