0

Activating trim can boost an SSD, but does it has any impact when I do it? Can it be "too late"? Or can I wait until the SSD gets slow? Does the waiting have any permanent drawbacks?

2

TRIM has an effect sometime after the operating system issues TRIM commands to the SSD; and it's not necessarily an immediate effect other than if the operating system tries to read TRIMed sectors it will probably get zeros instead of any old data.

If your OS doesn't have TRIM enabled, but you later enable it, your OS will then start sending TRIM commands to the drive when files are deleted. The drive firmware will then use this information to more efficiently rearrange data on the flash--which means over time it will be able to keep more freshly erased portions flash ready for new data. Erased portions of flash are faster than those partially written.

It's never "too late" to do this. The worst that can happen is that there's no performance improvement, which might happen if the drive has been written to a lot and is almost full.

4
  • So if I do it "too late" I risk the "damage" of a permanent slowdown? Is that what you're saying? – klutt Jan 4 at 23:04
  • There is no big risk, but unless you are experiencing issues with your OS (I am not), enabling TRIM is the correct thing to do. – John Jan 4 at 23:40
  • If you never enable trim then you risk a slow down due to the wear leveller having to rearrange blocks it has no idea are empty or not. If you do it "late" you will still have a slowly improving system. If you let the OS do it's weekly scan then the OS knows what areas of the disk are empty and will send trim commands for all of the empty space. That will result in a quickly improving disk. – Mokubai Jan 4 at 23:41
  • Windows 7 and up are trim aware OS's, they will automatically enable trim on any SSD introduced. – Moab Jan 5 at 2:57
2

Activating trim can boost an SSD, but does it has any impact when I do it?

Yes. Frequent TRIM operations allow the SSD's FTL to maintain a pool of free physical blocks that is as large as possible. That can reduce the occurrence of write amplification, which is the root cause of "the SSD gets slow".

To be clear, the OS/filesystem has its own concept of which storage blocks (LBAs) of the partition/drive are in use (i.e. have useful/valid data).
Because of the FTL and wear-leveling, the SSD has its own concept of which LBAs are valid, and another level of book-keeping for which physical flash blocks are valid.

Whenever the host PC writes to a LBA, the SSD is being informed that the LBA is valid.
If this LBA already has a physical block mapped to it, then wear-leveling requires that the original physical block to be unmapped and made free.
A (different and erased) free physical block has to be mapped to the LBA, and then the sector data can be written.
If a free physical block is not readily available, then a time-consuming sequence of read-erase-write operations is required. This write amplification at this stage can slow down this fundamental drive operation of write a LBA.

If the write is for a LBA that has no physical block mapped to it, then a free physical block has to be mapped to the LBA, and then the sector data can be written. This reduces the pool of free physical blocks.

As the OS/filesystem uses the SSD by creating, writing, reading, and deleting files, the LBAs can change between free and used states at the filesystem level. But to the SSD, each of these accessed LBAs is always treated as valid at the FTL level and has a mapped physical block (until the LBA is TRIMed).

The TRIM operation is the synchronization mechanism for the the OS/filesystem to notify the SSD's FTL that a LBA is no longer used (e.g. the file has been deleted). The FTL can then unmap the physical block that was assigned to the LBA and make that physical block free and erased.
Otherwise an unused (per OS/filesystem) LBA that is not TRIMed will be needlessly maintained by the SSD's FTL as valid data.

Note that because a TRIMed LBA no longer has a physical block mapped to it, any scheme to write (a sector of) all ones or all zeroes cannot simulate a TRIM operation.

Can it be "too late"?

Possibly yes for a heavily-used drive, because deferring TRIM operations can cause increased write amplification and accelerate the (limited number of) erase-write cycles of erase blocks.
There is no operation that can reduce the count of erase-write cycles for each erase block.

Or can I wait until the SSD gets slow?

The quantify of unmapped LBAs will be the same, but deferring TRIM operations can cause increased write amplification and accelerate the timeline to when the SSD "gets slow".

Does the waiting have any permanent drawbacks?

Yes, the SSD can incur more write amplification, which means that the (limited number of) erase-write cycles (of erase blocks) will be consumed faster.
IOW in a worse-case the life of the SSD could be shortened.

1

Please review this article:

https://community.spiceworks.com/topic/990840-how-important-is-ssd-trim

TRIM is a process by which the operating system sends a flag down to the SSD telling it which addresses on the drive contain invalid (deleted data) data that can be cleared or permanently erased. This process is important because invalid data on an SSD will cause it to slow down over time as the drive begins to accumulate more and more invalid data. TRIM is a feature that is driven by the operating system.

Rather than put it off, enable it and schedule it to run weekly. That works fine and how I manage my own SSD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.