15

I have heard that defragmenting SSD drives will shorten the life span of a drive. Just wondering if there is any truth to this and if so could someone elaborate as to why this happens.

  • Defragmenting it one time is bad idea, defragmenting it second time is stupid idea, but after third thousand everybody will think you are an explorer! – iskra Oct 25 '12 at 20:56
  • 2
    Yes, it a bad idea. There's no need to defragment an SDD as it doesn't have slow-down issues when data is fragmented (unlike traditional harddrives). You'll only be wearing your SSD out for no good reason. – Django Reinhardt Oct 26 '12 at 12:37
25

Your best bet is to not "defragment" SSD storage.

Eventually, SSD will lose capacity slowly and gracefully as the controller can’t write the data correctly to exhausted cells, but the repair data from 2011 through 2018 shows that Apple SSD are orders of magnitude more reliable and have longer life than HDD storage currently or in the past could achieve.

The life span of the drive is a function of how the controller decides to write data and how much of the capacity is held in reserve to hide small errors over time. An SSD in general will wear out due to write exhaustion before a hard drive will as the magnetic media can withstand several orders of magnitude more writes than SSD memory cells. So the life span is basically set, and defragmentation means more writes than are needed and may in practice increase the chance your storage will degrade before something else causes you to stop using it, Granted, most people are not going to wear out their SSD - especially when you consider the warranties for OEM parts are often longer than one year / three years in the case of AppleCare - but reducing things that can cause thousands (or millions) of unnecessary erase and re-write operations is prudent advice.

But it gets worse for defragmentation than simply adding wear to the memory.

Since an SSD has no moving parts, retrieving a block of data has no penalty due to one block being stored on one chip versus another. The distance electrically to all the data is basically a constant. This is not true for a traditional magnetic drive with spinning platters and a movable read head.

On a spinning drive, the distance between two blocks is affected by head armature movement, rotational timing and cache status. Retrieval time is not at all constant, so "fragmentation" has a performance impact on traditional hard drives due to the mechanical nature of the storage.

Furthermore, SSD controllers selectively manage storage so defragmentation is not only unlikely to speed things up, might actually act counter to the normal storage prediction algorithms, and slow down access since the controller decides where to store data using the extra overhead. Since the device cannot erase just a block of storage, when you "delete" something on SSD, it often is just marked free and will not get actually erased until all of the data next to it is marked as free or the drive runs low on space and triggers a clean up on it's own.

Letting the SSD manage it's fragmentation works better than trying to have the OS micromanage storage that doesn't match traditional hard drive storage mechanics.

  • 1
    I wonder whether rebuilding the directory structure with DiskWarrior is a bad idea, either. Any Ideas? – myhd Oct 30 '12 at 18:21
  • 2
    Not a problem in the context of write exhaustion of SSD since directory blocks are small and you are addressing an internal database and not shuffling things around in a large way. Also, the size of the directory/catalog/metadata is negligible compared to the data itself. SSD doesn't make DW use worse or better than HDD. – bmike Oct 31 '12 at 22:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .