solid state drives don’t suffer a large performance penalty when a large set of data is stored in various physical locations of the medium: just about any cell required the same amount of time to read.
running a traditional defragmentation cycle writes a lot of data to the drive. this is further compounded by the issue that the “erase” operation is far less granular than the write operation (to change a small amount of data, a larger amount first must be erased). this puts a lot of wear on the media for no benefit. [the Wikipedia article on write application goes into a lot of detail about why this is problematic](https://en.m.wikipedia.org/wiki/Write_amplification)
Think of it like you’re putting your clothes away.
Old HDD’s are like a dresser with several drawers. You’d likely have a socks drawer, an underwear drawer, shirts drawer, pants drawer, etc. When a disk is fragmented, it’s like having socks in with your shirts, and pants stuffed in with the underwear. Defragging an old HDD would be like organizing the dresser so everything is in the drawer it should be in. That way, when you’re looking for a sock, you’re not looking for it in the shirts drawer.
SSD’s are more like a walk-in closet. Where sure, you *probably would* organize it so you have shirts, pants, socks, underwear, in certain spots, but it’s still all in the same closet. Defragging an SSD doesn’t “help” the same way as defragging an HDD.
;;
With old HDD’s, instead of it being clothes in a drawer, it’s deciding where to put chunks of data.
Like lets say you have a hard drive with a total of 8 blocks of space, A, B, C, D, E, F, G, and H. You’re already using A, C, D, F, and H. This means any time the HDD would try to read some file that has some parts in A and C block, then it has to skip each time between A and C, bypassing B, each time.
If you wanted to save a new file that takes up the remaining 3 blocks of data, it’ll skip A cuz there’s no space for it there, it’ll write some of it to B, some more of it to E, and the last of it to G. Again, there’s some extra spinning and moving the reader head around to write that; and more spinning/moving the head around to read it later.
What defragging would do, is rearrange the data on the disk, to that before that new file, you’d have A, B, C, D, E – that one file that is split between A and C blocks would be arranged into only 1 of those blocks. When you’d save the new file, it’d take up the last 3 blocks, F, G, and H.
Overall this would minimize how much wear and tear happens to the disk drive – the spindle/motor that spins the disk, the reader-head that does the read & write operations, and also improve performance overall, when reading & loading files from that disk to RAM (or writing big files to disk too).
;;
With SSD’s, it’s still like the walk-in closet; it still has the same “idea” of blocks of data, but it’s a walk-in closet. There’s no moving parts to cause issue with performance, like there are with a traditional HDD. When you walk into a walk-in closet, you can pretty easily just look around, find what you’re looking for, and get out.
What makes defragging an SSD “bad”, is that *most* SSD’s have somewhat of a limit on how many read/write operations they are rated for. Now this might itself be a measurement in the hundreds-of-millions-of-operations, but it’s still a relatively finite amount of read/writes, before they’ll start having issues. When you do a disk defrag, that’ll send a ton of read/writes through that, ultimately, won’t have any significant or noticeable impact on the performance of the drive.
You could think of this like asking a mother-in-law to come reorganize your walk-in closet – which might be more “tidy”, but wouldn’t change how you still just walk in, find what you want, and walk out. You might then ask the question of, if the MIL didn’t “improve” how you use the walk in closet, then why ask her to do it?
Defragging is to move pieces of files around to be one continuous file in the file system. On a normal hard drive this means faster read times as the physical head has to move less to read all the parts of a file as they are next to each other on the physical disk. SSD’s have a lifetime amount of reads/writes they can do. However SSD’s do not get any improvement from defragging. All the defragging does is move the files in the file system using up the life of the drive for no real benefit.
Although you shouldn’t defrag your SSD, you do want to keep it running optimally and one way is to ensure you have TRIM enabled in the operating system, so that the OS tells the drive which blocks are no longer in use, allowing the SSD to “recycle” them. This allows the flash memory manager to use wear levelling more effectively.
Latest Answers