Wednesday, September 13, 2017
Ubuntu 14 04 TRIM Your SSD
Ubuntu 14 04 TRIM Your SSD
Whilst watching htop when installing wine, I noticed a lot of disk wait time, which I thought was odd because Im running a Samsung 830 SSD on Ubuntu 14.04. (If youre thinking about getting an SSD, I currently recommend the 840 EVO.) One of the "big features" of Ubuntu 14.04 was supposedly TRIM support, enabled by default, which should keep the SSD In fairly prime condition. It turns out that this is only "half the story".
Samsung And Intel Only
"Only Intel and Samsung SSDs will have TRIM enabled by default in Ubuntu 14.04 because some cheap SSDs can even brick themselves when running TRIM. This doesnt mean TRIM should only be used with Samsung and Intel SSDs, but to avoid running into issues, this is the only option for now." [ Source ]
Default Weekly Anacron TRIM
There is a script at

For those not familiar with Anacron, its very much like the cron service, a utility that runs a task/script at a scheduled time or event (such as a reboot), except that with anacron, if the event was missed due to the computer being off at the time, anacron will trigger the script/task next time the computer is started up. The folders located at
Manually Running TRIM
I wasnt prepared to wait until the weekly trigger for my SSD to be trimmed, and wanted to be sure that the SSD is getting trimmed, so I manually ran the TRIM with the following command:
sudo fstrim -v /

References
- WebUpd8 - Trim Enabled By Default For SSDs
- Ask Ubuntu - How is TRIM Enabled?
- Ubuntu Docs - CronHowto
download file now