Should I defragment my SSD?
SSDs are now the storage device of choice for enthusiasts and gamers. Some would even say they are the upgrades that will affect your PC the most. They’re smaller, faster, and more reliable over the years. But do you need to defragment them? The most concise answer is no. The long answer is absolutely no.
Before we expand too much on this, it’s worth explaining why defragmentation is good for traditional hard drives.
HDDs operate using physical spinning platters, and the drive “heads” must be positioned over the correct data. (Think of it like a vinyl record player, only much faster.) Data is stored in sequential chunks on different parts of the platter. In order to access a block for reading or writing, the drive head needs to be positioned on the correct sector, and then the desired block must pass under the drive head. Combined, these two steps give the drive access time. For a typical 7,200 rpm drive, the rotational delay is 4.17 ms (half a revolution) and the seek time is about 8-12 ms.
With use, data that was once ordered sequentially on the drive may be scattered into different blocks. This is called fragmentation, and when it happens, the drive heads need to access data from two (or more—sometimes more) different parts of the platter, drastically reducing performance.
Defragmentation rearranges data blocks in order and attempts to restore the original performance of the hard drive. After finding the initial seek time at which the data starts, everything after that is just fetching the data sequentially, block by block.
The reason there is no need to defragment an SSD is because there is no seek time or spin delay. In contrast, SSDs access flash memory (NAND) at much higher speeds, typically less than 50 microseconds, or 50 microseconds, or about 300 times faster than a typical hard drive with an average access time of 15 milliseconds. But the story isn’t just about speed.
Not only do SSDs eliminate moving parts and reduce access times, they also have built-in wear leveling algorithms. The reason is that NAND gates wear out over time and are rated during program/erase cycles. Each cell in a modern SSD can be written about 3,000 times before the cell stops functioning properly. To avoid faster wear of individual cells containing frequently changing data, SSDs track the usage of each block, and wear leveling algorithms ensure that cells on the SSD are written a similar number of times over time. There are also extra blocks that are inaccessible to the user and that algorithms can use to prevent drive wear.
Because of the way SSDs work, not only is data not fragmented, but running a defragmentation utility can actually burn program/erase cycles and potentially cause the SSD to “die” prematurely. That’s not going to happen anytime soon – take the 500GB Samsung 850 Evo for example, which has a total write volume of 150TB, or the equivalent of at least 300 writes to each block of the drive. The typical user writes less than 20GB per day on average, and it takes over 20 years to burn through 150TB of writes. But defragmentation can easily write hundreds of gigabytes of data, which wears out the SSD faster.
The good news is that any decent defragmenter should also detect the presence of the SSD and warn you not to defragment it. In the case of Windows Defrag, when it detects an SSD, it just gives you the option to optimize pruning, which frees segments that have been marked as erased – it does this automatically every week anyway. So no, there is no need to defragment the SSD.