On Fri, 5 Aug 2005 04:25:07 -0700, "madalrak"
Just what good does it do
Defragmentation is a "duty now for the future" task, somewhat like
building indexes for faster searches. It attempts to speed up loading
of files, particularly frequently-used files are parts of files.
When a file is created on an empty disk, it has metadata that
describes what the file is, and the data within the file. The data
within the file is created in a single contiguous chain of data
clusters. So already, there is a factor of how long it takes to mode
the drive heads from the metadata to the "real" data.
When a disk volume has been used a while, there will be gaps in the
data space where deleted files used to be. Slowly-gowing files may
start in one part of the volume, but by the time they "grow", other
files may have been saved after them - so to read the file, you may
have to not only mode the drive's heads from metadata to data, but
also from one (oldest) fragment of data to the next (newer), etc.
Defragmentation used to be purely about moving this stuff around so
that all the data clusters of a file's contents would follow one after
the other in a single fragment. All existing files would mbe moved
into one solid mass of data, so as to be close to their metadata,
while all free space would be moved to the "end" of the volume.
But the purpose of defragging isn't really to defrag files and free
space, as I've described - it's to speed up file access, especially to
frequently-used files. Some code files are large, but only have some
parts used frequently, so if we knew which parts, we could selectively
move those closer to the metadata even if this made the entire file
more fragmented. This logic started to be applied in Win98.
While the system is being used, a background service is watching to
see which files, and parts of code files, are being used most often.
In Win98/ME, this info was held in the AppLog folder, but in XP it
takes the form of .PF files in the PreFetch folder.
When you do a defrag, this information is consulted and used to guide
the defragging process on what (parts of) files to put where.
...and how do I know when to run it ?
Firstly, because Defrag potentially reads every file into memory and
writes it somewhere else on the HD, I would never do a Defrag if there
were any doubts about system stability or hardware integrity. It's
like a strenuous workout; makes healthy systems fitter, but can be
fatal to the frail and ill.
Secondly to the above caveat, I'd defrag whenever my volume's contents
have materially changed, or are about to materially change. If I've
just cleared a lot of space (uninstalled some huge app, purged and
curbed a monstrously large web cache, etc.) then defragging is good to
consolodate the free space, etc.
By the same token it may be good to defrag before installing some huge
program, or enlarging the pagefile.
Particularly important times to defrag are after recovering from a
low-free-space condition that has forced new files to be created
within the spaces between other files, instead of in the large
unbroken free space at the end of the volume, and after any sort of
file system or cluster size conversion (volume resizing or conversion
to NTFS). These defrags can be expected to take a while.
Windows XP if I click on start/all programs/accessories/system tools and then
disk defragmenter, the window says I have 74.5 GB capacity with 59.81GB free
space and 80% free space then I can either/or analyze and defragment Also
underneath there are coloured boxes for fragmented files , coniguous files
and unmoveable files ..what are these ?
The legend says what they are. The large red chunk in an NTFS volume
is most likely NTFS metadata as held in the MFT; it's usually
fragmented, and can't be defragged. The large green chunk is usually
the pagefile, which can't be defragged either.
------------ ----- ---- --- -- - - - -
The most accurate diagnostic instrument
in medicine is the Retrospectoscope