4 ms·
Why is nobody mentioning?: btrfs fi defrag -r / This is a recovery that ZFS cannot make. https://www.usenix.org/system/files/login/articles/login_summer17_
by chasil 3y ago
Why is nobody mentioning?:
btrfs fi defrag -r /
This is a recovery that ZFS cannot make.
https://www.usenix.org/system/files/login/articles/login_summer17_02_conway.pdf https://www.usenix.org/system/files/login/articles/login_sum...
- nubinetwork 3y agoZFS doesn't need it, if the file is accessed enough, it stays in cache. If the file isn't important enough, who cares that it takes a little bit longer to load into memory?
- chasil 3y agoIf a ZFS dataset goes over 80% utilization, I understand it will switch from "first fit" to "best fit" which can permanently and severely impact performance. https://serverfault.com/questions/733817/does-the-max-80-use-target-suggested-for-zfs-for-performance-reasons-apply-to-s https://serverfault.com/questions/733817/does-the-max-80-use...
- LeoPanthera 3y agoI actually tested this, and could not measure any performance hit at all until I hit 95% full. It sped right back up again when I deleted some stuff. I wouldn't worry about it.
- chasil 3y agoInteresting test. Thanks for finding this out.
- seized 3y agoYou can ZFS send back and forth between pools or to a new dataset to defrag/fix that, so it's not "permanent" as in can't ever be fixed. It also depends on workload, write once/read many is different from VM disk files.
- chasil 3y agoBtrfs can "rebalance" in place. This has had bugs in the past, but seems safe now. On the side of ZFS, you can take one volume of a mirrorset, move it to another system and mount it in degraded mode, and copy a bunch of new files to it. When you return the updated drive to the full set and mount it, it will resilver the older drive with the newer content automatically. That's a killer feature. With btrfs, you have to rebalance to mirror the new files, which takes a long time as every block must be rewritten between the mirrors. ZFS knows how to move just the new files in a resilver.
- foobarqux 3y agoDefrag breaks COW so if you use COW a lot (e.g. snapshots) you don't want to do it.
- fsckboy 3y agowhat do you mean it breaks? does it purge* the older versions, or does something break? * (yes, DEC reference)
- jraph 3y agoIt reduplicates everything. Don't defrag Btrfs lightly, unless you have a specific issue to solve and you ran out off other solutions. Even then, only do it if you know what you are doing. edit: I initially wrote deduplicates, thanks the8472, and agree with the rest of your message as well
- the8472 3y ago*reduplicates Anyway, deduplication can be recovered after a defrag by running duperemove or similar tools. But it's a lot of added work so it's only really worth it if fragmentation is an issue in the first place.
- Dylan16807 3y agoAnd you have to cross your fingers and hope it picks the defragmented copy, as far as I know. It's also very slow to go through that on multiple snapshots. And I think some of the metadata doesn't like to recombine?
- deleted 3y ago[deleted]