Q. What is the TRIM function for solid state disks (SSDs) and why is it important?

John Savill

April 21, 2009

2 Min Read
ITPro Today logo in a gray background | ITPro Today

A. In my previous FAQ, I explained the performance degradation of write operations that overwrite data on SSDs. There are limits to how well this problem can be solve because SSDs aren't told when data is deleted—the OS makes the memory space available in the file system and doesn't bother actually deleting the content. (This is how file recovery utilities are able to work.)

Unlike with traditional hard disks, it would be advantageous to tell the SSD when you delete files so that the SSD could delete the pages at the time of the delete instead of performing the entire block erase procedure when you want to write data. This is where the TRIM function comes in.

Windows 7 and Windows Server 2008 R2 support the TRIM function, which the OSs use when they detect that a file is being deleted from an SSD. When the OS deletes a file on an SSD, it updates the file system but also tells the SSD via the TRIM command which pages should be deleted. At the time of the delete, the SSD can read the block into memory, erase the block, and write back only pages with data in them, as illustrated here. The delete is slower, but you get no performance degradation for writes because the pages are already empty, and write performance is generally what you care about.

Click to expand

Note that the firmware in the SSD has to support TRIM, but the good news is that firmware updates are coming out for many SSDs to add TRIM support—I just updated some of my OCZ SSDs with firmware that adds TRIM. Expect all new SSDs to support TRIM.

TRIM only improves performance when you delete files. If you are overwriting an existing file, TRIM doesn't help and you'll get the same write performance degradation as without TRIM.

Related Reading:



Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like