From: louis@waffle.tech
To: "Nikolay Borisov" <nborisov@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: balance RAID1/RAID10 mirror selection
Date: Fri, 16 Oct 2020 16:18:11 +0000 [thread overview]
Message-ID: <3ac1cd1113ac25f11bbed6c90d814fd8@waffle.tech> (raw)
In-Reply-To: <4226ff1b-e313-2881-0670-965e7e98ce59@suse.com>
October 16, 2020 1:15 AM, "Nikolay Borisov" <nborisov@suse.com> wrote:
> On 16.10.20 г. 8:59 ч., louis@waffle.tech wrote:
>
>> Balance RAID1/RAID10 mirror selection via plain round-robin scheduling. This should roughly double
>> throughput for large reads.
>>
>> Signed-off-by: Louis Jencka <louis@waffle.tech>
>
> Can you show numbers substantiating your claims?
Sure thing. Below are the results from some tests I've run using a Debian 10 VM. It has two 10GiB disks attached which are each independently limited to 100MB/s total IO (using libvirt's iotune feature). They've been used to create the RAID1 volume mounted at /mnt. I've truncated the fio output to just show the high-level stats.
Reading a large file performs twice as well with the patch applied (203 MB/s vs 101 MB/s). Writing a large file, and the random read-write tests, look like they perform roughly the same to me.
Louis
---
Without patch
=============
louis@debian:/mnt$ uname -a
Linux debian 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux
louis@debian:/mnt$ btrfs fi df /mnt
Data, RAID1: total=7.00GiB, used=2.00MiB
System, RAID1: total=8.00MiB, used=16.00KiB
Metadata, RAID1: total=1.00GiB, used=688.00KiB
GlobalReserve, single: total=29.19MiB, used=352.00KiB
louis@debian:/mnt$ dd if=/dev/urandom of=/mnt/test bs=1M count=1024 conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 12.928 s, 83.1 MB/s
louis@debian:/mnt$ dd if=/mnt/test of=/dev/null
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 10.6403 s, 101 MB/s
louis@debian:/mnt$ fio --name=random-rw --ioengine=posixaio --rw=randrw --bs=4k --numjobs=2 --size=2g --iodepth=1 --runtime=60 --time_based --end_fsync=1
random-rw: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
...
Run status group 0 (all jobs):
READ: bw=15.8MiB/s (16.5MB/s), 7459KiB/s-8671KiB/s (7638kB/s-8879kB/s), io=964MiB (1010MB), run=61179-61179msec
WRITE: bw=15.8MiB/s (16.6MB/s), 7490KiB/s-8682KiB/s (7670kB/s-8890kB/s), io=966MiB (1013MB), run=61179-61179msec
With patch
==========
louis@debian:/mnt$ uname -a
Linux debian 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1a~test (2020-10-15) x86_64 GNU/Linux
louis@debian:/mnt$ dd if=/dev/urandom of=/mnt/test bs=1M count=1024 conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 11.8067 s, 90.9 MB/s
louis@debian:/mnt$ dd if=/mnt/test of=/dev/null
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.28642 s, 203 MB/s
louis@debian:/mnt$ fio --name=random-rw --ioengine=posixaio --rw=randrw --bs=4k --numjobs=2 --size=2g --iodepth=1 --runtime=60 --time_based --end_fsync=1
random-rw: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=posixaio, iodepth=1
...
Run status group 0 (all jobs):
READ: bw=16.5MiB/s (17.3MB/s), 8217KiB/s-8652KiB/s (8414kB/s-8860kB/s), io=1025MiB (1074MB), run=62202-62202msec
WRITE: bw=16.5MiB/s (17.3MB/s), 8218KiB/s-8698KiB/s (8415kB/s-8907kB/s), io=1028MiB (1077MB), run=62202-62202msec
next prev parent reply other threads:[~2020-10-16 16:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 5:59 [PATCH] btrfs: balance RAID1/RAID10 mirror selection louis
2020-10-16 7:15 ` Nikolay Borisov
2020-10-16 7:29 ` Qu Wenruo
2020-10-16 17:28 ` louis
2020-10-18 8:16 ` Anand Jain
2020-10-16 16:18 ` louis [this message]
2020-10-16 17:21 ` waxhead
2020-10-23 7:38 ` Wang Yugui
2020-10-23 7:42 ` Nikolay Borisov
2020-11-02 19:29 ` louis
2020-11-02 19:36 ` louis
2020-10-27 14:26 ` Wang Yugui
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=3ac1cd1113ac25f11bbed6c90d814fd8@waffle.tech \
--to=louis@waffle.tech \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@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