Thread (13 messages) 13 messages, 7 authors, 2015-08-31

Re: (renamed thread) btrfs metrics

From: Kok, Auke-jan H <hidden>
Date: 2012-01-04 18:46:27

On Wed, Jan 4, 2012 at 3:48 AM, Daniel Pocock [off-list ref] wr=
ote:
quoted
quoted
I am looking at what metrics are needed to monitor btrfs in product=
ion.
quoted
quoted
=A0I actually look after the ganglia-modules-linux package, which i=
ncludes
quoted
quoted
some FS space metrics, but I figured that btrfs throws all that out=
 the
quoted
quoted
window.

Can you suggest metrics that would be meaningful, do I look in /pro=
c or
quoted
quoted
with syscalls, is there any code I should look at for an example of=
 how
quoted
quoted
to extract them with C? =A0Ideally, Ganglia runs without root privi=
leges
quoted
quoted
too, so please let me know if btrfs will allow me to access them
=A0 =A0It depends on what you want to know, really. If you want "how=
 close
quoted
am I to a full filesystem?", then the output of df will give you a
measure, even if it could be up to a factor of 2 out -- you can use =
it
quoted
for predictive planning, though, as it'll be near zero when the FS
runs out of space.

Maybe if you look at it from the point of the sysadmin and think abou=
t
what questions he might want to ask:

a) how much space would I reclaim if I deleted snapshot X?

b) how much space would I reclaim if I deleted all snapshots?

c) how much space would I need if I start making 4 snapshots a day an=
d
keeping them for 48 hours?
chiming in on the discussion - what I'd like to personally see:

=46irst, probably easiest: Display per subvol the space used that is
"unique" (not used by other subvolumes), and shared (the opposite -
all blocks that appear in other subvolumes as well).

=46rom there on, one could potentially create a matrix: (proportional
font art, apologies):

          | subvol1  | subvol2  | subvol3  |
----------+----------+----------+----------+
 subvol1  |   200M   |     20M  |     50M  |
----------+----------+----------+----------+
 subvol2  |    20M   |    350M  |     22M  |
----------+----------+----------+----------+
 subvol3  |    50M   |     22M  |    634M  |
----------+----------+----------+----------+

The diagonal obviously shows the "unique" blocks, subvol2 and subvol1
share 20M data, etc. Missing from this plot would be "how much is
shared between subvol1, subvol2, and subvol3" together, but it's a
start and not something that hard to understand. One might add a
column for "total size" of each subvol, which may obviously not be an
addition of the rest of the columns in this diagram.

Anyway, something like this would be high on my list of `df` numbers
I'd like to see - since I think they are useful numbers.

Cheers,

Auke
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help