Home » Questions » Computers [ Ask a new question ]

Why can't you defragment Solid State Drives? [duplicate]

Why can't you defragment Solid State Drives? [duplicate]

I keep hearing that this is a huge no-no. Why is this? I run Ubuntu mostly so it doesn't affect me, but I was just wondering.

Asked by: Guest | Views: 406
Total answers/comments: 5
Guest [Entry]

"Solid state drives are based on flash memory, which age very differently than standard spinning platter-based hard drives. Each sector has a limited number of write cycles, so the drives include wear-leveling features that allows the drive to last longer by essentially fragmenting the drive on purpose.

The read times are not greatly improved by defragmenting as they are in standard drives, so there is no real gain in defragmentation, but by doing so, you are increasing the number of writes to the drive, thereby decreasing the drive life."
Guest [Entry]

"Note that there shouldn't be any technical reason for not ""being able to defragment a solid state drive"", in the sense that you could start a defragmenter program and run it against the drive.

But doing so doesn't have the effect it does on non-solid state drives, as moving the clusters together won't actually speed up the drive.

On the other hand, what you will do is perform lots of unnecessary writes on the drive, and this will shorten, albeit slightly, the life-span of the drive.

Additionally, many solid-state drives does optimizations to lessen this problem by reducing repeated writes to the same area, and this is transparent to the outside system, in which case the clusters might not be moved together at all but instead spread out over the drive. This technique is typically ""wear leveling"".

If a defragmenter program refuses to defragment a solid state drive (or even just list it as a drive you can select), I'd wager that it's basically a software refusal to do so, just to avoid the problems outlined above.

Note that I don't know enough about the underlying protocols used to defragment a drive, so there might very well be a hard block from a solid state drive to accept defragment commands, if there are such things. The reasons for this, however, are the ones described here."
Guest [Entry]

"Actually, you can. Defragmentation is a filesystem-level thing, it doesn't matter what is on the lower, block level.

But in the case of the SSD there is no disk head whose movements should be minimized. Thus, it won't be faster, not even a little bit.

Some OSes and tools forbid this only, because the decisions of their developer companies like to mix the meaning of ""you don't need"" and ""you can't"". But these are different things.

Probably there are multiple hacks which could avoid this ban (regedit, or exporting the drive as iscsi and re-importing to the same machine, etc). In this case, you will find a very fragmented drive, whose defrag will be very long. It is because the OS doesn't care about fragmentation on their case. And, as other answers also mention, this defrag won't make your system faster, but it will reduce its life."
Guest [Entry]

"It is not bad all the time. Manually running a full defragmentation is something you should not do, but if you have volume snapshots are enabled, windows 8/10 will defrag the SSD once per month:

This is by design and necessary due to slow volsnap copy on write
performance on fragmented SSD volumes. It’s also somewhat of a
misconception that fragmentation is not a problem on SSDs. If an SSD
gets too fragmented you can hit maximum file fragmentation (when the
metadata can’t represent any more file fragments) which will result in
errors when you try to write/extend a file. Furthermore, more file
fragments means more metadata to process while reading/writing a file,
which can lead to slower performance.

Conclusion

No, Windows is not foolishly or blindly running a defrag on your SSD
every night, and no, Windows defrag isn't shortening the life of your
SSD unnecessarily. Modern SSDs don't work the same way that we are
used to with traditional hard drives.

Yes, your SSD's file system sometimes needs a kind of defragmentation
and that's handled by Windows, monthly by default, when appropriate.
The intent is to maximize performance and a long life. If you disable
defragmentation completely, you are taking a risk that your filesystem
metadata could reach maximum fragmentation and get you potentially in
trouble."
Guest [Entry]

"According to Condusiv Technologies:

SSDs start out really fast and then quickly start to lose their speed and over time become subject to corruption. SSDs require that old data be erased before new data is written over it, rather than just writing over the old information like with hard drives. This doubles the wear and tear and can cause major issues.

The principle issue is write speed degradation due to free space fragmentation. Small free spaces scattered across the SSD cause the file system to write a file in fragmented pieces to those small available free spaces. By doing so, it degrades write performance by as much as 80% to the solid state drive.

SSDs can only write so many times to the drive as they have a finite number of writes that they can perform. Due to the doubling effect of needing to read and erase before it can write again, SSDs undergo twice as much use.

As the SSD approaches its limit, more fragmentation and write errors occur, causing SSD slows. Write performance decreases proportionately as free space fragmentation increases. All SSDs will suffer from this problem at one point or another unless HyperFast is used to optimize the solid state drive.

They therefore recommend using their product called Diskeeper.Accoding to the company:

Diskeeper with HyperFast keeps your system running as fast as when you purchased it, by optimizing the free space on your SSD. The HyperFast feature, included with Diskeeper 12 specifically solves these issues by intelligently eliminating performance–degrading free space fragmentation which can promote random rather than the more efficient sequential writes to occur. This technology along with the IntelliWrite Technology promotes the more efficient and beneficial sequential writes to occur rather than random writes.

More info about their product is available:

http://www.condusiv.com/products/diskeeper/"