tikki_timbo

Distinguished
Mar 31, 2009
7
0
18,510
I remember when SSDs were the new rage, sure they were fast, but after a long time of using them, the performance dropped. Then came Windows 7 and TRIM and and you didn't have to worry about performance dropping over time, cause TRIM kept the drive neat and tidy, so the drive could perform like new. Now that SSD technologies have matured even more, I keep hearing that even if you don't have TRIM enabled (like WinXP or SSDs in a RAID), that the SSD internal carbage collection can take care of that and you won't have to worry about the drive losing performace from being dirty and disorganized.

So if the SSD have now become smart enough to clean up without OS telling it its time to TRIM, why is TRIM still important? Wouldn't it be best for the SSD to send itself the TRIM command as the SSD firmware could be customized to the drive and when it should TRIM and when it should wait? I even remember hearing something about certain SSDs being really slow when the TRIM is going on. It just seems like the SSD doesn't need to be told to clean up (TRIM) when its already cleaning up (garbage collection) by itself.
 
Solution

undercovernerd6

Distinguished
Dec 7, 2011
153
0
18,710
trim is built into windows 7. If the SSD supports it naturally it would be on. To check if it is, or isn't .

While using something like Intel's previously mentioned Toolbox application to TRIM your drive is extremely useful, you need to make sure Windows 7 has enabled it first. And, while Windows is designed to automatically detect most SSDs, sometimes it doesn't work as intended. If you find the performance of your SSD is degrading (or just want to make sure TRIM is properly enabled), run Command Prompt as an administrator and type:


fsutil behavior query DisableDeleteNotify

It will give you one of two results, either a 0 or a 1. A zero indicates that TRIM is enabled correctly, a one means that it is not. If you have a TRIM-compatible SSD, but find that Windows 7 hasn't enabled the command, you can easily do so by running this command:


fsutil behavior set disablenotify 0

Note that TRIM is only supported in Windows 7, so if you have an SSD but are running an older version of Windows, it's probably a good idea to upgrade.
 
SSD garbage collection was developed before the TRIM command was integrated into Microsoft Windows 7.

The TRIM command is used to compliment an ssd's garbage collection by identifying the exact data that a Windows 7 user has deleted. SSD's can identify deleted data on their own but it is very very inefficient and very time consuming process.

There actually are some ssd's designed to work without TRIM. Most of them are enterprise level ssd's.
 

humphreybot

Distinguished
Jan 20, 2011
144
0
18,690
i have been researching this exact question myself. i recently upgraded my cpu, gpu and ram and the only room i have left for an upgrade is an ssd, but i run vista and it doesnt support trim. i have found alot of crap, most from 2009 ^ 2010. basically out of date to current technology. i have found a couple things that are worth reading http://thessdreview.com/Forums/mac-osx/196.htm and this http://thessdguy.com/ssd-garbage-collection/ . the first link has a quote from a wiki ....the important part is "over provisioning" and the second link is about, basically, how far built in wiping has advanced. i also found a guy that tested ocz wiper utility over time, without using trim and his results showed that it does a great job ok keeping the drive clean. sadly i can not re-find the item again (or i would have shared it). personally i have decided to get an ssd for my system and just use the garbage collection that comes with the drive....i will be getting ocz, btw
 


The answer is yes, TRIM is still very much important.

SSDs do not have any knowledge of any filesystems that are installed on them, only of which physical blocks are populated and which are not. Deleting a file from a file system usually does not explicitly erase the file from the medium, in fact platter drives have no mechanism to erase data, only overwrite it. When a file is deleted, it is only marked as deleted within the file system (which the SSD doesn't understand) and the allocation units that were storing the data are marked as being available. The data on the allocation units is still present and intact, this is what allows files to be recovered even after they have been deleted. This means that blocks which may be 'logically free' as far as the file system is concerned, may actually have data in them as far as the SSD is concerned.

Unlike hard drives which can only overwrite data (even if it's just with zeroes), SSDs can only write to an otherwise empty block. Thus, to overwrite an existing logical block an SSD has two options. First, it can write to another empty block and remap the logical block to the physical block (wear levelling), or it can erase the physical block and write to it again.

Without TRIM the SSD will eventually fill up completely with data even if the filesystem has unallocated blocks. This requires the SSD to erase a block every time it has to write to a block, turning a one step write operation into a two step rewrite operation. Since IO operations are key to SSD performance, this greatly diminishes write capabilities.

With TRIM, the OS can tell the SSD when a logical block is emptied, thus allowing the SSD to free up the corresponding physical block and erase it when it is convenient rather than when it is absolutely necessary.

The reason that the SSD cannot send itself the TRIM command is that the TRIM command requires proper understanding of the file system and which logical blocks are actually free as opposed to which have useful data on them. It is technically possible for SSD controller manufacturers to create an SSD controller with full knowledge of the NTFS, HFS+, EXT2+ file systems but this is unnecessary when there's already a computer attached to it that's going to be doing all the same work already just to perform routine filesystem maintenance.

Internal garbage collection is a completely different process that occurs when the SSD knows that a block is empty and can erase it. This can occur from data compression, remapping, wear leveling, etc...
 
Solution