How to Run Disk Defrag

Printer Friendly Version

To open the graphical Disk Defragmenter console, use any of the following techniques:

  • From the All Programs menu, choose Accessories, System Tools, Disk Defragmenter.
  • From the My Computer window, right-click any drive icon and choose Properties from the shortcut menu. Then click the Tools tab and click Defragment Now.
  • This is for Windows XP but other Windows operating systems are similar but may not work as well and may have to be run in safe mode to be effective. Be sure to turn of your screen savers and set your power options to "Never".

    On a relatively new system with a speedy processor and plenty of physical memory, hard disk performance is the single biggest bottleneck in everyday operation. Even on a zippy hard disk, it takes time to load large data files into memory so you can workwith them. The problem is especially noticeable with databases, video clips, and CD images, which can easily consume hundreds of megabytes.

    On a freshly formatted disk, files load fairly quickly, but over time, performance can degrade because of disk fragmentation. To understand how this process works, it helps to understand the basic structure of a hard disk. The process of formatting a disk divides it into sectors, each of which contains space for 512 bytes of data. The file system combines groups of sectors into clusters, which are the smallest units of space available for holding a single file or part of a file.

    On a 10-GB NTFS drive, the cluster size is 4 KB. On a FAT32 drive of the same size, clusters are 8 KB. Thus, when you save a 20-MB movie clip on that drive, Windows divides the file into approximately 2,560 pieces (NTFS) or 1,280 pieces (FAT32).

    When you save this file for the first time on a freshly formatted hard disk, Windows writes it in contiguous clusters. Because all the clusters that hold individual pieces of the file are physically adjacent to one another, the mechanical components of the hard disk can work very efficiently, scooping up data in one smooth operation. As a bonus, the Windows disk cache is able to anticipate the need for data and fetch nearby clusters that are likely to contain other parts of the file, which can then be retrieved from the fast cache rather than from the relatively slow disk.

    Unfortunately, hard disks don’t stay neatly organized for long. When you add data to an existing file, the file system has to allocate more clusters for storage, typically in a different physical location on the disk. As you delete files, you create gaps in the once-tidy arrangement of contiguously stored files. As you save new files, especially large ones, the file system uses all these bits of free space, scattering them over the hard disk into many noncontiguous pieces. The resulting inefficiency in storage is called fragmentation; each time you open or save a file on a badly fragmented disk, disk performance suffers, sometimes dramatically, because the disk heads have to spend extra time moving from cluster to cluster before they can begin reading or writing data.

    The Disk Defragmenter utility improves performance by physically rearranging files so that they’re stored in contiguous clusters. In addition to consolidating files and folders, the utility also consolidates free space, making it less likely that new files will be fragmented when you save them. Windows XP includes a graphical utility that works as a snap-in with Microsoft Management Console. A command-line version of this utility (new in Windows XP) allows you to schedule defragmentation so that it occurs automatically, at regular intervals.
    <Back