Why does Jolla/Sailfish use btrfs with "autodefrag"?
Hi,
my question is quite simple: Why does Jolla/Sailfish use the "autodefrag" mount option of btrfs for its internal storage?
The reason I'm asking is that what I heard on the net about using the autodefrag option (or defragmenting in general) on SSDs (or more generally, flash-based or non-rotating memory) is somewhere between "you must not use autodefrag on SSDs or it will set your laundry on fire" and "I have no idea whether it's beneficial". Since I'm also using btrfs on SSDs and HDDs (and hybrid drives/SSHDs) apart from Jolla, I would be very interested in the reason for this decision. I can imagine that you did some tests and it turned out that the benefits of reducing (meta)data fragmentation exceed the possible drawbacks of flash memory wear due to additional writes, but I don't know. At least some people say that they didn't see any performance gain from defragmenting on SSDs but I don't know whether this holds for small devices.
does it maybe trigger btrfs balancing?!
chemist ( 2015-05-27 22:56:42 +0200 )editCPU issues maybe, see: https://btrfs.wiki.kernel.org/index.php/Gotchas
Anyway, I think in most cases this won't be needed, so a explanation of the Jolla team why it's activated would be great (is there a multi-gigabyte file which gets written so often that it heavily fragments? If so: Which file and why don't you defrag only that one file instead of the whole FS?)
V10lator ( 2015-06-17 07:48:00 +0200 )edit