How does Hard Disk Defragging improve performance?
When you defrag your hard disk you re-arrange the order in which the data is stored on the drive. The PC will arrange the data so that data that belongs together and needs to be read together is actually put in the same place on the drive. The obvious question here is why doesn't the PC store the data in the correct way in the first place? In an ideal situation (such as a blank hard disk) the PC would do these as a first option. However with the amount of data being deleted and wrote to the disk every second the PC is on it is no wonder that the data cannot be stored together.
Lets have a look at an example. Say you write 3 files to a disk all 10Mb in size the data would be all in a line each 10mb block after the other. This is how your PC would prefer to store the data for maximum performance. It stands to reason that this is how you would like it to be stored as well if you needed to search for the data. But now lets say that you decide to delete the middle file as its no longer any use to you. You now have a gap inbetween your files.
Lets say this time you write a file of 15mb in size. This file will be written in the first 10Mb of space and the remaining 5Mb added to the backend of the free space.As you can imagine with the millions of files being written to and deleted from the hard disk each day, not to mention the temporary files that windows uses on a frequent basis its not hard to imagine the state in which your hard disk can be in after months of use. After a defrag in this simple example your PC would re-arrange the hard disk to look as follows.
When files or indeed groups of files that belong together are stores next to each other the PC has a much easier time locating the data plus the hard disk heads don't have to travel to different parts of the disk to retrieve the data required. This of course speeds up the hard disks performance and so in turn increases overall system performance. There are of course levels of performance gains. It becomes more negligible as you move to faster hard disks with large memory buffers to compensate for file fragmentation however I would not ignore the problem of fragmentation, it doesn't take much effort to defrag your hard disk now and then