Site icon MacTech.com

TRIM support in Mac OS X Lion is overdue

One of the nice surprises (though it shouldn’t have been a surprise) in the Mac OS X Lion preview that Apple released last week is the addition of TRIM support. Since the long-term future of the Mac is with solid state drives, it’s about time added this.

A TRIM command allows an operating system to inform an SSD which data blocks, such as those belonging to a deleted file or affected by a format command, are no longer being used so can be wiped internally. That’s important because the low-level operation of SSDs differs from traditional hard disk drives in the way operating systems handle operations like deleting and formatting. TRIM enables the SSD to handle garbage collection overhead which would otherwise significantly slow down future write operations to the involved blocks, in advance. In other words, it helps maintain optimal performance and extend the life of your SSD.

Mac OS X 10.6 doesn’t optimally handle SSDs. All versions of OS X up to Lion treat SSDs as a Hard Disk Drive when deleting a file or formatting the drive. Treating a SSD in this way will degrade performance over time as the drive’s flash cells are unnecessarily taxed and will wear out after a certain amount of read/write cycles. TRIM doesn’t wear out SSDs and deletes data in a far more efficient way.

Or, as Bit-Tech (http://www.bit-tech.net/hardware/apple/2010/07/01/mac-ssd-performance-tr…) explains: “Unlike a hard drive which can just write straight over that 10KB of space when a new file comes along, when the SSD comes to rewrite data to its 10KB of ‘free’ space in the now dirty cell, in order to retain the 10KB file still there, it must first read that data to its cache or controller, wipe the whole 20KB cell clean and then rewrite the complete set of valid data, old and new, into the cell. While rewriting data has little impact on performance for a hard disk drive, this read-modify-write process can drastically reduce performance on an SSD in comparison to writing to virgin cells, and is one of the main causes of SSD performance degradation following extended heavy use.

“…. There is a fix though, in the shape of the TRIM command. This command reorganises written data and scrubs junk data after it’s deleted (triggered by a delete command, clearing the recycle bin or formatting the drive), meaning when the drive comes to write data to that cell again, there’s nothing but nice clean NAND waiting for it. It ensures the optimum write performance, but it requires both software support from the OS and firmware support from the SSD itself.”

Obviously, since can get Macs with solid state drives, a lack of TRIM-ming doesn’t mean SSDs won’t work with Macs. But they’ll work even better in tandem when Mac OS X meets TRIM. And the SSD in your Mac should last longer.

— Dennis Sellers

Exit mobile version