Please install and use systemd's fstrim.timer
Dear sailors,
please install and use systemd's fstrim.timer to regularly (e.g. weekly) trigger a "block discard" ("trim") on FLASH media which supports it.
Currently SailfishOS mounts only vFAT filesystems with the "direct discard" option, but for all other filesystems it never executes a discard / trim AFAICS.
Performing a fstrim -a
manually is working fine on SailfishOS since at least v2.2.0, even on encrypted partitions (their "trim" capability can be easily checked manually per lsblk -D
); tested on Jolla 1 and Xperia X.
- Trigger of this feature request is "[Phoronix] Fedora Looking At Finally Enabling FSTRIM By Default In Fedora 32".
- A comprehensive documentation of the rationale, technical background, impact, benefits etc. is provided at the "[Fedora Wiki] Changes/EnableFSTrimTimer".
- A detailed discussion and analysis of this topic by a third party (lwn.net) is provided in this article (paywalled until 2020-01-07).
HTH & happy sailing!
P.S.: ... and the outcome for Fedora is "[Phoronix] Fedora 32 Greenlit For Enabling FSTRIM Support By Default", which is what most other Linux distributions already implement.
Seems to work as well on my XA2. It took about a minute. On my JP1, it returns almost immediately, with not much trimmed. (I added
Fuzzillogic ( 2019-12-21 18:54:00 +0200 )edit-v
parameter)