systemd / zram-generator

Systemd unit generator for zram devices
MIT License
584 stars 50 forks source link

Periodic fstrim #107

Closed eMPee584 closed 3 years ago

eMPee584 commented 3 years ago

Maybe this has a measurable performance impact? https://unix.stackexchange.com/posts/545206/revisions

keszybz commented 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.

keszybz commented 3 years ago

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.

keszybz commented 3 years ago

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.

nabijaczleweli commented 3 years ago

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.