As a computer user, one is often encouraged to defragment a disk. Some programs suggest that improvement will be dramatic, and that performance is being seriously damaged by not defragmenting a disk. The fact that Microsoft does supply a defrag routine as part of it operating system does suggest that it is a useful tool to use.
When an operating system writes a file, it tries to write a single continuous stream. If all disk drives had an infinite capacity, this would be a good solution. As disks have limited capacity, and tend to fill up, there will not always be a space large enough to write a file as a continuous stream, and so the operating system will split, or fragment the file. The user will not see any difference, but ultimately, long file will take longer to load, and the system can slow down. Depending on use, it is therefore worth doing periodic defrags on the hard drive.
Defrag and data recovery
With any data recovery, it is often much simpler to recover a sequential file rather than a fragmented file. On this basis, it is worth running a defrag program to keep the disk fairly clean. When the program runs, it does move the data from one section of the disk to another, making use of free space, and creating longer streams of free space. Space that has been freed by deleting files, will therefore be re-used. If it is necessary to recover deleted files (and this does not count ones in the recycle bin) and a defrag has been run, the chance of recovery is very limited. If a drive in failing, then running defrag could be very dangerous.
The recommended procedure should always be to run a disk backup, and then defrag the disk. With regular backups, it should not be necessary to have to recover long deleted files. Any deleted file recovery should always be done immediately, ensuring the disk is not used for anything else.