Solid-State Drive Best Practices On Mac OS
SSDs (solid-state drives) are being more widely used in consumer computers as their pricing falls and capacities increase. Like most technology, prices of the solid state drives went down after a while; thank goodness! The Tech Report made a graph that shows the price per gigabyte (GB) of the most currently popular SSDs. Some of the SSDs listed at the top of this graph show their prices are below $1 per GB. That’s within the price range of platter-based drives – this means SSDs have started to become viable substitutes to traditional hard drives for consumer computer products.
The Tech Report research in June 2012 found that prices for solid-state drives have dropped 48% since the previous year.
The solid-state drives were made popular by Apple’s MacBook Air and were touted for their durability and resistance to physical damage due to the non-moving parts. As a result SSDs are becoming more popular for laptops and portable computers.
The benefits of these drives include:
- Less power usage
- Less heat generation
- Reduced potential for mechanical damage
- Faster performance when compared with mechanical drives
With these perks it’s no surprise that they have sparked an increase in SSDs in all computers from laptops to consumer and pro desktop systems. But you can’t always have your cake and eat it too. There are a few issues that may arise when using a SSD in your computer.
Although the performance is a major advantage to SSDs, there are a couple things to watch out for that can possibly result in degraded SSD drive performance on Macs.
The problem of degraded SSD performance on Macs is due to the technology behind solid state drives in that over time and use, the speed of the drive will start to slow down. The main reason for this is the SSD needs to be in an “empty” state before it can reliably accept data.
When it comes to a solid-state drive the system does not remove the actual data every time data is deleted from a drive, instead it just frees additional blocks to be overwritten. SSDs do this by modifying the drive’s index and directory files.
SSDs use NAND memory, which is organized into PAGES, which are then organized into BLOCKS. Different operations are executed on different levels of organization on the NAND memory. For example, a write operation is done on a page, and a delete operation is done on a block, which becomes a problem when the drive starts running out of pages. When this happens, the drive controller will need to recover some of the previously deleted pages.
In mechanical drives this is not a problem because the drive can easily write over used blocks, while modifying them to contain the new data in one fell swoop. In SSD drives, however, the blocks containing unused data needs to be properly erased and set to a “ready” state before accepting new data.
The following steps are required for the drive controller to recover the files:
- Copy any data on the pages in the block that are not marked for deletion into its cache
- Once in the cache the controller will need to update the data marked for deletion
- Free up the “real” block
- Write the cache copy into the “real” block
This process will eventually lead to a situation known as “write amplification”, where unnecessary page writes occur, shortening the life span of the SSD. There are a limited number of erase/write cycles for each SSD, and write amplification will accelerate the solid-state drive towards that limit. Write amplification results in the actual amount of physical information written being a multiple of the logical amount that was supposed to be written. This multiplying effect increases the number of writes required over the life of the SSD shortening the time it can reliably operate.
When you purchase a new SSD, they already have the storage blocks in a ready state, resulting in the drives being very fast. But, as the drive’s blocks get progressively filled through use, the number of blocks that are left in the “ready” state will drop until eventually all writing processes by the system will have to wait for the drive to first reset the blocks being used. The decrease in performance may not necessarily make your system feel like it’s crawling, or even as slow as the speed of mechanical hard drives, but it may be noticeably slower than the initial performance rate.
To deal with this problem solid-state drive manufacturers and various OS developers are including procedures that will slowly reset unused blocks on the drives in the background when the drives are not being accessed. These routines include the “TRIM” and “Secure Erase” ATA commands that, if supported in the drive’s firmware, can be triggered by a software protocol to perform the block resetting procedure on the drive.
The support for these block resetting routines has only been implemented for the latest MacBook Pro systems, and only for SSD drives that are shipped already installed in the systems. This means that if you purchase a third-party SSD drive that supports TRIM, OS X will not use this feature. Therefore, the best method for cleaning up and reconditioning SSD drives in OS X has been to do various erase routines that will reset the SSD blocks. Here are a few ways to do this:
- Format the drive
Format the entire drive, but first make sure to back it up using Time Machine or a different cloning utility. Then use Disk Utility while you are booted off an alternative volume to partition the drive and erase it by writing zeros to it. After this is complete, you can restore the backup to the SSD.
- Erase free disk space
Another option is to use the “erase free space” feature in Disk Utility to write zeros to all of the unused portions of the drive.
- Third-party solutions
You can use a third party software tool like “DiskTester” to perform a “recondition” routine on SSD drives, which should force the use of TRIM on the unused sections of the drive.
Keep in mind that of these three options that people use, only the last one will truly “recondition” the drive. The first two options will write zeros to the drive, which is actually filling the drive with data and not leaving it in a “ready” state, unless your system supports TRIM. As a result using the first two options can cause some drives to show 0 KB available for the OS, which can prevent your computer from booting. Also, since SSD cells have a limited number of read and write cycles, zeroing out data may reduce the life of the SSD.
If you would like to enable TRIM support in your system, there is an option to do it with TRIM Support Enabler, which installs a modified drive kernel extension to allow TRIM to work. After applying the update you should see a line that says “TRIM Support: Yes” in System Profiler when you select your drive under the “Serial-ATA” section.
While TRIM and other SSD block resetting techniques are supposed to help improve performance, it raises the question:
To what extent will the average user benefit from TRIM procedures?
An article by bit-tech last year compared the performance of a MacBook Air using a SSD drive, first in the “empty” state and the in the “used” (dirty) state. This article found no notable difference in the performances of the two different ways to use the SSD. This performance test by bit-tech suggests that a MacBook Air would not benefit from the use of TRIM.
One caveat with using TRIM Support Enabler on your laptop of desktop is, that modifying the kernel extensions in OS X may cause kernel panics. This has not been reported to be a problem yet, but a factor for you to consider before using TRIM Support Enabler. Best practices for using an SSD may be to just keep the drive as it is and not try to optimize the performance by erasing or formatting the SSD. Using a proper TRIM utility that restores the solid-state drive to the “ready” state should be considered as an option only if you are having constant issues with your SSD’s performance and also if you notice a significant decline in the speed of your computer system.