Disk Defragmenter

Disk Defragmenter is a system utility for locating and consolidating fragmented files and folders on local volumes.

  • Before defragmenting files or folders, see Checklist: Defragmenting disks.
  • For a list of best practices for Disk Defragmenter, see Best practices.
  • For help with specific tasks, see How to.
  • For general background information, see Concepts.
  • For problem-solving instructions, see Troubleshooting.


Checklist: Defragmenting disks

Step | Reference
Review key concepts. | Disk Defragmenter overview; Best practices
Confirm that you are a member of the Administrators group. | Groups
Analyze the volume. | To analyze a volume
Defragment the volume. | To defragment a volume
View the report. | Viewing reports


Best practices

  • Analyzing before defragmenting
    Analyze volumes before defragmenting them. This will tell you if you need to take the time to defragment the volume.
  • Analyzing after large file deletion
    Volumes might become excessively fragmented when users delete a large number of files or folders, so be sure to analyze volumes after this happens. Generally, volumes on busy file servers should be defragmented more often than those on single-user workstations.
  • Defragmenting during low-usage periods
    Defragment file server volumes during low-volume usage periods to minimize the effect that the defragmentation process has on file server performance. The time that Disk Defragmenter takes to defragment a volume depends on several factors, including the size of the volume, the number of files on the volume, the number of fragmented files, and available system resources.


How to...

  • Analyze a volume
  • Defragment a volume


Analyze a volume

To analyze a volume

  1. Open Disk Defragmenter.
  2. Click the volume that you want to check for fragmented files and folders, and then click Analyze.

Notes

  • You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.
  • To open Disk Defragmenter, click Start, point to Programs, point to Accessories, point to System Tools, and then click Disk Defragmenter.
  • After the analysis is complete, a dialog box appears and tells you if you need to defragment the volume.
  • To interrupt or temporarily stop analyzing a volume, click Stop or Pause, respectively.
  • For more information about the files and folders that were analyzed, click View Report.
  • You can defragment local file system volumes only, and you can only execute one Disk Defragmenter console at a time.

Related Topics


Defragment a volume

To defragment a volume

  1. Open Disk Defragmenter.
  2. Click the volume that you want to defragment, and then click Defragment.

Notes

  • You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.
  • To open Disk Defragmenter, click Start, point to Programs, point to Accessories, point to System Tools, and then click Disk Defragmenter.
  • You should analyze volumes before defragmenting them. Without analyzing them first, you cannot tell whether you need to take the time to defragment volumes.
  • The time that Disk Defragmenter takes to defragment a volume depends on several factors, including the size of the volume, the number of files in the volume, the percentage of fragmentation in the volume, and available system resources.
  • To interrupt or temporarily stop defragmenting a volume, click Stop or Pause, respectively.
  • You can defragment local file system volumes only, and you can only execute one Disk Defragmenter console at a time.

Related Topics


Concepts

This section covers:

  • Disk Defragmenter overview
  • Understanding Disk Defragmenter
  • Using Disk Defragmenter
  • Resources


Disk Defragmenter overview

Disk Defragmenter locates fragmented files and folders on local volumes.

When a volume contains a lot of fragmented files and folders, Windows takes longer to gain access to them because it requires several additional disk drive reads to collect the various pieces. Creating new files and folders also takes longer because the free space available on the volume is scattered. Windows must then save new files and folders to various locations on the volume.

Disk Defragmenter moves the pieces of each file or folder to one location on the volume, so that each occupies a single, contiguous space on the disk drive. As a result, your system can gain access to your files and folders and save new ones more efficiently. By consolidating your files and folders, Disk Defragmenter also consolidates your free space, making it less likely that new files will be fragmented.

The process of finding and consolidating fragmented files and folders is called defragmentation. The amount of time that defragmentation takes depends on several factors, including the size of the volume, the number of files on the volume, the amount of fragmentation, and the available local system resources. You can find all of the fragmented files and folders before defragmenting them by analyzing the volume first. You can then see how many fragmented files and folders are saved on the volume and decide whether or not you would benefit from defragmenting the volume.

Disk Defragmenter can defragment volumes that are formatted with the file allocation table (FAT) file system, FAT32, and the NTFS file system.


Understanding Disk Defragmenter

This section covers:

  • Why volumes become fragmented
  • Why files are not moved to the beginning of NTFS-formatted volumes
  • Why the graphic and text views do not agree
  • Consolidating free space on a volume


Why volumes become fragmented

Volumes become fragmented as users create and delete files and folders, install new software, or download files from the Internet. Computers do not necessarily save an entire file or folder in a single space; they save them in the first available space on a volume. After a large portion of a volume has been used for file and folder storage, most of the new files are saved in pieces across the volume. When you delete files or folders, the empty spaces left behind fill in randomly as you store new ones.

The more fragmented the volume is, the slower the computer's file input/output performance will be.

Related Topics


Why files are not moved to the beginning of NTFS-formatted volumes

On NTFS-formatted volumes, Windows reserves a portion of the free space for a system file called the master file table (MFT). The MFT is where Windows keeps all the information necessary to retrieve files from the volume. Windows stores part of the MFT at the beginning of the volume. Because Windows reserves the MFT for exclusive use, Disk Defragmenter does not move files to the beginning of volumes.

Related Topics


Why the graphic and text views do not agree

After you analyze a volume, you can view the results of the process in a colored horizontal bar graph called the analysis display or in a text-based report called the analysis report. If you compare the results in the display with those of the report, you might find that they disagree somewhat. The cause of this disagreement is the relatively low resolution of the analysis display.

