PC-Hardware

Why not defragment an SSD?

Classical hard disks (Hard Disk Drives) have the problem that their performance decreases over time if they are not optimized regularly. This is due to the way HDDs are built and how their data is stored and located. With SSDs (Solid State Drives), this problem does not seem to exist, and time and again you hear that you should not defragment SSDs for this reason. But why exactly? And what happens if you do it after all?

Defragment – what for anyway?

For a better understanding, let’s take another look at what the defragmentation process is actually supposed to do. Here is a small excursion into the world of classic hard disks and their signs of wear and tear: With HDDs, data is stored on electromagnetic turntables – in blocks and, as standard, one after the other. To read the data, the read head travels over the turntable and “searches” for the corresponding location where the desired data block is located. With a new hard disk, this runs completely smoothly because the data is stored neatly one after the other. However, it becomes interesting when the deletion of individual files causes various gaps in the block structure. These gaps are then filled with new data, but are sometimes too small to store a complete data block in one piece. In this case the file is split into several blocks; fragments are created.

Fragments are a rather cumbersome matter for the hard disk read head, because instead of reading the file in a single pass, it has to jump back and forth for it – and that takes time. The more fragmented such a file system becomes, the slower the hard disk works. The remedy in this case is the so-called defragmentation. It completely rearranges the file system and – as its name suggests – resolves the existing fragments. At the end of the process, the data is available again in one piece, thus increasing the reading speed of the hard disk.

SSDs also store their data in blocks. The difference, however, is that they do not have magnetic disks or moving read heads, but are based on flash memory. Why this is so important for the initial question is explained in the next section.

Design and function of SSDs and HDDs: SSDs use flash memory chips (slanted at the bottom), HDDs use electromechanical components (hard disks slanted at the top)

No advantages for SSDs – on the contrary

With SSDs, the data is stored on a flash memory (as with SD cards or USB memories). Writing and reading here is not done via a read head, but via a controller that can address the data blocks directly. Whether these are distributed or in one piece is not important at first, because the memory cells are always called up at the same speed – after all, there are no mechanical processes that could delay this process. As a result, defragmentation is completely superfluous in SSDs because the actual problem – the loss of speed – does not exist.

And what if you defragment them after all? Can SSDs be optimized at all? Basically, the option to defragment a solid state drive is not even offered with newer operating systems. Because as we now know: It is completely pointless and brings no advantage. On the contrary, defragmenting could even be detrimental to the life of an SSD because it interferes with the controller’s operations.

Wear Levelling – SSDs “optimize themselves”

In order to ensure the longest possible service life of the SSD cells, the storage processes must be distributed tactically. For this purpose, controllers work with a so-called wear levelling algorithm. This enables the controller to write to all memory cells with the same frequency, i.e. to distribute the data evenly over the entire surface of the disk. If one were to intervene in this process with a defragmentation, this could reduce the longevity of the SSD cells. Therefore, once again the appeal: Do not defragment SSDs!

Optimize SSDs under Windows

The Windows operating system offers the possibility of optimizing SSDs at regular intervals – usually weekly – but this has nothing to do with defragmentation. This option can be found under “Defragment and optimize drives” in the Windows management programs.

In Windows, SSDs are automatically optimized.

The window displays all internal hard disks (HDDs and SSDs) and their analysis or device status. With a click on the installed SSD the button “Optimize” appears (see picture). In this case the system checks some optimization operations, for example the settings of the TRIM command (it marks deleted data blocks so that the controller can rewrite them). Normally Windows takes care of optimizing the SSD drives on its own, so there is nothing else to do (and should not do).

In summary: SSDs must not and should not be defragmented, because their write operations are already optimized. So if you want to use them for as long as possible, you can sit back and relax.

What do you think of the topic? Click here for the comments!

Simon Lüthje

I am co-founder of this blog and am very interested in everything that has to do with technology, but I also like to play games. I was born in Hamburg, but now I live in Berlin.

Related Articles

Back to top button