All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: Brendan Hide <brendan@swiftspirit.co.za>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: -musage=>0 means always reporting relocation
Date: Tue, 13 May 2014 17:57 +1000	[thread overview]
Message-ID: <2427848.SjNntC7t9e@xev> (raw)
In-Reply-To: <536F852C.3000100@swiftspirit.co.za>

On Sun, 11 May 2014 16:11:56 Brendan Hide wrote:
> On 2014/05/11 11:52 AM, Russell Coker wrote:
> > On Sun, 11 May 2014, Russell Coker <russell@coker.com.au> wrote:
> >> Below is the output of running a balance a few times on a 120G SSD.
> > 
> > Sorry forgot to mention that's kernel 3.14.1 Debian package.
> 
> Please send the output of the two following command:
> btrfs fi df /

#btrfs fi balance start -dusage=0 -musage=10 /
Done, had to relocate 2 out of 107 chunks
#btrfs fi balance start -dusage=0 -musage=10 /
Done, had to relocate 2 out of 107 chunks
#btrfs fi balance start -dusage=0 -musage=0 /
Done, had to relocate 1 out of 107 chunks
#btrfs fi balance start -dusage=0 -musage=0 /
Done, had to relocate 1 out of 107 chunks
#btrfs fi balance start -dusage=10 -musage=10 /
Done, had to relocate 2 out of 107 chunks
#btrfs fi balance start -dusage=10 -musage=10 /
Done, had to relocate 2 out of 107 chunks
#btrfs fi balance start -dusage=0 -musage=0 /
Done, had to relocate 1 out of 107 chunks
#btrfs fi balance start -dusage=0 -musage=0 /
Done, had to relocate 1 out of 107 chunks
#btrfs fi df /
Data, single: total=100.47GiB, used=92.11GiB
System, DUP: total=32.00MiB, used=20.00KiB
Metadata, DUP: total=2.50GiB, used=1.50GiB
#uname -a
Linux workstation 3.14-1-amd64 #1 SMP Debian 3.14.2-1 (2014-04-28) x86_64 
GNU/Linux

Above is my workstation.  Below is the server/workstation my wife uses.

#btrfs fi balance start -dusage=0 -musage=0 / 
Done, had to relocate 0 out of 81 chunks
#btrfs fi balance start -dusage=0 -musage=0 / 
Done, had to relocate 0 out of 81 chunks
#btrfs fi balance start -dusage=1 -musage=1 / 
Done, had to relocate 1 out of 81 chunks
#btrfs fi balance start -dusage=1 -musage=1 / 
Done, had to relocate 1 out of 81 chunks
#btrfs fi balance start -dusage=1 -musage=1 / 
Done, had to relocate 1 out of 81 chunks
#btrfs fi balance start -dusage=0 -musage=0 / 
Done, had to relocate 0 out of 81 chunks
#btrfs fi df /
Data: total=75.01GB, used=52.32GB
System, DUP: total=32.00MB, used=16.00KB
Metadata, DUP: total=2.50GB, used=1.52GB
#uname -a
Linux server 3.14-trunk-amd64 #1 SMP Debian 3.14.1-1~exp1 (2014-04-17) x86_64 
GNU/Linux

> This will give more information on your current chunk situation. I
> suspect this is a case where a system chunk (which is included when
> specifying metadata) that is not actually being relocated. This is a bug
> that I believe was already fixed, though I'm not sure in which version.
> 
> The pathological case is where you have a chunk that is 1% full and
> *every* other in-use chunk on the device is 100% full. In that
> situation, a balance will simply move that data into a new chunk (which
> will only ever reach 1% full). Thus, all subsequent balances will
> relocate that same data again to another new chunk.

In that pathological case surely the correct thing to do is to not move that 
chunk.  If moving a chunk doesn't achieve filesystem tuning goals (EG 
converting to a different RAID level) and doesn't result in a decrease of the 
number of chunks in use then surely there's no point to doing it.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/


  parent reply	other threads:[~2014-05-13  7:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-11  9:43 -musage=>0 means always reporting relocation Russell Coker
2014-05-11  9:52 ` Russell Coker
2014-05-11 14:11   ` Brendan Hide
2014-05-12 16:17     ` David Sterba
2014-05-13  7:57     ` Russell Coker [this message]
2014-05-13 18:06       ` Duncan
2014-05-11 16:17 ` Duncan

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=2427848.SjNntC7t9e@xev \
    --to=russell@coker.com.au \
    --cc=brendan@swiftspirit.co.za \
    --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.