If you haven’t heard of TRIM by now, get ready to join the growing ranks of the initiated, which include solid state drive (SSD) makers, operating system developers and data storage vendors.
More companies are turning to the TRIM command, a subset of the data set management features within the latest ATA specifications, to help them improve the speed of SSD drives and ultimately boost the drives’ overall read and write performance.
As the implementation of TRIM on SSDs and in operating systems should be simple, TRIM should be widely adopted in the very near future, said Jim Handy, an SSD analyst at Objective Analysis, a semiconductor market research firm.
“I expect TRIM to be in all SSDs by the summer of 2010,” he said.
Major SSD vendors have already implemented TRIM support in their SSDs. Intel (NASDAQ: INTC) did it through a firmware upgrade to existing drives. Micron’s (NYSE: MU) new 6Gb/s SATA drives support TRIM, and STEC (NASDAQ: STEC) and Fusion-io also support the command. And Linux and Windows are also adding TRIM support.
Reclaiming Unused SSD Data Blocks
The TRIM command enables an operating system to tell a solid state drive which data blocks are no longer in use; otherwise the SSD controller would not know it could reclaim the unused blocks.
“TRIM promises to be a boon to SSDs,” said Handy.
He believes the simplicity of TRIM could dramatically reduce write amplification while permitting SSDs to do a better job of pre-erasing spare blocks in the background to make them available for writing sooner.
A key point to bear in mind is the role of the OS, said Radoslav Danilak, chief technical officer of SandForce.
“The SSD knows what stale data can be deleted and recycled, but it does not know what data the operating system has decided to delete until the operating system actually reuses the logical block address (LBA) for new information,” said Danilak.
“The advantage of operating this command is the SSD now has access to LBAs from both stale data and OS deleted data, allowing it to perform faster,” said Danilak. “The only negative aspect of TRIM would be if it was implemented poorly in the SSD firmware and its operation hindered normal drive operations.”
If TRIM allows an SSD to completely ignore an LBA range of data, that’s a good thing, but it can have a net result that is fairly useless, said Scott Shadley, senior manager for SSD technical marketing at STEC.
For Shadley, the real issue is that the LBA range is not likely to be in any sequence of physical locations on the flash in the SSD if wear leveling is working.
“This means that the SSD is still fraught with the issue of how to move data around inside the device to actually free space,” said Shadley.
“If that LBA range affects pages all over the media, no single block or smallest erasable unit is actually freed,” Shadley said. “This leads to even more complex wear leveling and further write amplification. Doing the math shows TRIM is only advantageous for an SSD that implores a wear leveling scheme that is already ineffective at saving or extending drive life or performance.”
SSD Garbage Collection Matters
When considering how to improve the overall read/write performance of an SSD, the TRIM command is only a small part of the solution, said Danilak.
“There are many facets to the architecture of an SSD that contribute to its overall performance,” Danilak noted.
“Take for example the feature of every SSD called garbage collection,” he said. “This is the act of moving valid data blocks and erasing flash pages in preparation for new writes.”
Garbage collection is a vital part of the operation of the SSD, and having a fast garbage collection capability will enable the SSD to keep a balanced read/write ratio in the tens of thousands of IOPS.
“TRIM will enhance the SSD’s garbage collection capability, but if that base functionality is not present, you are just putting lipstick on a pig,” said Danilak.
Databases, File Systems, RAID Not Ready for TRIM
Another limitation of TRIM is that file systems are not aware of what blocks within a file may be no longer used, said David Flynn, CTO of Fusion-io, which has supported TRIM since the introduction of its first product, the ioDrive.
“For example, a database file may have sections that once held relevant data, but now hold nothing of interest,” said Flynn. “Unless the database engine is also changed to issue TRIM notifications, the inline defragmentation would be unable to benefit from knowing that those blocks are useless.”
To make matters even worse, in a RAID setup where one SSD is mirrored to another, the rebuild process will have no knowledge of which blocks are useless, said Flynn.
“The RAID system will therefore copy even useless blocks to the mirror drive, defeating any advantage that drive could have received by knowing about the irrelevance of those blocks,” Flynn added.
Flynn added that file systems on Windows and Linux have only recently been enhanced to issue TRIM hints, but that databases and other key applications have still not been enhanced to issue TRIM directives, while RAID systems are not yet TRIM-aware enough to avoid losing information during a rebuild.
Flynn said it is important to realize that the benefit of TRIM is limited to the amount of space left unused in the file system.
“If the file system is almost full, TRIM does no good,” said Flynn. “However, if one is willing to leave space unused to gain better write performance, then it is much easier to simply format the SSD for a smaller usable size — basically, never giving the space to the file system in the first place.”
While accepting that TRIM is a nice feature, Flynn is far from impressed with it. “In essence, all it is does is allow unused blocks to offer the same improvement to write performance as does setting aside more over-provisioned space outside of the file system,” he said.
Still, TRIM will likely help boost the speed of SSDs.
“Faster SSDs will be appealing to power users who are willing to pay the price for faster program load times,” said Handy.
Follow Enterprise Storage Forum on Twitter