Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Can't defrag totally

Nov 25, 2004 12:31AM PST

When I run Defrag, I still have 4% total and 9% deframented files. I have always defragged 100%. What am I doing wrong? I have run "Error Checking" but still get the same results. I have a Dell 8250, 3.06,
120 gb Hd, 512 Ram, Win XP. I can certainly live with this, but if there is a fix, I would like to remedy. Thanks, Bob

Discussion is locked

- Collapse -
Re: Can't defrag totally = true.
Nov 25, 2004 12:37AM PST

You may have to get something like Diskeeper but even that is not assured. Nothing is wrong but the expectation.

To get some machines to defrag, you need about 50% of the disk free. And even then some files can't move with the supplied defragmenter.

Again, not busted, not broken, just expectations to be dashed.

Bob

- Collapse -
Re: Can't defrag totally
Nov 25, 2004 9:49PM PST

Thanks Bob--By the way, you have helped me before and I notice, countless many others--Thanks from all of us,Bob from Albuquerque.

- Collapse -
Re: Can't defrag totally
Nov 26, 2004 12:21AM PST
When I run Defrag, I still have 4% total and 9% deframented files. I have always defragged 100%.

How do you know this 4-9%?

1. Windows XP Pro offers two choices for defragmenting volumes: the Disk Defragmenter snap-in and a new command-line tool called Defrag.exe. Both tools can defragment NTFS volumes that use any cluster size and files smaller than 16 clusters. Both tools can also defragment the MFT on NTFS volumes. Disk Defragmenter consolidates fragmented files and folders on a hard drive so that each occupies a single, contiguous space on the volume. As a result, a system can gain access to files and folders and save new ones more efficiently. When consolidated, Disk Defragmenter can also consolidates the volume's free space making it less likely that added new files are immediately fragmented. By using the "Disk Defragmenter snap-in" (click to see an example screenshot) (Start, Run, type dfrg.msc, and then press Enter), analyze the volume before defragmenting to see how many fragmented files and folders exist. If 10 percent or more of the files and folders are fragmented, Disk Defragmenter is recommend. By comparing the Estimated disk usage before defragmentation band to the Estimated disk usage after defragmentation band, you can see the improvements. The defragmentation report provides further details on the fragmentation state of the volume.

? Red areas show fragmented files.
? Blue areas show contiguous (unfragmented) files.
? White areas show free space on the volume. White areas on an NTFS volume might also represent the MFT zone. For more information about the MFT zone, see "File Systems" in this book.
? Green areas show files that cannot be moved. The green areas usually represent the paging file, but on NTFS volumes, green areas might also represent space used by the NTFS change journal and the NTFS log file.

2. WinXP monitors files used when the computer starts and when an application is started that is called "Prefetch", a process whereby:

a. data that is expected to be requested is read ahead into the cache and decreases the time needed for process.

b. files prefetched are located next to each other on the outer edge of the disk.

c. optimization occurs in the background and lasts only a minute or two, and after the initial optimization takes place, subsequent optimization occurs, at most, every three days when you might notice the hard disk being accessed when optimization occurs.

Note: To call a ProcessIdleTasks, the syntax is as follows. The work is done in the background asynchronously where the API is synchronous, so it wont return until the idle tasks have completed . It can take 10 to 15 minutes for idle tasks to complete. Task Manager will report processes running, and the disk will likely be active, "Benchmarking on Windows XP".

d. Click Start,Run, type rundll32 advapi32,ProcessIdleTasks (exactly as shown), and then press Enter.

Note: Please read through the paragraph titled "Prefetch" in the TechNet Library. (After accessing this Web page -- opens in a separate window, click Edit, Find, type prefetch, and then press Enter). Also read through, "Kernel Enhancements for Windows XP."

3. The article [Q314848] describes how to defragment your disk drive volumes, describes the limitations of using Disk Defragmenter Microsoft Management Console (MMC) which is based on the full retail version of Executive Software Diskeeper, and outlines three methods of defragmenting. The version included provides limited functionality in maintaining disk performance by defragmenting volumes that use the FAT, FAT32, or NTFS file system, and has the following limitations:

? It can defragment only local volumes.
? It can defragment only one volume at a time.
? It cannot defragment one volume while it is scanning another.
? It cannot be scheduled. If you need to schedule disk defragmentation, use the Defrag.exe command line tool.
? It can run only one MMC snap-in at a time.

4. Hints for best results before using defragmenter:

? Delete any unnecessary files, such as temporary files using Disk Cleanup, [Q310312].

Note: The Disk Cleanup (Cleanmgr.exe) tool includes one confusing option that can leave an inordinate amount of wasted space on you hard drive. When run, one of the available options offers to delete Temporary files. Unfortunately, this option may display a value of zero even if your Temporary folder contains hundreds of useless files since this value lists only file in that folder with a date more than one week old. Therefore, if files still exists after using the tool, you may at your convenience delete any and all files unnecessary.

? Defragment a volume before adding a large number of files, such as before installing programs. This ensures that the files occupy contiguous space and do not become fragmented.

? Defragment a volume after deleting a large number of files.

? Defragment a volume after installing programs.

? Defragment volumes during periods of low system activity.

5. Although MSCONFIG is a priceless troubleshooting tool, it's lacking a few features and one or more of the following three applications is suggested:

a. The "Fee" based "Startup Cop", PC Magazine's utility, version 1.01, provides a pretty comprehensive path to where items reside.

b. Written by Mike Lin, the utility "Startup Control Panel" is well worth investigating.

c. "Starter" is yet another free startup manager that allows you to view and manage all the programs that are starting automatically whenever Windows boots. It lists all the hidden registry entries, as well as the common Startup Folder items. You can choose to safely disable selected entries, edit them or delete them altogether (if you know what you're doing). Expert users can even add their own entries.

6. After defragmenting a volume and the defragmentation report is viewed, the results may includes a list of files that remained fragmented (having two or more fragments). Some reasons include, [TechNet article, "Files That You Cannot Defragment"]:

a. The volume lacks adequate contiguous free space to defragment all files. Disk Defragmenter requires at least 15 percent free disk space to completely defragment a volume.

b. During defragmentation, a new file is created on the volume in disk space that was previously free space. In this case, if Disk Defragmenter tries to move a file to that space to defragment the file, the move fails and the file remains fragmented.

c. The file is the master file table (MFT) on an NTFS volume. Because the first fragment of the MFT cannot be moved, the MFT is typically contained within two fragments when sufficient space is available on the volume. If the MFT is contained within three or more fragments, Disk Defragmenter looks for free space where the MFT might fit. If sufficient free space exists, the MFT is moved as a whole (minus the first fragment). If space is not available, the MFT is not defragmented.

d. The file is permanently excluded, in which case it might appear in the defragmentation report as still being fragmented no matter how many times you defragment the volume. The following files are permanently excluded from being defragmented.

Bootsect.dos
Safeboot.fs
Safeboot.csv
Safeboot.rsv
Hiberfil.sys
Memory.dmp
Paging file


7. Supplemental reading:

a. "How to Provide Event Logging for the Disk Defragmenter Utility with Windows Script Host (Q294743)."

b. "Description of the New Command Line Defrag.exe Included with Windows XP (Q283080)."

c. "HOW TO: Analyze and Defragment a Windows XP Disk (Q305781)."

d. "Drive's Contents Have Changed: Restarting" Message When You Use Disk Defragmenter (Q310541)."

e. "DMA Mode for ATA/ATAPI Devices in Windows XP."