Because the analysis display is not large enough to depict each disk cluster in a volume as a vertical colored bar, each bar on the analysis display must represent a grouping of dozens or even hundreds of clusters, depending on the size of the volume and the cluster. And, because fragmented files, contiguous files, system files, and free space can all reside in the same group of clusters, the color of each vertical bar is determined by these rules in the following order:

  1. If any of the clusters in the group is part of a system file, the color is green (system file).
  2. If any of the clusters in the group is part of a fragmented file, the color is red (fragmented file).
  3. If the clusters in the group contain only free space and nonfragmented clusters, the majority wins (>50% free = white, >50% contiguous files = blue).

It is possible to have a solid red analysis display even if the analysis report shows less than 1 percent of the clusters belonging to fragmented files. Conversely, the analysis report could show 20 or 30 percent of the disk free while the analysis display shows no white space at all. This applies to the defragmentation display and the defragmentation report as well.

Use the analysis display only for a general idea of the fragmentation of a volume. For precise, numerical figures, use the analysis report.


Consolidating free space on a volume

Disk Defragmenter does not consolidate all of the free space on a volume. Although free space fragmented into hundreds of pieces does adversely affect performance, free space split into a few pieces does not. Having all of the free space consolidated in a single location provides very little performance benefit.

Windows system files such as the paging file and master file table (MFT) are opened for exclusive use by Windows at all times; therefore, Disk Defragmenter cannot gain access to these files to defragment them.

For information on how to defragment a volume, see To analyze a volume and To defragment a volume.

Several factors can prevent the free space on a disk partition from being defragmented:

  • A paging file is fragmented.
  • The disk partition contains a large number of directories.
  • On NTFS file system partitions, a portion of the free space on a disk partition is reserved by Windows for the MFT.


Using Disk Defragmenter

This section covers:

  • The Disk Defragmenter window
  • How often to defragment a volume
  • Viewing reports


Disk Defragmenter window

Disk Defragmenter is split into two main areas. The upper portion lists the volumes on the local computer. The lower portion displays a graphic representation of how fragmented the volume is. The colors of the display indicate the condition of the volume:

  • Red areas show fragmented files.
  • Blue areas show contiguous (nonfragmented) files.
  • White areas show free space on the volume.
  • Green areas show system files, which cannot be moved by Disk Defragmenter. These system files are not part of the Windows operating system but belong instead to the NTFS file system. The green areas appear only on NTFS-formatted volumes.

By comparing the Analysis Display band to the Defragmentation Display band, you can see the improvement in your volume after defragmenting it.

Related Topics


How often to defragment a volume

Because volumes can become highly fragmented when users delete a large number of files or folders from them, be sure to analyze volumes after this happens. Generally, volumes on busy file servers should be defragmented more often than those on single-user workstations.

You can analyze volumes before you decide whether to defragment them. After analyzing a volume, a dialog box tells you the percentage of fragmented files and folders on the volume and recommends a course of action. Analyze volumes regularly and defragment them only when Disk Defragmenter recommends it.

Related Topics


Viewing reports

After analyzing or defragmenting a volume, you can view a report of the process just completed.

When you view a report of the analysis process, the Analysis Report dialog box displays detailed information about the volume that was scanned for fragmented files and folders. This information includes the volume size and the amount of free space available, the number of fragmented files and folders (called directories in the report), and the average fragments per file. The dialog box also displays the path and name of the most fragmented files on the volume and the number of pieces, or fragments, those files are in. If these files are ones that you use frequently, the impact on your system performance might be greater than indicated in Average Fragments per File.

The average number of fragments per file is a good index of how fragmented the files on the volume are. The best figure attainable is 1.00, indicating that all files or nearly all files are contiguous. If the average is 1.10, then 10 percent of the files, on average, are in two pieces. 1.20 means 20 percent, 1.30 means 30 percent, and so on. An average of 2.00 means the files average two fragments each.

After the analysis is complete, Disk Defragmenter displays a dialog box that recommends whether or not to defragment the volume.


Resources

  • Executive Software International
  • Windows 2000 Server family at the Microsoft Windows (http://www.microsoft.com/).
  • Microsoft TechNet at the Microsoft TechNet (http://www.microsoft.com/).
  • Microsoft TechNet compact disks.
  • Microsoft support at Updated technical information.
  • Getting Started for Windows 2000 Server.
  • Windows 2000 Server Resource Kit.
  • Windows 2000 Server Registry.


Troubleshooting

  • Problem: Gaining access to resources has become slow.

    Cause: The volumes on your hard disk may have become excessively fragmented, possibly because you have recently deleted a large number of files or folders.

    Solution: Defragment the volumes on your hard disk. For more information, see How often to defragment a volume.

  • Problem: The display and report do not agree.

    Cause: The relatively low resolution of the analysis display.

    Solution: Use the analysis display only for a general idea of the fragmentation of a volume. Use the analysis report for precise, numerical figures. This phenomenon applies to the defragmentation display and the defragmentation report, as well. For more information, see Why the graphic and text views do not agree.

  • Problem: There appear to be system files on volumes other than the system and boot volumes.

    Cause: Master file tables (MFT) and paging files appear as system files in Disk Defragmenter.

    Solution: This is by design because MFTs and paging files cannot be moved and therefore cannot be defragmented. For more information, see Why files are not moved to the beginning of NTFS-formatted volumes.


Contact Executive Software

To contact Executive Software

  • Phone

    Inside the United States: (800) GET-DKNT

    From Europe: 44-1342-327477

    From Japan: 813-3447-7544

  • Internet

    Executive Software International Web site

    (http://www.microsoft.com/isapi/redir.dll?prd=Win2000&os=Win2000&ar=Partner&sba=execsoft)

  • E-mail

    sales@executive.com

    tech_support@executive.com