The defragger in Win98 (actually an import from WinME), dont leave any
gaps in the data after it completes. But the one in XP leaves all kinds
of gaps. I've run it 6 times in a row.... Why cant it get all the data
put to the front of the drive?
One other thing, the XP defrag is a lot slower than the one from WinME?
It reminds me of the old one from Win3.1..... Slowwwwwwwww.......
I like the look of the one in Win98 better too, because you can see it
working, but that's not real important....
There are two properties, defragmenting and optimizing.
Defragmenting, takes a file and locates all the clusters
so they are contiguous. This helps reduce the time to read
the file later. If the file is fragmented, more head movement
on the disk drive, is required to find all the pieces.
Optimizing, is the moving or sorting of files in a particular way.
"Slam to the left", is a popular optimization strategy for
partitions, reducing the average size of head movements as
long as the partition is only partially full.
And example of a "pure defragmenter" is Sysinternals "contig.exe".
It attempts to place all the pieces of a file next to one
another, but it doesn't care what part of the partition
gets the file. The file could end up over on the right.
The contig.exe does no optimization at all, and that's why it
is the purest defragmenter. Most other tools you've used,
will include optimization (even if it's relatively pitiful).
The WinXP defragmenter, has two kinds of optimization. It may rearrange
things like ".pf" prefetch files, when the system defragmenter is used.
And, it also throws the files to the left. For files which are
"movable".
The WinXP one has a display. The top bar shows the "before", and the bottom
bar shows the "after". And one of the colors identifies "unmovable"
content. The unmovable things might be metafiles, or things
the OS is currently using (pagefile.sys).
http://i59.tinypic.com/2rqyr1s.gif
Windows has an API for data movement, used by the defragmenters.
It was initially added to the OS, after Microsoft worked with one
of the defragmenter companies. The data movement is noteworthy,
in that only tiny movements are supported, like reading and writing
of 4KB and 64KB chunks. This is one of the reasons defragmentation
can be slow, because inefficient commands are given to the hard drive.
The result is data transfer rates in the 1 MB/sec to 3 MB/sec range.
The purpose of doing the small movements, is to make defragmentation
"power safe". If the power goes off, the idea is, the partition survives.
Even though data is in transit. If really large data movements were
attempted, that property might no longer be true.
*******
Tools:
JKDefrag, is a free defragmenter, with various optimization policies.
It uses an exotic policy, of keeping "large" files in a group
on the right hand side of the partition. It also has command line
options, to "slam to the left", where it doesn't worry about
file fragmentation while doing so. This is convenient if you're
in a hurry to do a partition shrink, and don't care what the
resulting (small) partition looks like. That's useful for
data partitions you don't plan on growing, where the files will
be left to stagnate on the partition.
Raxco PerfectDisk is a commercial application. A trial is available.
Raxco can move more metadata files, than the Windows defragmenters
would agree to. And it does that stuff, without a reboot or anything.
It's pretty amazing.
Partition Manager applications, they "slam to the left" as well, but
I doubt they spend any time "making the data pretty". So a Partition
Manager can move stuff, but the level of fragmentation could
actually increase while it is doing it. That's because when you
buy a Partition Manager, its sole job is just to resize partitions
as quickly as possible. No display is offered, to show the level
of fragmentation.
http://en.wikipedia.org/wiki/Ntfs
"Resizing
Starting with Windows Vista, Microsoft added the built-in ability
to shrink or expand a partition, but this capability is limited
because it will not relocate page file fragments or files that
have been marked as unmovable. So shrinking will often require
relocating or disabling any page file, the index of Windows Search,
and any Shadow Copy used by System Restore. Various third-party
tools are capable of resizing NTFS partitions."
*******
If you're a "neat freak", you can spend time moving the Windows
Search index, flushing all the System Restore points, disable VSS,
disable the pagefile.sys, and prepare the partition for defragmentation.
But doing all of that, you may still run into a few tiny things
that won't move. Which of course, would drive you crazy
Some of the patterns you see on the disk, exist because the file
system is reserving space for the $MFT to grow. And then the
defragmentation you attempted, may not successfully slam everything
to the left.
*******
Before showing this section, I have to make the usual disclaimers:
1) Always back up, before doing intensive data movements.
CHKDSK, defragmentation, partition management, may move lots
of data around. And the programs can severely mess up your
disk, once in a while.
2) When using a new and untested program, the risks are much
higher on the first run. You don't really know what's going to
happen. Only after a lot of usage, will you begin to trust
the new tool you're testing.
So before trying these things, you'd want a backup in hand. Just in case.
http://www.kessels.com/JkDefrag/ <--- Jerome Kessels free defrag, with source
Good for experiments
http://www.mydefrag.com/Manual-DownloadAndInstall.html <--- New version by JK, no src
Example of a command line invocation (using the first package)
JkDefrag.exe -a 5 -d 2 -q c:
-a = optimize mode
-d = debug level <--- places details in a .log file
-q = quit_on_finish
-a N
1 = Analyze, do not defragment and do not optimize.
2 = Defragment only, do not optimize.
3 = Defragment and fast optimize [recommended]. <--- default
5 = Force together.
6 = Move to end of disk.
7 = Optimize by sorting all files by name (folder + filename).
8 = Optimize by sorting all files by size (smallest first).
9 = Optimize by sorting all files by last access (newest first).
10 = Optimize by sorting all files by last change (oldest first).
11 = Optimize by sorting all files by creation time (oldest first).
-d N
0 = Fatal errors.
1 = Warning messages [default].
2 = General progress messages.
3 = Detailed progress messages.
4 = Detailed file information.
5 = Detailed gap-filling messages.
6 = Detailed gap-finding messages.
I would make a backup first, then play with the program,
to see what it can do for you.
I just tried the "-a 5" option on C: in a WinXP test VM,
and it does "slam to the left". It cannot move the "green bar"
of pagefile.sys, and didn't appear to try in this case.
The version of JKDefrag I used was 3.36.
HTH,
Paul