* anything wrong with `balance -dusage -musage` together?
@ 2015-11-19 23:53 Lukas Pirl
2015-11-19 23:59 ` Hugo Mills
2015-11-20 3:41 ` Duncan
0 siblings, 2 replies; 4+ messages in thread
From: Lukas Pirl @ 2015-11-19 23:53 UTC (permalink / raw)
To: linux-btrfs
Hi list,
I rarely see balance used with -dusage -musage together, esp. with
values other than zero.
The question is, is there anything wrong with running (say) `balance
-dusage=50 -musage=30` regularly?
Thanks and best regards,
Lukas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: anything wrong with `balance -dusage -musage` together?
2015-11-19 23:53 anything wrong with `balance -dusage -musage` together? Lukas Pirl
@ 2015-11-19 23:59 ` Hugo Mills
2015-11-20 0:06 ` Lukas Pirl
2015-11-20 3:41 ` Duncan
1 sibling, 1 reply; 4+ messages in thread
From: Hugo Mills @ 2015-11-19 23:59 UTC (permalink / raw)
To: Lukas Pirl; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
On Fri, Nov 20, 2015 at 12:53:33PM +1300, Lukas Pirl wrote:
> Hi list,
>
> I rarely see balance used with -dusage -musage together, esp. with
> values other than zero.
>
> The question is, is there anything wrong with running (say) `balance
> -dusage=50 -musage=30` regularly?
Nothing actively wrong with that, no. It certainly won't break
anything. It's just rarely actually useful. The usual situation is
that you run out of one kind of storage before the other (data vs
metadata, that is), and you need to free up some allocation of one of
them so it can go to the other. This is typically too much data
allocation, and metadata has run out (so -d is more often used than
-m).
For the "usual" case of running out of metadata allocation, you
don't actually need much space to reclaim, so -dlimit=X for small X is
an easier approach to use.
Hugo.
--
Hugo Mills | Questions are a burden, and answers a prison for
hugo@... carfax.org.uk | oneself
http://carfax.org.uk/ |
PGP: E2AB1DE4 | The Prisoner
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: anything wrong with `balance -dusage -musage` together?
2015-11-19 23:59 ` Hugo Mills
@ 2015-11-20 0:06 ` Lukas Pirl
0 siblings, 0 replies; 4+ messages in thread
From: Lukas Pirl @ 2015-11-20 0:06 UTC (permalink / raw)
To: Hugo Mills; +Cc: linux-btrfs
On 11/20/2015 12:59 PM, Hugo Mills wrote as excerpted:
> Nothing actively wrong with that, no. It certainly won't break
> anything. It's just rarely actually useful. The usual situation is
> that you run out of one kind of storage before the other (data vs
> metadata, that is), and you need to free up some allocation of one of
> them so it can go to the other. This is typically too much data
> allocation, and metadata has run out (so -d is more often used than
> -m).
>
> For the "usual" case of running out of metadata allocation, you
> don't actually need much space to reclaim, so -dlimit=X for small X is
> an easier approach to use.
Thanks Hugo for your quick reply.
Alright, the look at https://github.com/kdave/btrfsmaintenance
just made me think over regular balances using -*usage before one or the
other space runs out (as suggested there).
Best,
Lukas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: anything wrong with `balance -dusage -musage` together?
2015-11-19 23:53 anything wrong with `balance -dusage -musage` together? Lukas Pirl
2015-11-19 23:59 ` Hugo Mills
@ 2015-11-20 3:41 ` Duncan
1 sibling, 0 replies; 4+ messages in thread
From: Duncan @ 2015-11-20 3:41 UTC (permalink / raw)
To: linux-btrfs
Lukas Pirl posted on Fri, 20 Nov 2015 12:53:33 +1300 as excerpted:
> I rarely see balance used with -dusage -musage together, esp. with
> values other than zero.
>
> The question is, is there anything wrong with running (say) `balance
> -dusage=50 -musage=30` regularly?
I see the question in general has already been answered, nothing at all
wrong with invoking balance with both an -musage and a -dusage filter,
it's only rare to see in examples because the examples are generally
dealing with specific cases where one or the other, generally metadata,
has run out, due to the other one, generally data, taking all the
otherwise unallocated space with mostly empty allocations. So a quick
-dusage filter to clear out the mostly empty data allocations is the most
common example seen.
But I'd like to point out, not only is combining -dusage and -musage OK,
but in some cases, specifically btrfs' mixed-bg mode where data and
metadata are combined into the same blocks, it's actually _mandatory_.
Note that mkfs.btrfs defaulted to --mixed mode for small filesystems,
under a GiB, for some time, and that while btrfs-progs 4.3
controversially does away with that default, it's still very strongly
recommended for filesystems under a GiB, and recommended in general by
many list regulars to between 8 and 32 GiB (I've even seen an argument
for making it 64 GiB), as while slightly less efficient (and doubling
data usage in dup mode), it does eliminate the data vs metadata hassles,
which can be far worse at smaller filesystem sizes.
And some people use --mixed at even larger sizes, hundreds of gigs to TiB
scale, often to enable them to do single-device dup mode data for better
reliability and to better take advantage of btrfs' data integrity
features, since until now dup mode has been allowed for metadata only,
and thus has been disallowed for data except with mixed-mode. (Tho
that's set to change as recently patches have been posted that would
allow dup mode data as well, which when integrated, would do away with
the biggest reason to use mixed mode at 100 gig and larger sizes.)
Anyway, with mixed mode, data and metadata are mixed in the same chunks,
and balance will refuse to run with balance filters unless the -d and -m
filters exactly duplicate each other. So on such a btrfs, to do a -dusage
balance of any percentage, -musage must be added as well, with the exact
same percentage.
So as I said, not only is there nothing wrong with combining -dusage and -
musage, in some cases it's actually mandatory.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-20 3:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 23:53 anything wrong with `balance -dusage -musage` together? Lukas Pirl
2015-11-19 23:59 ` Hugo Mills
2015-11-20 0:06 ` Lukas Pirl
2015-11-20 3:41 ` Duncan
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.