For the unaware, a great explanation of TRIM is offered by Anandtech.com here:
http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=10
Basically, how I understand it is that one of the issues with modern MLC SSDs right now is that they can slow down over time as the drive is used.
This phenomenon is caused by the fact that MLC NAND flash cells have to be erased before they can be written to. For a cell that is not storing data (e.g. it is fresh from a format), data can be written directly to it with no problem. If the cell has previously been written to and the data it currently stores needs to be updated or overwritten, it has to be erased first. This erasure process consumes far more time than a regular write operation to an empty cell. Over time, after all of the cells have been used, every subsequent data write needs to have an erase operation proceed it.
The main problem in this issue is that current operating systems like Windows XP/Vista and OSX 10.5 Leopard and their file systems are created with traditional hard drives in mind.
When you delete a file on your computer, the actual data is not erased (this is how special utilities recover your 'deleted' data). The file system just "forgets" that the file exists and marks that specific location on the disk as unused. Critically, it does NOT tell the hard drive to physically erase the data that is stored at the now deleted file's physical location. At some point in the future, that storage location will be overwritten with new data when a new file is created in it's place. But until that time comes, that specific storage block remains written to. This process is employed because storage cells in traditional hard drives do not have to be erased before they can be written to again.
You should now understand the problem that occurs with SSDs: when a user deletes a file, the flash memory cells that were holding the data to that file are not being erased and therefore remain in a "written" state. Later on, when a new file is stored in that same location, the memory cells have to first be "wiped clean" before the new data can be written, and this erase process significantly slows down the whole operation. This results in a slowdown of an SSD drive over time as all of its memory cells are used.
// Note: This should not deter you from buying an SSD. SSDs still provide the most dramatic increase in everyday performance of any upgrade. Far more than even a 1000Mhz boost in processor speed or a bunch more RAM. This issue is not a crippling problem and most heavily-used SSDs will still far outpace a traditional harddrive, but everyone wants the best performance. As far as I've read, we are talking about a 20-30% reduction in speed at most, and this ONLY affects the write speed, whereas random read speed is the predominant factor in providing the major boost to system performance for most users.
Currently, some of the leading SSD manufacturers provide a software utility that, when run, goes through the entire drive and erases the unused cells that are no longer needed by the file system. Even though you can setup a simple script to run this utility intermittently, it is still basically a manual process, and definitely a stop-gap until proper support for SSDs is added at the operating system / file system level.
A new SSD command, called "TRIM", was designed explicitly for mitigating this problem.
From Anandtech:
Since that article, it has been confirmed that Microsoft's Windows 7 will provide TRIM support, and I'm sure it will readily be integrated into popular Linux distributions like Ubuntu, RedHat, etc.
The only question left is will OS 10.6 Snow Leopard support TRIM? Hopefully, the fact that you can buy Mac laptops with SSDs right from Apple means that they will do everything they can to provide OS optimization for SSDs, and TRIM should be a big part of it.
Does anyone have information about TRIM being implemented in Snow Leopard?
http://www.anandtech.com/storage/showdoc.aspx?i=3531&p=10
Basically, how I understand it is that one of the issues with modern MLC SSDs right now is that they can slow down over time as the drive is used.
This phenomenon is caused by the fact that MLC NAND flash cells have to be erased before they can be written to. For a cell that is not storing data (e.g. it is fresh from a format), data can be written directly to it with no problem. If the cell has previously been written to and the data it currently stores needs to be updated or overwritten, it has to be erased first. This erasure process consumes far more time than a regular write operation to an empty cell. Over time, after all of the cells have been used, every subsequent data write needs to have an erase operation proceed it.
The main problem in this issue is that current operating systems like Windows XP/Vista and OSX 10.5 Leopard and their file systems are created with traditional hard drives in mind.
When you delete a file on your computer, the actual data is not erased (this is how special utilities recover your 'deleted' data). The file system just "forgets" that the file exists and marks that specific location on the disk as unused. Critically, it does NOT tell the hard drive to physically erase the data that is stored at the now deleted file's physical location. At some point in the future, that storage location will be overwritten with new data when a new file is created in it's place. But until that time comes, that specific storage block remains written to. This process is employed because storage cells in traditional hard drives do not have to be erased before they can be written to again.
You should now understand the problem that occurs with SSDs: when a user deletes a file, the flash memory cells that were holding the data to that file are not being erased and therefore remain in a "written" state. Later on, when a new file is stored in that same location, the memory cells have to first be "wiped clean" before the new data can be written, and this erase process significantly slows down the whole operation. This results in a slowdown of an SSD drive over time as all of its memory cells are used.
// Note: This should not deter you from buying an SSD. SSDs still provide the most dramatic increase in everyday performance of any upgrade. Far more than even a 1000Mhz boost in processor speed or a bunch more RAM. This issue is not a crippling problem and most heavily-used SSDs will still far outpace a traditional harddrive, but everyone wants the best performance. As far as I've read, we are talking about a 20-30% reduction in speed at most, and this ONLY affects the write speed, whereas random read speed is the predominant factor in providing the major boost to system performance for most users.
Currently, some of the leading SSD manufacturers provide a software utility that, when run, goes through the entire drive and erases the unused cells that are no longer needed by the file system. Even though you can setup a simple script to run this utility intermittently, it is still basically a manual process, and definitely a stop-gap until proper support for SSDs is added at the operating system / file system level.
A new SSD command, called "TRIM", was designed explicitly for mitigating this problem.
From Anandtech:
"There’s a command you may have heard of called TRIM. The command [requires] proper OS and drive support, but with it you could effectively let the OS tell the SSD to wipe invalid pages before they are overwritten. The process works like this:
First, a TRIM-supporting OS (e.g. Windows 7 will support TRIM at some point) queries the hard drive for its rotational speed. If the drive responds by saying 0, the OS knows it’s a SSD and turns off features like defrag. It also enables the use of the TRIM command.
When you delete a file, the OS sends a trim command for the LBAs covered by the file to the SSD controller. The controller will then copy the block to cache, wipe the deleted pages, and write the new block with freshly cleaned pages to the drive.
Now when you go to write a file to that block you’ve got empty pages to write to and your write performance will be closer to what it should be. "
Since that article, it has been confirmed that Microsoft's Windows 7 will provide TRIM support, and I'm sure it will readily be integrated into popular Linux distributions like Ubuntu, RedHat, etc.
The only question left is will OS 10.6 Snow Leopard support TRIM? Hopefully, the fact that you can buy Mac laptops with SSDs right from Apple means that they will do everything they can to provide OS optimization for SSDs, and TRIM should be a big part of it.
Does anyone have information about TRIM being implemented in Snow Leopard?