The benchmarks are clear: Solid-state drives slow down as you fill them up. Fill your solid-state drive to near-capacity and its write performance will decrease dramatically. The reason why lies in the way SSDs and NAND Flash storage work.
Filling the drive to capacity is one of the things you should never do with a solid-state drive. A nearly full solid-state drive will have much slower write operations, slowing down your computer.
Empty Blocks and Partially Filled Blocks
When you write a file to your solid-state drive, it looks for empty blocks and fills them. Writing to an empty block is the fastest possible write operation. That’s why new operating systems (Windows 7 and later) support the TRIM feature, which automatically deletes a file’s data from the solid-state drive as soon as you delete the file in your operating system. This works differently from magnetic hard drives, where bits of deleted files sit around on the hard drive.
They don’t sit around on a solid-state drive — TRIM ensures that the block is emptied so the SSD can quickly write new data to the empty block in the future. Writing over an already-written sector is just as fast as writing to an empty sector on a mechnical hard drive, but a solid-state drive must erase a block before writing to it.
NAND Flash memory writes data in 4 KB pages inside of 256 KB blocks. To add additional pages to a partially filled block, the solid-state drive must erase the entire block before writing data back to it.
As your solid-state drive fills up, fewer and fewer empty blocks are available. In their place are partially filled blocks. The solid-state drive can’t just write the new data to these partially filled blocks — that would erase the existing data. Instead of a simple write operation, the solid-state drive has to read the value of the block into its cache, modify the value with the new data, and then write it back. Bear in mind that writing a file will likely involve writing to many blocks, so this can introduce a significant amount of additional delay.
TRIM Doesn’t Consolidate Partially Filled Blocks
If you fill a drive to capacity or near capacity, it’s likely that you’ll end up with many partially filled blocks after you delete files. The TRIM command just directs a solid-state drive to remove file data when the file is deleted. It doesn’t force the drive to do any sort of cleanup operation.
In other words, fill a solid-state drive to capacity before deleting files and you’ll likely end up with many partially filled blocks. The drive won’t go out of its way to consolidate these partially-filled blocks into full blocks, freeing up empty blocks. The drive will still be full of partially filled blocks and write performance will be degraded.
Overprovisioning and Garbage Collection
To prevent consumers from filling up their solid-state drives and ending up with severely degraded performance, SSD manufacturers are going out of their way to counter this.
Consumer-grade solid-state drives often set aside about 7% of their total flash storage and make it unavailable to the user. This is known as “overprovisioning” — extra storage hardware is added to the drive but isn’t visible to the computer as available storage it can use. The spare area ensures that the drive can never become completely full — there will always be some spare capacity to help keep write performance stable.
Each solid-state drive’s controller has a garbage-collection algorithm to try to mitigate this problem. When the drive becomes full, it will look for partially-filled blocks and start to consolidate them, freeing up as many empty blocks as possible. Different solid-state drives run these operations at different times and thresholds — that depends on the drive’s controller.
Anandtech performed a variety of benchmarks with different drives to tease out the relationship between a solid-state drive’s spare area and the consistency of its write operation performance. When filling up an empty drive, they found high write performance very early in the process and a significant drop as the write operations continued to fill up the drive.
Setting aside more spare area on the drives helped the performance to remain consistent, as it ensured the drive should always have enough empty blocks ready.
They found that “minimum performance improves substantially once you hit 25% spare area for these [consumer] drives.” Their final recommendation was that you should “plan on using only about 75% of [your drive's] capacity if you want a good balance between performance consistency and capacity.”
If you have a solid-state drive, you should try to avoid using more than 75% of its capacity. Buy a larger drive with more storage than you need and you’ll ensure that you always have consistent write performance. Luckily, SSDs are gradually becoming much cheaper, so this isn’t as expensive as it once was.
Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.
- Published 06/21/13