Closed eMPee584 closed 3 years ago
Interesting. If fstrim leads to large savings even with -o discard
, then this would seem to be some bug in the fs implementation. The author of that stackexchange answer is using btrfs… It would be interesting to see what fstrim -v
says.
I made a test with ext2 w/ -o discard
, and fstrim does not lead to any futher memory being released. I get 65.3M used on an empty fs, but it seems that those are some data structures used by ext2.
With btrfs, there was tiny difference, about 100k (out of 4GB). So unless there's some good data that this is really needed, I don't think we should implement fstrim.
Either way, a fstrim timer belongs in util-linux packaging (and, indeed, one lives there, weekly by default but trivially configurable), not here. Closing as both (a) specious, as you noted, and (b) out-of-scope.
Maybe this has a measurable performance impact? https://unix.stackexchange.com/posts/545206/revisions