From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Lionel Bouton <lionel-subscription@bouton.name>,
Duncan <1i5t5.duncan@cox.net>,
linux-btrfs@vger.kernel.org
Subject: Re: BTRFS as image store for KVM?
Date: Mon, 5 Oct 2015 07:54:24 -0400 [thread overview]
Message-ID: <561264F0.4030207@gmail.com> (raw)
In-Reply-To: <56125BF3.10700@bouton.name>
[-- Attachment #1: Type: text/plain, Size: 3421 bytes --]
On 2015-10-05 07:16, Lionel Bouton wrote:
> Hi,
>
> Le 04/10/2015 14:03, Lionel Bouton a écrit :
>> [...]
>> This focus on single reader RAID1 performance surprises me.
>>
>> 1/ AFAIK the kernel md RAID1 code behaves the same (last time I checked
>> you need 2 processes to read from 2 devices at once) and I've never seen
>> anyone arguing that the current md code is unstable.
>
> To better illustrate my point.
>
> According to Phoronix tests, BTRFS RAID-1 is even faster than md RAID1
> most of the time.
>
> http://www.phoronix.com/scan.php?page=article&item=btrfs_raid_mdadm&num=1
>
> The only case where md RAID1 was noticeably faster is sequential reads
> with FIO libaio.
Part of this is because BTRFS's built-in raid functionality is designed
for COW workloads, whereas mdraid isn't. On top of that, I would be
willing to bet that they were using the dup profile for metadata when
testing mdraid (which is the default when using a single disk), which
isn't a fair comparison because it stores more data in that case than
the BTRFS raid.
If you do the same thing with ZFS, I'd expect that you would see similar
results (although probably with a bigger difference between ZFS and
mdraid). A much better comparison (which _will_ sway in mdraid's favor)
would be running XFS or ext4 (or even JFS) on top of mdraid, as that is
the regular usage of mdraid.
Furthermore, there is no sane reason to be running BTRFS on top of a
single mdraid device, thus this was even less of a reasonable
comparison. It is worth noting however, that using BTRFS raid1 on top
of two md RAID0 devices is significantly faster than BTRFS RAID10.
> So if you base your analysis on Phoronix tests when serving large files
> to a few clients maybe md could perform better. In all other cases BTRFS
> RAID1 seems to be a better place to start if you want performance.
> According to the bad performance -> unstable logic, md would then be the
> less stable RAID1 implementation which doesn't make sense to me.
No reasonable person should be basing their analysis on results from
someone else's testing without replicating said results themselves,
especially when those results are based on benchmarks and not real
workloads. This goes double for Phoronix, as they are essentially paid
to make whatever the newest technology on Linux is look good.
> I'm not even saying that BTRFS performs better than md for most
> real-world scenarios (these are only benchmarks), but that arguing that
> BTRFS is not stable because it has performance issues still doesn't make
> sense to me. Even synthetic benchmarks aren't enough to find the best
> fit for real-world scenarios, so you could always find a very
> restrictive situation where any filesystem, RAID implementation, volume
> manager could look bad even the most robust ones.
>
> Of course if BTRFS RAID1 was always slower than md RAID1 the logic might
> make more sense. But clearly there were design decisions and performance
> tuning in BTRFS that led to better or similar performance in several
> scenarios, if the remaining scenarios don't get attention it may be
> because they represent a niche (at least from the point of view of the
> developers) not a lack of polishing.
Like I said above, a large part of this is probably because BTRFS raid
was designed for COW workloads, and mdraid wasn't.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]
next prev parent reply other threads:[~2015-10-05 11:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 21:34 BTRFS as image store for KVM? Gert Menke
2015-09-16 3:00 ` Chris Murphy
2015-09-16 3:57 ` Duncan
2015-09-16 11:35 ` Brendan Heading
2015-09-16 12:25 ` Austin S Hemmelgarn
2015-09-16 12:41 ` Paul Jones
2015-09-17 17:56 ` Gert Menke
2015-09-17 18:35 ` Chris Murphy
2015-09-17 21:32 ` Gert Menke
2015-09-18 2:00 ` Duncan
2015-09-18 8:32 ` Gert Menke
2015-09-23 7:28 ` Russell Coker
2015-09-18 14:13 ` Austin S Hemmelgarn
2015-09-23 7:24 ` Russell Coker
2015-09-17 18:46 ` Mike Fleetwood
2015-09-17 19:43 ` Hugo Mills
2015-09-17 21:49 ` Gert Menke
2015-09-18 2:22 ` Duncan
2015-09-18 8:59 ` Gert Menke
2015-09-17 22:41 ` Sean Greenslade
2015-09-18 7:34 ` Gert Menke
2015-09-17 4:19 ` Paul Harvey
2015-09-20 1:26 ` Jim Salter
2015-09-25 12:48 ` Rich Freeman
2015-09-25 12:56 ` Jim Salter
2015-09-25 13:04 ` Austin S Hemmelgarn
[not found] ` <5605483A.7040103@jrs-s.net>
2015-09-25 13:46 ` Austin S Hemmelgarn
2015-09-25 13:52 ` Jim Salter
2015-09-25 14:02 ` Timofey Titovets
2015-09-25 14:20 ` Austin S Hemmelgarn
2015-09-29 14:12 ` Gert Menke
2015-10-02 4:21 ` Russell Coker
2015-10-02 12:07 ` Austin S Hemmelgarn
2015-10-03 8:32 ` Russell Coker
2015-10-04 2:09 ` Duncan
2015-10-04 12:03 ` Lionel Bouton
2015-10-04 12:21 ` Rich Freeman
2015-10-05 8:19 ` Duncan
2015-10-05 8:43 ` Erkki Seppala
2015-10-05 8:51 ` Roman Mamedov
2015-10-05 11:16 ` Lionel Bouton
2015-10-05 11:40 ` Rich Freeman
2015-10-05 11:54 ` Austin S Hemmelgarn [this message]
[not found] ` <RPG31r00t34oj7R01PG5Us>
2015-10-05 14:04 ` Duncan
2015-10-05 15:59 ` Austin S Hemmelgarn
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=561264F0.4030207@gmail.com \
--to=ahferroin7@gmail.com \
--cc=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=lionel-subscription@bouton.name \
/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).