On Mon, Jul 22, 2013 at 4:42 PM, Stefan G. Weichinger <li...@xunil.at> wrote: > Am 19.07.2013 21:02, schrieb Paul Hartman: > >> Old SSDs that did not support TRIM would suffer write amplification >> after a certain amount of data had been written to them, but any >> modern SSD and modern OS will keep it nice and tidy. > > What's the "best practice" now for TRIM? > > I changed to manual "fstrim -v /" back then as they wrote that the > fstab-options weren't the right way of doing it. > > Any news on this? > > I have root-fs on ext4, btw ...
I think it depends on your usage patterns. "discard" will trim unused space immediately as files are deleted. Putting fstrim in your cron jobs will wait to free all unused space at once. If you delete many files, or large files, you may notice performance slowdowns by using discard. On the other hand, if your SSD is near full you may benefit from discard to allow faster write speed before the cron job runs. As far as I remember, some filesystems don't support "discard" option, but do support fstrim. So fstrim job may be "safer" as generic advice... and it was older advice, before "discard" existed, so old SSD guides may refer to it by default. I personally use "discard" with ext4 and btrfs, but I have not done tests or have evidence that it is the best choice for me. It's simply what I chose and never changed it. :)