From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Getting qgroup reports in user space (without enabling qroup)?
Date: Sat, 2 Mar 2019 19:53:51 +0800 [thread overview]
Message-ID: <c5a1f71f-a2b4-7ac2-1cb9-7787d9f980a0@gmx.com> (raw)
In-Reply-To: <8a91a9b3-8b4c-2df4-1c69-9e260816a2ca@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1956 bytes --]
On 2019/3/2 下午2:23, Andrei Borzenkov wrote:
> Is there any user-space tool that can produce report similar to "btrfs
> qgroup show" with multi-level qgroups? To clarify what I mean - here is
> "btrfs qgroup show" output from openSUSE with enabled snapper.
>
> qgroupid rfer excl parent
> -------- ---- ---- ------
> ...
> 0/259 6.17GiB 262.43MiB ---
> ...
> 0/702 6.03GiB 1.30GiB 1/0
> 0/718 6.04GiB 89.88MiB 1/0
> 0/720 6.52GiB 87.28MiB 1/0
> 0/724 6.10GiB 29.16MiB 1/0
> 0/727 6.78GiB 217.02MiB 1/0
> 0/729 6.24GiB 39.25MiB 1/0
> 0/731 6.65GiB 72.67MiB 1/0
> 0/732 6.24GiB 212.18MiB 1/0
> 0/741 6.35GiB 778.79MiB 1/0
> 0/742 6.58GiB 74.09MiB 1/0
> 1/0 20.33GiB 14.42GiB ---
> ...
>
> Without qgroups there is really no way to find out how much space
> snapshots are taking. "btrfs fi du" just shows equivalent of "rfer" and
> "excl" for each subvolume, but there is no way you can compute the
> values shown for 1/0 qgroup from individual numbers.
>
> I do not think "btrfs fi du" can do it as it only knows whether extent
> is shared or not, it cannot know whether extent is shared between
> specific subvolumes.
No, there is really no good way to do the same work of qgroup.
>
> Is something like this even possible in user space without qgroups? It
> is well known that qgroups are frowned upon and common advice is to
> disable them as soon as someone reports performance issues.
There are incoming improvements for qgroup, especially solves the
performance for qgroup + balance, the biggest performance pitfall.
The target is v5.1 or v5.2.
And there is planned enhancement to imoprove the backref walk code, to
improve the overall performance of qgroup.
So feel free to try out qgroup in v5.2.
Thanks,
Qu
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-03-02 11:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-02 6:23 Getting qgroup reports in user space (without enabling qroup)? Andrei Borzenkov
2019-03-02 11:53 ` Qu Wenruo [this message]
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=c5a1f71f-a2b4-7ac2-1cb9-7787d9f980a0@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=arvidjaar@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).