From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: Why do full balance and deduplication reduce available free space?
Date: Mon, 9 Oct 2017 19:38:23 +0200 [thread overview]
Message-ID: <20171009193823.75f774cc@jupiter.sol.kaishome.de> (raw)
In-Reply-To: 498fe60d8c78ad7e882726214ce5b844@linuxsystems.it
Am Mon, 02 Oct 2017 22:19:32 +0200
schrieb Niccolò Belli <darkbasic@linuxsystems.it>:
> Il 2017-10-02 21:35 Kai Krakow ha scritto:
> > Besides defragging removing the reflinks, duperemove will unshare
> > your snapshots when used in this way: If it sees duplicate blocks
> > within the subvolumes you give it, it will potentially unshare
> > blocks from the snapshots while rewriting extents.
> >
> > BTW, you should be able to use duperemove with read-only snapshots
> > if used in read-only-open mode. But I'd rather suggest to use bees
> > instead: It works at whole-volume level, walking extents instead of
> > files. That way it is much faster, doesn't reprocess already
> > deduplicated extents, and it works with read-only snapshots.
> >
> > Until my patch it didn't like mixed nodatasum/datasum workloads.
> > Currently this is fixed by just leaving nocow data alone as users
> > probably set nocow for exactly the reason to not fragment extents
> > and relocate blocks.
>
> Bad Btrfs Feature Interactions: btrfs read-only snapshots (never
> tested, probably wouldn't work well)
>
> Unfortunately it seems that bees doesn't support read-only snapshots,
> so it's a no way.
>
> P.S.
> I tried duperemove with -A, but besides taking much longer it didn't
> improve the situation.
> Are you sure that the culprit is duperemove? AFAIK it shouldn't
> unshare extents...
Unsharing of extents depends... If an extent is shared between a
r/o and r/w snapshot, rewriting the extent for deduplication ends up in
a shared extent again but it is no longer reflinked with the original
r/o snapshot. At least if btrfs doesn't allow to change extents part of
a r/o snapshot... Which you all tell is the case...
And then, there's unsharing of metadata by the deduplication process
itself.
Both effects should be minimal, tho. But since chunks are allocated in
1GB sizes, it may jump 1GB worth of allocation just for a few extra MB
needed. A metadata rebalance may fix this.
--
Regards,
Kai
Replies to list-only preferred.
next prev parent reply other threads:[~2017-10-09 17:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 10:02 Why do full balance and deduplication reduce available free space? Niccolò Belli
2017-10-02 10:16 ` Hans van Kranenburg
2017-10-02 10:29 ` Niccolò Belli
2017-10-02 11:14 ` Paul Jones
2017-10-02 11:26 ` Is it really possible to dedupe read-only snapshots!? Niccolò Belli
2017-10-02 14:15 ` Why do full balance and deduplication reduce available free space? Niccolò Belli
2017-10-02 19:35 ` Kai Krakow
2017-10-02 20:19 ` Niccolò Belli
2017-10-09 17:38 ` Kai Krakow [this message]
2017-10-02 20:27 ` 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=20171009193823.75f774cc@jupiter.sol.kaishome.de \
--to=hurikhan77@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).