Should I defrag an SSD drive? [duplicate]

Solution 1:

Since there seems to be some controversy about this I thought it would be helpful to give a detailed explanation:

You should never defrag an SSD. Don't even think about it. The reason is that physical data placement on an SSD is handled solely by the SSD's firmware, and what it reports to Windows is NOT how the data is actually stored on the SSD.

This means that the physical data placement a defragger shows in it's fancy sector chart has nothing to do with reality. The data is NOT where Windows thinks it is, and Windows has no control over where the data is actually placed.

To even out usage on its internal memory chips SSD firmware intentionally splits data up across all of the SSD's memory chips, and it also moves data around on these chips when it isn't busy reading or writing (in an attempt to even out chip usage.)

Windows never sees any of this, so if you do a defrag Windows will simply cause a whole bunch of needless I/O to the SSD and this will do nothing except decrease the useful life of the SSD.

Solution 2:

Someone (200_success) made a comment that is much more relevant to the question and it worths a better detailing.

First of all: HDD means hard disk drive, and it really has a disk inside it. This disk is divided is small pieces, called sectors, where information is stored. Take a look at this picture:

Disk image

A sector is indicated by the letter C.

Now, this sector is very small: only 512 bytes, in general. So, to store a common file of 10k, you'll need to use many sectors.

Imagine that those sectors are one following the another, like the green representation, letter D, in the picture. When you need to read the file, the hard-drive head will be positioned at the beginning of the first sector and will read all them, while the disk is spinnning.

That's how things should work.

Now it might happen to the file be spread along many sectors, each one in one part of the disk. What does that means? That to read your file again, the hard-disk head will be positioned at the beginning of the first sector, read it, then it'll have to move to the beginning of the second sector (that is somewhere else in the disk), will read it, and so on...

This will take a long time. We're talking about a physical move of the head. The more the head moves, the longer it takes.

So, you defrag the disk: the program try to moves all pieces of the file so that they end up in sequence, being easier and faster to read, since there will be less physical movement of the head to read everything.

Ok so far? So we begin to talk about SSD: they are a bunch of memory chips on a board. When you save or read something from them, the controller chip just need to activate some bits and, voilà, the correct chip is read from the memory. And it doesn't matter where it is stored, the action of accessing a memory chip is much faster than the physical move of the HDD. So, roughly speaking, you wouldn't notice that time in a fragmented file in a SDD.

And, being more detailist and correct, the controller chip will spread your file among many chips to take advantage of parallel readings and so on, so it knows how to handle your files so that they are always stored in the best (optimized about speed and wear of those memory chips) than Windows could know.

Solution 3:

The built-in defragmentation tool in Windows 8 will not defragment your SSD, but send a bunch of trim commands to the device. For more details on this, see this question. As Roberts already pointed out, you don't want to defragment your SSD at all.