From: Wade Cline <clinew@linux.vnet.ibm.com>
To: "Hugo Mills" <hugo@carfax.org.uk>,
"Roman Mamedov" <rm@romanrm.ru>,
kreijack@inwind.it, kreijack@libero.it,
"Sébastien Maury" <sebastien.maury@inserm.fr>,
linux-btrfs@vger.kernel.org
Subject: Re: [RFC] btrfs fi df output [Was Re: BTRF - Storage Usage]
Date: Fri, 28 Sep 2012 14:26:16 -0700 [thread overview]
Message-ID: <506615F8.90202@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120928202026.GG6136@carfax.org.uk>
On 09/28/2012 01:20 PM, Hugo Mills wrote:
> On Sat, Sep 29, 2012 at 12:02:23AM +0600, Roman Mamedov wrote:
>> On Fri, 28 Sep 2012 18:44:07 +0200
>> Goffredo Baroncelli<kreijack@inwind.it> wrote:
>>
>>> This means that the ration of space physically allocated on the disk and
>>> the space available is 7GB/10GB = 0.7 . So on 135GB of disk, only 94GB
>>> are available.
>> You assume metadata allocation will always grow linearly with data, which is
>> not true. So in my opinion it is not a good estimate.
> No, but it's the best model we have right now. (And probably about
> the best model we will have, without knowledge of the future
> intentions of the user). Without inlining file data, the metadata is
> dominated by checksums, which is a linear relationship (approx
> 1000:1). With inlining file data, metadata is probably dominated by
> inline data; assuming the ratio of small-to-large files on the FS
> remains unchanged in future, a linear relationship also applies. For
> general usage, I'm happy to assume that the current ratio of data to
> metadata will remain largely unchanged over the lifetime of the FS.
Since there really isn't a simple answer to how much free-space,
why not have the command print an upper and lower estimate and let
the user figure out how to interpret the numbers? This would inform
the user that there is some guesswork inherent in the estimation and
also provide an educated user with more exact numbers. Something
containing information such as:
Total: 135.00 GiB
Allocated: 10.51 GiB
Unallocated: 124.49 GiB
Free_Upper_Est: 130.00 GiB
Free_Lower_Est: 62.45 GiB
The main idea is that an informed user would know that the
upper-estimation would be for only writing, say, new data, while
the lower-estimation would be for writing everything in, say, a
RAID-1 subvolume. An uninformed user would (hopefully) realize
that he needs to read the Wiki's FAQ.
> ... and I've always found those hard to deal with in scripts. :)
>
> (But they do have "plumbing" options, to use the git terminology,
> so I'd be happy with having a parsable output option).
>
> Hugo.
>
In 'df'/'du', -h is used for human-readable output while no options
is for easily parsable output.
Basically, I think that the bikeshed should be green. ;)
-Wade
prev parent reply other threads:[~2012-09-28 21:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 10:44 BTRF - Storage Usage Sébastien Maury
2012-09-27 11:09 ` Hugo Mills
2012-09-27 11:25 ` Sébastien Maury
2012-09-27 11:43 ` Hugo Mills
2012-09-27 11:52 ` Sébastien Maury
2012-09-27 20:39 ` [RFC] btrfs fi df output [Was Re: BTRF - Storage Usage] Goffredo Baroncelli
2012-09-27 21:02 ` Goffredo Baroncelli
2012-09-28 3:17 ` Roman Mamedov
2012-09-28 8:58 ` Hugo Mills
2012-09-28 17:27 ` Goffredo Baroncelli
2012-09-28 20:13 ` Hugo Mills
2012-09-28 21:26 ` Goffredo Baroncelli
2012-09-29 7:19 ` Goffredo Baroncelli
2012-09-29 9:59 ` Sébastien Maury
2012-09-29 11:51 ` Goffredo Baroncelli
2012-11-12 18:16 ` Jan Engelhardt
2012-09-28 16:44 ` Goffredo Baroncelli
2012-09-28 18:02 ` Roman Mamedov
2012-09-28 19:38 ` Goffredo Baroncelli
2012-09-28 20:20 ` Hugo Mills
2012-09-28 21:26 ` Wade Cline [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=506615F8.90202@linux.vnet.ibm.com \
--to=clinew@linux.vnet.ibm.com \
--cc=hugo@carfax.org.uk \
--cc=kreijack@inwind.it \
--cc=kreijack@libero.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=rm@romanrm.ru \
--cc=sebastien.maury@inserm.fr \
/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).