Wednesday, November 11, 2009

Disk Defragmentation

In the context of administering computer systems, defragmentation is a process that reduces the amount of fragmentation in file systems.

It does this by physically reorganizing the contents of the disk to store the pieces of each file close together and contiguously.

It also attempts to create larger regions of free space using compaction to impede the return of fragmentation.


Fragmentation occurs when the operating system cannot or will not allocate enough contiguous space to store a complete file as a unit, but instead puts parts of it in gaps between other files (usually those gaps exist because they formerly held a file that the operating system has subsequently deleted or because the operating system allocated excess space for the file in the first place).

Larger files and greater numbers of files also contribute to fragmentation and consequent performance loss.

Defragmentation attempts to alleviate these problems.

In the successor to Windows XP, Windows Vista, Microsoft have introduced the capacity to automatically "defragment" the hard drive in the background.

Unfortunately you have to do this manually in Windows XP!

The key points to remember are that:

When a file is fragmented, it takes longer for the computer to read it because it has to skip to different sections of the hard disk.

Paging and Registry file fragmentation can be one of the leading causes of performance degradation related to file fragmentation in a system. 

The techniques used by the Disk Defragmenter are as follows:


Moving all the index or directory information to one spot. Moving this spot into the center of the data, i.e. one third of the way in, so that average head travel to data is halved compared to having directory information at the front.


  •  Moving infrequently used files further from the directory area.
  • Obeying a user provided table of file descriptions to emphasize or ignore.
  •  Making files contiguous so that they can be read without unnecessary seeking. 

The Windows XP Disk Defragmenter Tool

1) Open My Computer, right-click Local Disk, and then click Properties.

2) On the Tools tab, click Defragment Now. The Disk Defragmenter opens.

3) Click your first hard disk (normally C:), and then click Defragment. As shown in Figure 1, Disk Defragmenter will work for at least several minutes, though it may take several hours.

4) If you have more than one hard disk, repeat this process for each hard disk listed starting at Step 3.



Windows XP Disk Defragmenter Limitations:

Disk Defragmenter in Windows XP has the following MAJOR limitations:

# It does NOT defragment files residing in the Recycle Bin

# It also cannot defragment "in-use" files

# Does not defrag and clean the registry


Defrag Your Boot Files:

File fragmentation can happen at start-up too. A real power tip (not for beginners) is to have Windows XP automatically defragment these files, but you will have to make sure your Windows XP registry has the correct setting.

Open your Registry Editor and go to key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Look for a VALUE in the right hand pane called BootOptimizeFunction

...if it does NOT exist, choose from the menu Edit > New > String Value and create it.

Make sure that it has the entry Y

1 comment:

  1. All defrag requirements are met by the latest Diskeeper like no other defragger. Its fully automatic, defrags system files, handles fragmentation under low free space. So far the best defragger.

    ReplyDelete