From: "Brian J. Murrell" <brian@interlinx.bc.ca>
To: Calvin Walton <calvin.walton@kepstin.ca>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: efficiency of btrfs cow
Date: Wed, 23 Mar 2011 08:39:51 -0400 [thread overview]
Message-ID: <4D89EA17.20506@interlinx.bc.ca> (raw)
In-Reply-To: <1299427596.15017.8.camel@ayu>
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
On 11-03-06 11:06 AM, Calvin Walton wrote:
>
> To see exactly what's going on, you should use the "btrfs filesystem df"
> command to see how space is being allocated for data and metadata
> separately:
OK. So with an empty filesystem, before my first copy (i.e. the base on
which the next copy will CoW from) df reports:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/btrfs--test-btrfs--test
922746880 56 922746824 1% /mnt/btrfs-test
and btrfs fi df reports:
Data: total=8.00MB, used=0.00
Metadata: total=1.01GB, used=24.00KB
System: total=12.00MB, used=4.00KB
after the first copy df and btrfs fi df report:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/btrfs--test-btrfs--test
922746880 121402328 801344552 14% /mnt/btrfs-test
root@linux:/mnt/btrfs-test# cat .snapshots/monthly.22/metadata/btrfs_df-stop
Data: total=110.01GB, used=109.26GB
Metadata: total=5.01GB, used=3.26GB
System: total=12.00MB, used=24.00KB
So it's clear that total usage (as reported by df) was 121,402,328KB but
Metadata has two values:
Metadata: total=5.01GB, used=3.26GB
What's the difference between total and used? And for that matter,
what's the difference between the total and used for Data
(total=110.01GB, used=109.26GB)?
Even if I take the largest values (i.e. the total values) for Data and
Metadata (each converted to KB first) and add them up they are:
120,607,211.52 which is not quite the 121,402,328 that df reports.
There is a 795,116.48KB discrepancy.
In any case, which value from a btrfs df fi should I be subtracting from
df's accounting to get a real accounting of the amount of data used?
Cheers,
b.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2011-03-23 12:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 15:46 efficiency of btrfs cow Brian J. Murrell
2011-03-06 16:02 ` Fajar A. Nugraha
2011-03-06 16:11 ` Brian J. Murrell
2011-03-06 16:17 ` Calvin Walton
2011-03-06 16:18 ` Brian J. Murrell
2011-03-06 17:22 ` Freddie Cash
2011-03-06 16:06 ` Calvin Walton
2011-03-06 16:17 ` Brian J. Murrell
2011-03-23 12:39 ` Brian J. Murrell [this message]
2011-03-23 15:53 ` Chester
2011-03-23 16:19 ` Brian J. Murrell
2011-03-23 17:36 ` Kolja Dummann
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=4D89EA17.20506@interlinx.bc.ca \
--to=brian@interlinx.bc.ca \
--cc=calvin.walton@kepstin.ca \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.