Updated 30 July 2021
A little learning is a dangerous thing
Drink deep, or taste not the Pierian spring
There shallow draughts intoxicate the brain,
And drinking largely sobers us again.
—Alexander Pope, An Essay On Criticism
Don’t believe blindly everything you read on the Internet. I saw several discussions in passing about how Ubuntu doesn’t do TRIM, to extend the life of Solid State Disk devices. Even advice on what to do on Ubuntu to “enable” periodic TRIM sessions using fstrim(8).
Finding how Ubuntu supports TRIM was quite by accident. I was trying to follow some of the advice, which was to add calls to fstrim(8) on a regular basis. (Advice in some of the pages was once a day. More later about that bad advice.) Because of my dabbling in systemd, I thought “Hey, this is a good application for a systemd timer unit.” So, poking around to find a suitable model, I found…
(I checked both server edition and desktop edition. The support was there in both cases.)
So it’s there. It’s doing the job needed to extend SSD life. Done. Now all I have to do is not fill up the disk space in the partitions or logical volume units — which is beyone the scope of this contribution.
Now, about the frequency. In the man page for fstrim, the author says that doing a TRIM too often “might negatively affect the lifetime of poor-quality SSD devices.” It goes on to say that once a week intrtbsld is a suitable balance between performance and device life in both desktop and server work.
Now I wonder what else is hiding in systemd?
Comments, suggestions, and error reports are welcome.
Send them to:
spamfilter (at) satchell (dot)
© 2021 Stephen Satchell, Reno NV