What Causes Fragmentation
As you use your computer fragmentation happens overtime, this is caused from adding and deleting files. What happens is when you delete a file the file isn’t actually delete it is just marked as ok to write over, so the next time windows needs to write a new file it just looks for the first available spot that is ok to write to and adds it there.
Some files are bigger than others and if the new file is bigger than that location, than part is written to that one and the other part to the next available location, if you were to delete that new file then the next file written might only take half that space and so and so forth. Eventually your left with many files broken up into multiple locations all over the hard drive. The hard drive is a mechanical device with spinning disks, which means if the file you need is split into 5 different locations, then the needle must wait for the disk to spin to the area it needs to read that chunk of the file, forcing it take longer than if the file was all in one location.
How Defragging Fixes It
When the drive is being defragged the computer is moving the different parts and regrouping them in one location. The longer it has been since you last defragged the computer, the longer it will take to move the jumbled parts. The second thing the defrag processes worries about is where on the disk the files are being moved to.
What is Physically Happening with the Hard Drive
A quick lesson in physics will show you that if you want on the outer edge of the disk you will be moving faster than if you stand on the inner edge, this is because the outer edge is longer and has to travel farther to make a full rotation. This means that data that is near the outer rim can be accessed faster and thus the more often the file is accessed the higher priority it would have to be located on the outer edge.
Flash Drives and SSD’s
If you have a flash drive or a SSD (Solid State Drive) then you might be wondering if you should defrag them along with your hard drive. The answer is no, never. Both Flash Drives and SSDs can access any file from any location at the same speed, so moving them together won’t make loading the file any faster, but the act of moving the file from one spot to another will lower the life of them. Both devices have life spans that aren’t measured in years, but rather the amount of writes, you can only write to a drive X amount of times before it wears out, so if you move the files then you are using up some the life of the device without adding any benefit to speed.