> Not sure if there is much else to do about fragmentation apart from running a
> balance which would probally make thje machine v sluggish for a day or so.

I think a full balance-run makes in this point of view no sense.
A weekly freeing of unused and summarize of underused blocks make more sense.
I prefer the https://github.com/liubogithub/btrfsmaintenance/
balance-script or weekly do the following:

    # remove empty data/meta block groups for fast free space
    btrfs balance start -v -dusage=0 /mountPoint
    btrfs balance start -v -musage=0 /mountPoint

    # quickly clean up the less used block groups
    # < 1%
    btrfs balance start -v -dusage=1 /mountPoint
    btrfs balance start -v -musage=1 /mountPoint

    # < 5%
    btrfs balance start -v -dusage=5 /mountPoint
    btrfs balance start -v -musage=5 /mountPoint

    # < 15%
    btrfs balance start -v -dusage=15 /mountPoint
    btrfs balance start -v -musage=15 /mountPoint

    # < 30%
    btrfs balance start -v -dusage=30 /mountPoint
    btrfs balance start -v -musage=30 /mountPoint

    # < 50%
    btrfs balance start -v -dusage=50 /mountPoint

On my 13 TB-Raid 1 Array with 150 Snapshots this will finished in less
then a hour (normaly i takes a half hour).
But the first run will take muth more time of you have many
data-blocks with <50% usage. so feel free to reduce the dusage-value
if you need.
--
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