tikki_timbo :
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.
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...