From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, Tomasz Pala <gotar@polanet.pl>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Report correct filesystem usage / limits on BTRFS subvolumes with quota
Date: Fri, 10 Aug 2018 07:32:31 -0400 [thread overview]
Message-ID: <9861aa7b-bdc8-f508-1726-3d748485e1ee@gmail.com> (raw)
In-Reply-To: <ecd793f3-55b3-84d4-80cf-3382a580037f@gmx.com>
On 2018-08-09 19:35, Qu Wenruo wrote:
>
>
> On 8/10/18 1:48 AM, Tomasz Pala wrote:
>> On Tue, Jul 31, 2018 at 22:32:07 +0800, Qu Wenruo wrote:
>>
>>> 2) Different limitations on exclusive/shared bytes
>>> Btrfs can set different limit on exclusive/shared bytes, further
>>> complicating the problem.
>>>
>>> 3) Btrfs quota only accounts data/metadata used by the subvolume
>>> It lacks all the shared trees (mentioned below), and in fact such
>>> shared tree can be pretty large (especially for extent tree and csum
>>> tree).
>>
>> I'm not sure about the implications, but just to clarify some things:
>>
>> when limiting somebody's data space we usually don't care about the
>> underlying "savings" coming from any deduplicating technique - these are
>> purely bonuses for system owner, so he could do larger resource overbooking.
>
> In reality that's definitely not the case.
>
> From what I see, most users would care more about exclusively used space
> (excl), other than the total space one subvolume is referring to (rfer).
>
> The most common case is, you do a snapshot, user would only care how
> much new space can be written into the subvolume, other than the total
> subvolume size.
I would really love to know exactly who these users are, because it
sounds to me like you've heard from exactly zero people who are
currently using conventional quotas to impose actual resource limits on
other filesystems (instead of just using them for accounting, which is a
valid use case but not what they were originally designed for).
>
>>
>> So - the limit set on any user should enforce maximum and absolute space
>> he has allocated, including the shared stuff. I could even imagine that
>> creating a snapshot might immediately "eat" the available quota. In a
>> way, that quota returned matches (give or take) `du` reported usage,
>> unless "do not account reflinks withing single qgroup" was easy to implemet.
>
> In fact, that's the case. In current implementation, accounting on
> extent is the easiest (if not the only) way to implement.
>
>>
>> I.e.: every shared segment should be accounted within quota (at least once).
>
> Already accounted, at least for rfer.
>
>>
>> And the numbers accounted should reflect the uncompressed sizes.
>
> No way for current extent based solution.
While this may be true, this would be a killer feature to have.
>
>>
>>
>> Moreover - if there would be per-subvolume RAID levels someday, the data
>> should be accouted in relation to "default" (filesystem) RAID level,
>> i.e. having a RAID0 subvolume on RAID1 fs should account half of the
>> data, and twice the data in an opposite scenario (like "dup" profile on
>> single-drive filesystem).
>
> No possible again for current extent based solution.
>
>>
>>
>> In short: values representing quotas are user-oriented ("the numbers one
>> bought"), not storage-oriented ("the numbers they actually occupy").
>
> Well, if something is not possible or brings so big performance impact,
> there will be no argument on how it should work in the first place.
>
> Thanks,
> Qu
>
next prev parent reply other threads:[~2018-08-10 14:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 13:49 Report correct filesystem usage / limits on BTRFS subvolumes with quota Thomas Leister
2018-07-31 14:32 ` Qu Wenruo
2018-07-31 16:03 ` Austin S. Hemmelgarn
2018-08-01 1:23 ` Qu Wenruo
2018-08-09 17:48 ` Tomasz Pala
2018-08-09 23:35 ` Qu Wenruo
2018-08-10 7:17 ` Tomasz Pala
2018-08-10 7:55 ` Qu Wenruo
2018-08-10 9:33 ` Tomasz Pala
2018-08-11 6:54 ` Andrei Borzenkov
2018-08-10 11:32 ` Austin S. Hemmelgarn [this message]
2018-08-10 18:07 ` Chris Murphy
2018-08-10 19:10 ` Austin S. Hemmelgarn
2018-08-11 3:29 ` Duncan
2018-08-12 3:16 ` Chris Murphy
2018-08-12 7:04 ` Andrei Borzenkov
2018-08-12 17:39 ` Andrei Borzenkov
2018-08-13 11:23 ` Austin S. Hemmelgarn
[not found] ` <f66b8ff3-d7ec-31ad-e9ca-e09c9eb76474@gmail.com>
2018-08-10 7:33 ` Tomasz Pala
2018-08-11 5:46 ` Andrei Borzenkov
2018-08-10 11:39 ` Austin S. Hemmelgarn
2018-08-10 18:21 ` Tomasz Pala
2018-08-10 18:48 ` Austin S. Hemmelgarn
2018-08-11 6:18 ` Andrei Borzenkov
2018-08-14 2:49 ` Jeff Mahoney
2018-08-15 11:22 ` Austin S. Hemmelgarn
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=9861aa7b-bdc8-f508-1726-3d748485e1ee@gmail.com \
--to=ahferroin7@gmail.com \
--cc=gotar@polanet.pl \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/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).