On 2014/11/23 03:07, Marc MERLIN wrote:
On Sun, Nov 23, 2014 at 12:05:04AM +0000, Hugo Mills wrote:
Which is correct?
    Less than or equal to 55% full.
This confuses me. Does that mean that the fullest blocks do not get
rebalanced?

"Balance has three primary benefits:
- free up some space for new allocations
- change storage profile
- balance/migrate data to or away from new or failing disks (the original purpose of balance)
and one fringe benefit:
- force a data re-write (good if you think your spinning-rust needs to re-allocate sectors)

In the regular case where you're not changing the storage profile or migrating data between disks, there isn't much to gain from balancing full chunks - and it involves a lot of work. For SSDs, it is particularly bad for wear. For spinning rust it is merely a lot of unnecessary work.

I guess I was under the mistaken impression that the more data you had the
more you could be out of balance.

    A chunk is the part of a block group that lives on one device, so
in RAID-1, every block group is precisely two chunks; in RAID-0, every
block group is 2 or more chunks, up to the number of devices in the
FS. A chunk is usually 1 GiB in size for data and 250 MiB for
metadata, but can be smaller under some circumstances.
Right. So, why would you rebalance empty chunks or near empty chunks?
Don't you want to rebalance almost full chunks first, and work you way to
less and less full as needed?

Balancing empty chunks makes them available for re-allocation - so that is directly useful and light on workload.

--
__________
Brendan Hide
http://swiftspirit.co.za/
http://www.webafrica.co.za/?AFF1E97

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to