From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: speed up cp --reflink=always
Date: Tue, 18 Oct 2016 04:27:29 +0000 (UTC) [thread overview]
Message-ID: <pan$96d47$1ea9f2f$a24464c5$13bbbcb3@cox.net> (raw)
In-Reply-To: ca6a57c9-4bb3-a81c-4beb-770f5331e994@profihost.ag
Stefan Priebe - Profihost AG posted on Mon, 17 Oct 2016 08:50:37 +0200 as
excerpted:
> Am 17.10.2016 um 03:50 schrieb Qu Wenruo:
>> At 10/17/2016 02:54 AM, Stefan Priebe - Profihost AG wrote:
>>> Am 16.10.2016 um 00:37 schrieb Hans van Kranenburg:
>>>> Hi,
>>>>
>>>> On 10/15/2016 10:49 PM, Stefan Priebe - Profihost AG wrote:
>>>>>
>>>>> cp --reflink=always takes sometimes very long. (i.e. 25-35 minutes)
>>>>>
>>>>> An example:
>>>>>
>>>>> source file:
>>>>> # ls -la vm-279-disk-1.img
>>>>> [...] 204010946560 Oct 14 12:15 vm-279-disk-1.img
>>>>>
>>>>> target file after around 10 minutes:
>>>>> # ls -la vm-279-disk-1.img.tmp
>>>>> [...] 65022328832 Oct 15 22:13 vm-279-disk-1.img.tmp
>>>>
>>>> Two quick thoughts:
>>>> 1. How many extents does this img have?
>>>
>>> filefrag says:
>>> 1011508 extents found
>>
>> Too many fragments.
>> Average extent size is only about 200K.
>> Quite common for VM images, if not setting no copy-on-write (C) attr.
>>
>> Normally it's not a good idea to put VM images into btrfs without any
>> tuning.
>
> Those are backups just written sequentially once. As far as i know the
> extent size is hardcoded to 128k for compression. Isn't it?
I flagged that as I read it, too, but...
200 KB extents average suggests it can't be compressed, because if it
were they'd be 128 KB extents, not 200 KB. That's a difference of over
half a million extents (128 KB would be ~1.5565 million extents, while
just over a million are reported), too much to be rounding error, so the
evidence doesn't support btrfs compression being the culprit.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2016-10-18 4:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-15 20:49 speed up cp --reflink=always Stefan Priebe - Profihost AG
2016-10-15 22:37 ` Hans van Kranenburg
2016-10-16 18:54 ` Stefan Priebe - Profihost AG
2016-10-16 19:48 ` Hans van Kranenburg
2016-10-16 19:57 ` Stefan Priebe - Profihost AG
2016-10-16 20:00 ` Hans van Kranenburg
2016-10-17 1:50 ` Qu Wenruo
2016-10-17 6:50 ` Stefan Priebe - Profihost AG
2016-10-18 4:27 ` Duncan [this message]
2016-10-18 6:57 ` Qu Wenruo
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='pan$96d47$1ea9f2f$a24464c5$13bbbcb3@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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