Defragmentation is a useful tool for optimizing performance on both HDDs and SSDs, but for different reasons.
HDDs slow down considerably when they’re fragmented because the write-heads have to cover longer distances if file fragments are dispersed far apart from each other. Aside from the slowing-down of read and write processes, the life expectancy of the disk will also be reduced. As a result of fragmentation, the write head is forced to make additional movements and this affects the disk mechanics, which thereby leads to increased abrasion.
An SSD doesn’t have a classical read-write head. Data is instead coded using an electrical charge. In spite of this, fragmentation still ends up reducing disk performance and the life expectancy of SSDs. This is the result of internal activity on such disks. Whenever files are saved, the SSD controller distributes file fragments into the next available storage sections with the right amount of space (so-called “pages“). These file fragments have to be found by the read and write-heads using mapping tables. Depending on the level of fragmentation, this searching activity can take some time.
It can also be seen that an SSD with fragmented data tends to take up more blocks. This is because the system notices the number of fragments arising from any file and saves them in an equal number of blocks, even though they could fit into a smaller number. In the long run this ends up using more memory cells than are needed, which can result in unnecessary and premature disk failure.
Defragmentation of an SSD can also reduce write cycles. An SSD has only a limited number of write (or deletion cycles) available. While it may take time to reach this number (under normal circumstances several years), users of SSDs are still encouraged to reduce the number of write cycles. Just how defragmentation reduces the number of write cycles can be seen in the following example:
Process file test.txt
Case 1: File test.txt is found scattered above blocks A and B. When accessing the file and changing its content, blocks A and B each loose one write cycle.
Case 2: File test.txt is only located in block C. When processed, block c loses one write cycle.
Because a block doesn’t contain just one cluster but generally up to 8 of them, 8 times fewer write cycles can be achieved for case 2 in comparison to case 1. This reduction extends the life expectancy of the SSD enormously and can be achieved in SSDs by the special defragmentation methods available in O&O Defrag.
Please note that the calculation above is very simplified. It should only serve to illustrate the conduct of SSDs and is not meant to be an accurate source of technical information.