On 01/10/2018 05:38 AM, Duncan wrote: > [...] > > And I've definitely noticed an effect since the ssd option stopped using > the 2 MiB spreading algorithm in 4.14. Glad to hear. :-) > In particular, while chunk usage > was generally stable before that and I only occasionally needed to run > balance to clear out empty chunks, now, balance with the usage filter > will apparently actively fill in empty space in existing chunks, so while > previously a usage-filtered balance that only rewrote one chunk didn't > actually free anything, simply allocating a new chunk to replace the one > it freed, so at least two chunks needed rewritten to actually free space > back to unallocated... > > Now, usage-filtered rewrites of only a single chunk routinely frees the > allocated space, because it writes that small bit of data in the freed > chunk into existing free space in other chunks. And that back-filling the existing chunks indeed also means a decrease in total work that needs to be done. But this probably also means that the free space gaps you have/had were rather small so they got ignored in the past. Large free gaps would always get data written in them by balance already. It probably also means that now you're on 4.14, much less of these small free space gaps will be left behind, because they're already immediately reused by new small writes. > At least I /presume/ that new balance-usage behavior is due to the ssd > changes. Most probably, yes. > Maybe it's due to other patches. Either way, it's an > interesting and useful change. =:^) -- Hans van Kranenburg -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
