linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Getting qgroup reports in user space (without enabling qroup)?
@ 2019-03-02  6:23 Andrei Borzenkov
  2019-03-02 11:53 ` Qu Wenruo
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Borzenkov @ 2019-03-02  6:23 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

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.

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Getting qgroup reports in user space (without enabling qroup)?
  2019-03-02  6:23 Getting qgroup reports in user space (without enabling qroup)? Andrei Borzenkov
@ 2019-03-02 11:53 ` Qu Wenruo
  0 siblings, 0 replies; 2+ messages in thread
From: Qu Wenruo @ 2019-03-02 11:53 UTC (permalink / raw)
  To: Andrei Borzenkov, linux-btrfs@vger.kernel.org


[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-02 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02  6:23 Getting qgroup reports in user space (without enabling qroup)? Andrei Borzenkov
2019-03-02 11:53 ` Qu Wenruo

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).