Site hosted by Angelfire.com: Build your free website today!
Chapter 33: Keeping Your Disk Safe

PreviousChapterContentsGlossaryNext

Defragmenting Your Disk

Windows stores information on your disks in sectors, which can be anywhere from 2 to 32 kilobytes (KB) in size. Files are stored in as many sectors as requires to fit (for example, a 64KB file would take two sectors on a disk with 32KB sectors). These sectors do not need to remain sequential: Windows keeps track of which sectors are used for which files, no matter where they are on the disk. Sectors for a single file can be located just about anywhere on the disk.

Fragmentation occurs when you add and remove files from your computer. When you delete a file, Windows marks the sectors as available, and uses them the next time you create a file. If a file gets larger and contiguous space isn't available, Windows uses other available sectors to store the new part of the file. As you continue to use your computer, your files can become more and more fragmented. When you save a new file, if no contiguous space is large enough, Windows writes the new file using sectors that aren't together--the file is fragmented right from the start.

Fragmentation slows down your disk access and, subsequently, your computing efficiency, because Windows has to spend more time finding the parts of each file. The more chunks a file is split into, the slower Windows accesses the file, because the file system has to move all over the disk to find pieces of the file.

Fortunately, Windows comes with a program that moves the contents of files around on your hard disk so that each file is stored as one contiguous string of sectors--Disk Defragmenter. Run the Disk Defragmenter utility when you plan on not using your computer for some time, because it can take an hour or so, and has to restart if you change any files.

In this day of ultra-cheap, gargantuan drives (80GB and beyond) with superfast access times (7,200 RPM standard and 10,000 RPM becoming more common), fragmentation doesn't affect speed nearly as much as it did on older hard disks. One reason is that newer disks read an entire track (concentric circle of information) at a time from the disk into the disk's buffer memory, so it matters less if the sectors of the track contain information in the wrong order.

note Even though Disk Defragmenter moves data about on your drive, no files or folders appear to move. How you organize your files and such are really an illusion anyway. Which folder you put your copy of the next Great American Novel has nothing to do with where it's stored in the disk itself.

Running Disk Defragmenter

Follow these steps to run Disk Defragmenter.

  1. Choose Start | All Programs | Accessories | System Tools | Disk Defragmenter, or right-click the disk drive in an Explorer window and choose Properties. On the Properties dialog box for the disk, click the Tools tab and click the Defragment Now button. You see the Disk Defragmenter window, shown here:

[image]
  1. Choose the drive you want to defragment by right-clicking the drive from the list that appears. (They're listed by the partition's location on the drive and not by drive letter.) The list of drives includes physical drives (actual disk drives or partitions of drives) and removable drives. The list does not include networked drives on other systems.
  2. Click Analyze. Disk Defragmenter starts to work and displays the results of its analysis, shown here:

[image]
  1. The colored bar in the Estimated Disk Usage Before Defragmentation box shows the usage of the sectors on the disk. The meanings of the colors are shown at the bottom of the window. If the analysis reveals that the volume should be defragmented, the same dialog box offers to start the process. Click the Defragment button if it appears: if it doesn't, your disk doesn't need defragmentation.
  2. When Disk Defragmenter is done, a message asks whether you want to exit the program; click Yes.

Tips for Defragmenting

When Disk Defragmenter is running, you see two disk maps, the upper one the analysis of your hard disk, and the lower one an estimate of what it will look like following the defragmentation, as shown in Figure 33-1.
[figure]
Figure 33-1: Disk Defragmenter's map of the sectors on your disk

PreviousChapterContentsGlossaryNext