All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Merillat <dan.merillat@gmail.com>
To: BTRFS Mailing list <linux-btrfs@vger.kernel.org>
Subject: Segregate metadata to SSD?
Date: Sun, 2 Sep 2012 17:20:54 -0400	[thread overview]
Message-ID: <CAPL5yKea2mRae+29i_TK3Nj4dhgCDFDiJxDfHX=r0QywNQnEgQ@mail.gmail.com> (raw)

Is it possible to weight the allocations of data/system/metadata so
that data goes on large, slow drives while system/metadata goes on a
fast SSD?  I don't have exact numbers, but I'd guess a vast majority
of seeks during operation are lookups of tiny bits of data, while data
reads&writes are done in much larger chunks.

Obviously a database load would be a different balance, but for most
systems it would seem to be a rather vast improvement.

Data: total=5625880576k (5.24TB), used=5455806964k (5.08TB)
System, DUP: total=32768k (32.00MB), used=724k (724.00KB)
System: total=4096k (4.00MB), used=0k (0.00)
Metadata, DUP: total=117291008k (111.86GB), used=13509540k (12.88GB)

Out of my nearly 6tb setup I could trivially accelerate the whole
thing with a 128mb SSD.

On a side note,  that's a nearly 10:1 metadata overusage and I've
never had more than 3
snapshots at a given time - current, rollback1, rollback2 - I think it
grew that large during a
rebalance.  Aside from that, I could get away with a tiny 64gb SSD.


pretty_sizes was too granular to use in monitoring scripts, so:
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index b1457de..dc5fea6 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -145,8 +145,9 @@ static int cmd_df(int argc, char **argv)

                total_bytes = pretty_sizes(sargs->spaces[i].total_bytes);
                used_bytes = pretty_sizes(sargs->spaces[i].used_bytes);
-               printf("%s: total=%s, used=%s\n", description, total_bytes,
-                      used_bytes);
+               printf("%s: total=%ldk (%s), used=%ldk (%s)\n", description,
+                       sargs->spaces[i].total_bytes/1024, total_bytes,
+                       sargs->spaces[i].used_bytes/1024, used_bytes);
        }
        free(sargs);

                 reply	other threads:[~2012-09-02 21:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAPL5yKea2mRae+29i_TK3Nj4dhgCDFDiJxDfHX=r0QywNQnEgQ@mail.gmail.com' \
    --to=dan.merillat@gmail.com \
    --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.