What exactly does defragmenting a Windows PC’s hard drive do, and how is it beneficial to the system?

1.92K views

And do Mac systems do this automatically?

EDIT: and does this apply to SSD’s?

In: Technology

3 Answers

Anonymous 0 Comments

When you first load data on to your hard drive, it just loads the files on one after another. Easy.

Over time you will delete these files and replace them, but the file sizes will not necessarily match. So the gap left behind by a deleted file may only fit half of the next file you want to save, meaning that file will get split into two – the first part filling up the first gap (left behind by the smaller deleted file), and then the next section saved into the next empty section on the drive.

As you continue to use the drive, the files will slowly become more fragmented as the clearing and refilling process repeatedly goes through the hard drive, jamming new files into the spaces left behind.

What this all means is that at first reading a file is easy – the computer looks up the location of the file, reads off the data, and that is that.
After a while though, to read a file the computer has to look up the location of the first chunk of data, read it, look up the second chunk, read it, look up the third chunk… Then add them all back together to actually use the file. This means there is more processing needed, more time spent searching for the data, and more wear on the components – this is especially noticeable with older mechanical hard drives, which use a small needle that has to sweep back and forth over a platter – each movement taking a tiny fraction of a second, but adding up…

Defragmenting a drive is a way to fix this – your computer just sorts through the hard drive sorting everything back into order – so it will collect together all of the bits of a file spread over the whole drive, and de-fragment them by putting them all together.
After the drive has been defragmented all of the files will be organised so that each individual file is now in one piece rather than name, and all are nearly arranged one after another – until you start adding and removing more files of course, which will slowly start to fragment your files once again.

My understanding is that older systems (windows particularly) were pretty basic and did no sorting whatsoever until you specifically ran the defragmentation program. Modern systems include more sorting on the fly – so rather than blindly fragmenting all the files as they are saved, it will resort and move some of the existing saved data to keep new files whole and prevent the need to fragment them.

You are viewing 1 out of 3 answers, click here to view all answers.