All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: Marc MERLIN <marc@merlins.org>
Cc: Brendan Hide <brendan@swiftspirit.co.za>, linux-btrfs@vger.kernel.org
Subject: Re: How does "btrfs fi show" show full?
Date: Wed, 7 May 2014 05:40:29 -0700	[thread overview]
Message-ID: <20140507054029.70ecda6f@ws> (raw)
In-Reply-To: <yzWd1n0292w7UQp01zWf8e>

On Wed, 7 May 2014 04:30:30 -0700
Marc MERLIN <marc@merlins.org> wrote:

> > -dusage=85 balances all chunks that up to 85% full. The higher the
> > number, the more work that needs to be done.  
> 
> Aah, right. I see why it's more work. =20 only makes is process the
> few chunks that are up to 20% full which won't be many if your FS
> is almost full.

It's actually even less work than you imply.

Balance only has to rewrite the actual content, not the empty space in
the chunk.  So 20% full means it's only writing 20% of the
(possible/full) content, thus only taking 20% of the time to rewrite
that chunk that it'd take to rewrite a full chunk.

Which is why a usage=5 or 20 goes so fast, even if the system's
actually mostly empty but is all allocated.  With a 20% full chunk it's
rewriting five chunks into one; at 5%, it's rewriting 20 chunks into
one.  That goes pretty fast, even if there's a bunch of them to write!

-- 
Duncan - No HTML messages please, as they are filtered as spam.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

      parent reply	other threads:[~2014-05-07 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05  0:54 How does "btrfs fi show" show full? Marc MERLIN
2014-05-05  4:11 ` Brendan Hide
2014-05-05  5:50   ` Marc MERLIN
2014-05-05  7:48     ` Brendan Hide
2014-05-06 20:10     ` Duncan
2014-05-07  7:59       ` Marc MERLIN
2014-05-07 10:53         ` Brendan Hide
2014-05-07 11:30           ` Marc MERLIN
     [not found]           ` <yzWd1n0292w7UQp01zWf8e>
2014-05-07 12:40             ` Duncan [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=20140507054029.70ecda6f@ws \
    --to=1i5t5.duncan@cox.net \
    --cc=brendan@swiftspirit.co.za \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marc@merlins.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.