JSI Tip 3391. The Windows 2000 Disk Defragmenter analysis shows more fragments than are possible for the file sizes?


The built in Disk Defragmenter analysis, on an NTFS volume, may show more fragments than could possibly exist for the indicated file sizes. Example:

   Fragments  File Size  Files that did not defragment
   --------------------------------------------------------------------
   14         1 KB       \WINNT\system32\config\software.LOG
   8          1 KB       \WINNT\system32\config\default.LOG
   11         1 KB       \Documents and Settings\joeuser\ntuser.dat.LOG
The default NTFS cluster size can be as low as 512 bytes or as large as 4096 bytes, depending on the formatted volume size. The minimum file allocation is one cluster. When you open a file for write access, NTFS tries to preallocate additional space, in multiples of cluster size, to help prevent fragmentation as the file grows.

If you use Windows Explorer to look at the file properties of one of these files, it may look like:

Size: 1.00KB (1,024 bytes)
Size on Disk: 4.00KB (4,096 bytes)
This file, which is open for write access, has additional clusters preallocated. The 'joeuser' log won't be closed, freeing the additional allocation, until 'joeuser' logs off. The other log files won't be closed until you shutdown.

The Windows 2000 defragmentation API will not allow the extra space to be moved and consolidated while the file is open. When you restart the computer, NTFS allocated clusters that are near the current end-of-file.

NOTE: It may be better to have multiple fragments within the same cylinder than to have only one additional fragment that requires a long seek.

NOTE: Diskeeper has a Boot Time defragmentation option.


Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.