Windows has an official NTFS defrag interface. It is extremely conservative and slow. The idea is that defraggers can safely run while other programs are running simultaneously messing up the disk. Another advantage of the interface is that bugs in the defragger are very unlikely to corrupt the disk. Further system crashes while a defragger is running are also very unlikely to corrupt the disk. It would be much faster if Microsoft would implement it properly. It should buffer up several requests to move small files, and move a batch of them (or file fragments) in one single elevator seek. The interface could stay the same. It would just have some extra intelligence inside to do the moves slightly out of order, in batches.
Defraggers don’t move exclusively locked files. In theory they could. The programs locking them would never notice, any more than they notice unlocked files being moved on them, but probably for performance reasons, locked files are left alone. This means, for optimal defragging, you don’t want other programs running and using the disk. Defraggers often do their delicate work at boot time to avoid other programs, even the OS, from interfering.
You can help your defraggers along by putting your system proper on a partition to itself C:, your scratch space on D:, volatile data on E:, your programs on F: and your attic of rarely accessed collected programs and files and backups on G:. The idea is you keep the volatile files together and the stable files together, with the most used files closest to C:. Stable files, if not mixed with volatile ones, tend to stay defragged with very little work.
| Windows Hard Disk Defraggers | |||
|---|---|---|---|
| Product | Price in
Last revised: 2005-08-18 |
Strengths | Weaknesses |
| Systems Internals PageDefrag | free | defrags pagefile.sys file. | Does nothing else besides defrag pagefile.sys Can only run at boot time. You can almost as easily, and more safely, defrag pagefile.sys by temporarily moving it to another partition in the Control Panel, reboot, defrag, then move it back, then reboot again. However you need a spare FAT or NTFS partition to do that. For NT/W2K/XP. Does not work on Vista. |
| Built-In Windows defragger | free | This is the defragger that comes bundled with Windows. | It is a stripped down version of Norton Defrag that does not attempt to place most commonly used files in prime real estate — half the purposes of a defgragger. |
| Defrag.zip | free | Not supported. Only works on XP/W2K3/Vista. Very slow. Not too bright about file placement. It just doggedly defrags using the official NTFS defrag interface. | |
| JkDefrag | free | Open source, source available. Can order by last access date. | Bare bones. Purely command line driven. You need the -f 0 option or similar to make it work sensibly. It cannot defrag locked or system files. |
| Auslogics Disk Defrag 1.6.2 | Free. They say “free trial download”, but it is 100% free. | Works on W2K/XP/W2K3/Vista. Quick. | It offers no options to control how the defrag is done. Does not have a way of handling locked or system files. It appears to do the equivalent of an O & O STEALTH or SPACE option, just befragging non-contiguous files, without any attempt at optimum file placement. |
| Winternals Defrag Manager | for single station; for ten station. | defrags network drives | Defrags using safe but slow MS API. It is thus not currently capable of Page File defragmentation (or of the MFT and related NTFS metadata, since these require off-line defragmenting). You do not install it on each machine. It defrags via a central administrator control. 30 day trial. |
DiskTrix Ultimate Defrag 2008 v 1.72 |
for lite version (no order by access date), for full version (6 defrag methods). | Supports XP/W2K3/Vista.
Six different placement algorithms:
|
To defrag pagefile.sys, hiberfile.sys and other metafiles you must enable boot time defrag. It cannot defrag VSC (volume shadow copy / system volume information) files unless you turn off System Restore, which will permanently discard all your restore points. Disktrix 2009 tends to place some files on the outer rim and the rest at the hub, leaving a wide empty band between. It would make more sense to place the archive band just inside the outer band. Sometimes it does that. In Disktrix 2008, I could not get the scheduler or the boot-time defrag to work at all. Perhaps these are disabled in the trial version. In Disktrix 2007, it often went into an endless loop moving the same file over and over. The settings did not stick properly; they kept reverting to previous settings. I have not had enough experience with Disktrix 2008 to see if these problems have been fixed. Confusingly, there are two menus for setting drive options. Neither have context sensitive help. There is PDF help file for the entire program. Disktrix refuses to answer emails until you register the product. They don’t seem to understand that customers don’t register a product until it is working satisfactorily. It is not as if potential customers can bum free support, get the product working, continue to use it and then not pay, as most of my customers do who seek pre-registration support. Last revised: 2008-04-27 |
| Abelssoft JetDrive |
for JetDrive Professional. for JetDrive Ultimate | Pretty Toy Story-like 3D look and feel. Aimed at the naive user. Fully automatic, almost no confusing options. Needs no configuration. A defragger is not going to do any good unless it is used. This defragger would be good to give to someone who is defragger-phobic. |
|
| Executive Software Diskeeper10 |
home edition.
professional edition. |
Particularly good at speeding up file copies. Defrags, free space, directories, MFT and pagefile.sys, Moves dirs to centre of the disk. | Very slow because it uses the official NTFS defrag interface. Makes no attempt to position files by last access date. Directory, MFT and pagefile.sys optimisation can only be done at boot time. Boot time defrag can take 15+ hours and is not interruptible. Executive Software has Scientology connections, which may cause trouble if you are in Germany. My computer was in my bedroom and it drove me nuts clicking away in the middle of the night after I installed Diskeeper. The only way I could get it to stop running was to uninstall it. Diskeeper claims that a badly fragmented MFT will double boot time and slow some apps by 50%. Software installs can take 5 times longer. They claim a badly fragmented page file can slow mouse response to 30 seconds. |
|
Paragon Total Defrag 2009 |
. Pay by credit card, PayPal, cheque, wire transfer or Maestro. | Can be run without installing from a bootable CD. From Germany. I own a copy
of Paragon 2007.
|
Paragon defragger would be the best defragger were it not for some glaring
problems with the user interface. The authors got all the hard stuff correct,
then stopped before they had polished the user interface. Other than the need to
lock the entire drive, most of these problems would be fairly trivial to fix.
The most important problems are near the top:
|
| Raxco Perfect Disk 2008 | This defragger targets the niche of very large disks where you must be quick
and have to be parsimonious with RAM to get the disk defragged in reasonable
time. It is faster than most other defraggers. It is particularly good at
improving boot time. It optionally compresses small files. Places most
frequently modified (not necessarily most frequently accessed) files near the
center of the disk and rarely modified ones near the edges, with the free space
in the central band. Defrags the page file, the MFT and the directories. The
scheduler lets you allows you to set a maximum run time. Only defragger to fully
defrag all the NT metadata (logfile, MFT mirror, etc.). It will work with only 5%
free space.
It defrags metadata (NTFS alternate file forks), it defrags the hibernate file, it can defrag the page file even when there is no contiguous free space hole big enough to hold it and it does repositions MFT to the middle of the disk. I also suspect is prunes the size of the MFT, and may even internally tidy it. |
It does not fully defrag free space, though Raxco claims this is a
limitation of the NTFS defrag interface. Earlier versions often went into an
infinite loop, but it has not done that with the most recent version. Leaves
many files undefragged after a single pass. The graphic display does not keep up
to date consistently as it works, but it has a window telling which file it is
moving so you can at least tell it has not hung. If you shut down the program by
clicking × the program does not stop, it just continues in the
background as a system process eating up nearly all available CPU cycles. You
can avoid this behaviour by using the stop icon to stop the program, though it
seems to start itself and run at odd times even when you have not scheduled it
too. You can’t get rid of the background service that runs all the time,
however this is true of most defraggers. The partition notebook where you
configure the options for how you want a given partition handled is cleverly
hidden. The way you can access it is with a double click on the drive letter. If
you do a defrag run, then run it again, and abort part way through, your disk
will be messier than when you started.
You can configure aggressive space compaction, but oddly the option is ignored for space compaction defrags. It only works for SMARTPlacement defrags. It does not offer a full sort by last-access-date option. It places files in several rough bands. Raxco says it holds a patent on the idea of file placement. This is prior art and I can prove it to anyone who needs to break the patent. I posted the idea years ago on BIX. Their online store takes only credit cards, though they also sell through dealers. IT Pro Magazine gave it their 2008 editor’ choice award. | |
|
O & O Professional Defrag 11 |
for the single user or for the Server edition that lets you defrag an entire LAN of machines. | Advantages
|
Disadvantages
|
| Jet Defrag Bundled in the Vcom System Suite Professional 6 (née Ontrack Mijenix Defrag Plus) | It organizes your disk in zones, so that files you rarely access don’t get in the way of other files you use more often. Under Windows NT/W2K/XP/W2K3/Vista, Jet Defrag defragments the paging file and the registry. | No trial. That is why I have little to say about it. Neil Rubenking reviewed it saying was slow. It runs about seven times slower than the built-in defrag. | |
| Symantec PartitionMagic 8.0 née PowerQuest | Quick. | Not really a defragger. Squishes partitions without attempt to defrag, prior to moving or resizing them. Does not optimise at all. Can only run at boot time. | |
| Symantec Norton Norton SpeedDisk 2005 | Particularly good at speeding up read access to files. Bundled with Norton SystemWorks 2005 and Norton SystemWorks Pro 2005 Fast since it does not use the klunky official defrag interface. It can defrag the MFT, pagefile, dirs etc. without a reboot. It places frequently accessed file near the start of the partition. Moves small files into the MFT which gives them faster access and ensures they take up less space. (The downside is the MFT needs more frequent defragging.) It is very simple to run. There are no options to configure other than the names of files you want put near the beginning or end of the disk. Puts frequently/infrequently accessed/modified files in separate bands. Places the MFT, then the pagefile, then the directories, then the high access files. Norton’s placement makes more sense to me. The rainbow hued analysis map changes in ways that make sense. Other defraggers seem to have no method to their actions. They appear to just as often be messing up the disk as defragging it. Norton is not perfect. It has the disturbing quality of redefining how much of each kind of file it has as it progresses. It requires only one session to fully defrag the disk. | Cannot defrag the first 16 clusters of the MFT. It is quite slow when it
defrags small files. Microsoft claims Symantec’s online defrag of the MFT
is dangerous. This could just be Microsoft getting huffy over Symantec bypassing
its official klutzy defrag interface, or it could represent a true problem. If
Microsoft implemented it properly, there would be no need for bypassing it. The
defragger is noisier than most, sounding as if it is going to shake your disk to
death.
Two different sets of utilities all on one CD, a W95/W98/Me and NT/W2K/XP/W2K3/Vista set. For windows, make sure you manually configure a swap file with Control Panel ⇒ System ⇒ Performance ⇒ Virtual Memory, otherwise SpeedDisk will keep restarting, fearing writes to the temporary swap file. It moves the swap file and directories. However under NT/W2K/XP/W2K3/Vista it does not move directory entries (on FAT partitions) and metadata files (on NTFS partitions). It leaves them where they are, calling them unmovable files, scattered across the drive. To defrag them, you would have to reformat the drive and reload the files, creating all the directory entries first. | |
Rem change the size of the $LogFile on C: to 65,536K chkdsk C: /L:65536The value is measured in K. If you make it bigger, the $LogFile circular buffer will be bigger. Windows uses it to track the rollback of changes to its crucial directory and space allocation structures. If it gets full, Windows will stall all new I/O until all the current I/O transactions are fully completed.
Alternatively, you can use PageDefrag described above, though it won’t work for Vista.
| Defragger Feature Comparison | |||||||
|---|---|---|---|---|---|---|---|
| Disk Area | Paragon | O&O | Raxco | Norton | Diskeeper | JetDefrag | PageDefrag |
| Ordinary files | |||||||
| Order by least recently used | |||||||
| Order by least recently modified | |||||||
| Registry defrag | |||||||
| Registry internal tidy/prune | |||||||
| MFT defrag | |||||||
| MFT resize | |||||||
| MFT compact internally | |||||||
| $LOGFILE defrag | |||||||
| directory defrag | |||||||
| pagefile defrag | |||||||
| hibernate defrag | |||||||
| metadata defrag | |||||||
| UsnJrnl | |||||||
| $bitmap | |||||||
| VSC volume shadow copy restore points | |||||||
// Formula for expanding a large random access file when it runs out of space. // presume DaysBetweenDefrags = 7 if you have no better information. long newSize = currentSize + expectedGrowthPerDay * DaysBetweenDefrags; // If you have no estimate for expected growth, use this formula // to grow it by 10%, rounded up, whenever it runs out of space. // The file may be initially become very fragmented but should // settle down after the first defrag. long newSize = (currentSize * 110 + 99) / 100;
Defraggers need intact control structures on the disk. If the disks have been corrupted by a system crash or rogue software, running a defragger will only make matters worse. To check for trouble and repair it click Computer ⇒ right click properties for each of your drives ⇒ click tools ⇒ check now. Then reboot. ChkDsk will run twice on each drive, then reboot.
Some people are worried that regular defragging will put extra wear on their disks. Consider that undefragged files put even more wear on disks since the fragments of fragmented files may be accessed tens of thousands of times where it takes only one access to defrag them.
The only reasonably quick and satisfactorily thorough defragger that I know of is Norton SpeedDisk for W95/W98/Me 9x-FAT partitions. Norton SpeedDisk 5.0 is acceptable for NTFS, but I think with some work it could be speeded up further to handle several small files in a single elevator seek.
I know of no decent ones for OS/2-HPFS or Linux-ext-2 partitions. Perhaps one could be devised that booted under its own mini-OS and defragged by copying from partition to partition handling all the major OS formats. It would then not need to worry about crashing, and could do the I/O, including the directory and FAT I/O in massive buffered chunks.
With larger disks, speed becomes more important. Norton is about half the speed of the competition. On the other hand, it gives the best performance improvement. Here are some benchmarks.
The Master file table traditionally goes in a band in the middle of a disk, so don’t expect your defragger to compress it down with the other files. This convention was designed to work well if you never defrag. When the disk gets full, this crucial table will me in the middle of the files. You can improve performance if you have dynamic disk partitioning. You can shrink your partitions which will pull the MFT nearer the files on a sparsely populated disk partition. You can grow and shrink the MFT with the fsutil utility.
To write an efficient disk defragger, model how you tidy your apartment, better still, how Martha Stewart tidies her house.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.62] | The information on this page is for non-military use only. | ||
| You are visitor number 37,582. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/defragger.html | J:\mindprod\jgloss\defragger.html | ||