All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Adam Borowski <kilobyte@angband.pl>
Cc: Marat Khalili <mkh@rqc.ru>, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: qemu-kvm VM died during partial raid1 problems of btrfs
Date: Wed, 13 Sep 2017 08:21:01 -0400	[thread overview]
Message-ID: <8d74d2c2-0f65-77c9-124c-4bcc071a2b2e@gmail.com> (raw)
In-Reply-To: <20170912211346.uxzqfu7uh2ikrg2m@angband.pl>

On 2017-09-12 17:13, Adam Borowski wrote:
> On Tue, Sep 12, 2017 at 04:12:32PM -0400, Austin S. Hemmelgarn wrote:
>> On 2017-09-12 16:00, Adam Borowski wrote:
>>> Noted.  Both Marat's and my use cases, though, involve VMs that are off most
>>> of the time, and at least for me, turned on only to test something.
>>> Touching mtime makes rsync run again, and it's freaking _slow_: worse than
>>> 40 minutes for a 40GB VM (source:SSD target:deduped HDD).
>> 40 minutes for 40GB is insanely slow (that's just short of 18 MB/s) if
>> you're going direct to a hard drive.  I get better performance than that on
>> my somewhat pathetic NUC based storage cluster (I get roughly 20 MB/s there,
>> but it's for archival storage so I don't really care).  I'm actually curious
>> what the exact rsync command you are using is (you can obviously redact
>> paths as you see fit), as the only way I can think of that it should be that
>> slow is if you're using both --checksum (but if you're using this, you can
>> tell rsync to skip the mtime check, and that issue goes away) and --inplace,
>> _and_ your HDD is slow to begin with.
> 
> rsync -axX --delete --inplace --numeric-ids /mnt/btr1/qemu/ mordor:$BASE/qemu
> The target is single, compress=zlib SAMSUNG HD204UI, 34976 hours old but
> with nothing notable on SMART, in a Qnap 253a, kernel 4.9.
compress=zlib is probably your biggest culprit.  As odd as this sounds, 
I'd suggest switching that to lzo (seriously, the performance difference 
is ludicrous), and then setting up a cron job (or systemd timer) to run 
defrag over things to switch to zlib.  As a general point of comparison, 
we do archival backups to a file server running BTRFS where I work, and 
the archiving process runs about four to ten times faster if we take 
this approach (LZO for initial compression, then recompress using defrag 
once the initial transfer is done) than just using zlib directly.

`--inplace` is probably not helping (especially if most of the file 
changed, on BTRFS, it actually is marginally more efficient to just 
write out a whole new file and then replace the old one with a rename if 
you're rewriting most of the file), but is probably not as much of an 
issue as compress=zlib.
> 
> Both source and target are btrfs, but here switching to send|receive
> wouldn't give much as this particular guest is Win10 Insider Edition --
> a thingy that shows what the folks from Redmond have cooked up, with roughly
> weekly updates to the tune of ~10GB writes 10GB deletions (if they do
> incremental transfers, installation still rewrites everything system). >
> Lemme look a bit more, rsync performance is indeed really abysmal compared
> to what it should be.


  parent reply	other threads:[~2017-09-13 12:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12  8:02 qemu-kvm VM died during partial raid1 problems of btrfs Marat Khalili
2017-09-12  8:25 ` Timofey Titovets
2017-09-12  8:42   ` Marat Khalili
2017-09-12  9:21     ` Timofey Titovets
2017-09-12  9:29       ` Marat Khalili
2017-09-12  9:35         ` Timofey Titovets
2017-09-12 10:01     ` Duncan
2017-09-12 10:32       ` Adam Borowski
2017-09-12 10:39         ` Marat Khalili
2017-09-12 11:01           ` Timofey Titovets
2017-09-12 11:12             ` Adam Borowski
2017-09-12 11:17               ` Timofey Titovets
2017-09-12 11:26               ` Marat Khalili
2017-09-12 17:21                 ` Adam Borowski
2017-09-12 17:36                   ` Austin S. Hemmelgarn
2017-09-12 18:43                     ` Adam Borowski
2017-09-12 18:47                       ` Christoph Hellwig
2017-09-12 19:12                         ` Austin S. Hemmelgarn
2017-09-12 19:11                       ` Austin S. Hemmelgarn
2017-09-12 20:00                         ` Adam Borowski
2017-09-12 20:12                           ` Austin S. Hemmelgarn
2017-09-12 21:13                             ` Adam Borowski
2017-09-13  0:52                               ` Timofey Titovets
2017-09-13 12:55                                 ` Austin S. Hemmelgarn
2017-09-13 12:21                               ` Austin S. Hemmelgarn [this message]
2017-09-18 11:53                                 ` Adam Borowski
2017-09-13 14:47                               ` Martin Raiber
2017-09-13 15:25                                 ` Austin S. Hemmelgarn
2017-09-12 11:09         ` Roman Mamedov
2017-09-13 13:23 ` Chris Murphy
2017-09-13 14:15   ` Marat Khalili
2017-09-13 17:52     ` Goffredo Baroncelli

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=8d74d2c2-0f65-77c9-124c-4bcc071a2b2e@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=kilobyte@angband.pl \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mkh@rqc.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.