1. Home
  2. Docs
  3. Hardware and Network
  4. Solid State Disk TRIM

Solid State Disk TRIM

Some thoughts on TRIM

by </ joekamprad>

As I noticed, most distributions use continuous TRIM by default, when detecting an SSD is present they’re putting discard option to fstab.

BUT: 
Reading here: https://wiki.archlinux.org/index.php/Solid_State_Drives#TRIM

Continuous TRIM
Warning: Unfortunately, there are wide quality gaps of SSD’s bios’ to perform continuous TRIM, that’s why using the discard mount flag is not recommended generally by ext filesystem developer Theodore Ts’o.

If you’re in doubt about your hardware, apply Periodic TRIM instead.
Note: Before SATA 3.1 all TRIM commands were synchronous, so continuous trimming would produce frequent system freezes. In this case, applying Periodic TRIM less often is a better alternative.

The similar issue holds also for a number of devices, for which queued TRIM command execution was blacklisted due to serious data corruption. See Wikipedia: Trim (computing) Shortcomings for details.

So would it be better to use Periodic TRIM on most SSD devices ???

Theodore Ts’o says: …For these two reasons, on Linux, the recommended way to use TRIM is to use the fstrim command run out of cron, so that during an idle period the TRIM commands can be issued for all of the unused areas on the disk.

So in my opinion, it is better to check if your SSD device is supporting TRIM at all in the first place, second check the internet if there are issues with it on your specific drive, then decide what to enable.

I would say if your SSD is supporting TRIM and have no issues, the safest thing to do, is to use periodic TRIM.

Sources:

https://forums.freebsd.org/threads/ssd-trim-maintenance.56951/#post-328912

https://blog.algolia.com/when-solid-state-drives-are-not-that-solid/

https://wiki.archlinux.org/index.php/Solid_state_drive

Follow us

Articles

Was this article helpful to you? Yes 1 No

How can we help?