by mgaunard · 4y ago · 0 comments
It's mostly a filesystem problem, not a hardware problem.
The reason it was a problem on spinning disks, was that the delay in getting the next bit of data highly depended on where it was relative to the previous bit. With SSDs (as I understand it) looking up any bit of data is (just about?) independent of where it is located.
So, it's still a thing - but the cure (involving lots of wear) is a lot worse than the disease now.
If the file is fragmented, this may require more reads than if it's contiguous and uses an extent.
Exact scheme is filesystem-specific.
So the problem getting orders of magnitude smaller while the costs of the cure increasing a lot swung the equation away from defragging being a good thing overall.
It takes time for the read arms to move back and forth to literally read the data on the sector indicated by the master record file, and defragmenting the drive helped minimize that by moving the files around to be a linearly arranged as physically possible given the sophistication of the given system.
SSDs also have a similar master record file, indicating where all of the bits of the files are located on the flash memory in the hard drive, but since it makes at most the most atomically minute difference in seek times for the controller to read the data from those sectors (since there is no seek arm that has to physically move to the physical location nor any delay waiting for the spin of the disk to reach the correct location for the data read to begin) then file "fragmentation" has the most negligibly minuscule impact on file read speeds or drive performance, and given the dramatic increase in destructive writes that a file defragmentation would cause on an SSD, it should be avoided under any regular usage.
People use the same filesystems on HDD and SSD drives.
Fragmented files still require more blocks to say where the various parts are.
Yes, this is exactly what I said.
People use the same filesystems on HDD and SSD drives.
Yes, of course, but I'm not talking about filesystems but the reasoning behind why fragmentation matters on Hard Drives and not SSDs.
Fragmented files still require more blocks to say where the various parts are.
I don't have a comparison file to review, but in all measurable and tangible matters, this point is moot as it does not impact SSD performance, only Hard Disk performance is affected by fragmentation.
But a random block may take many many times that as it repositions the head and waits for the block to come spinning by.
And an SSD returns any block almost at the same speed, so defragmenting only increases the amount of wear on the drive (and it internally remaps anyway so you don’t even get what you’re after - block 5 is a logical block that may be currently mapped to 466 not next to block 6).