ultradefrag.sourceforge.net
The UltraDefrag Handbook  5.0.0
Introduction

UltraDefrag is the first open source disk defragmenter for Windows which supports defragmentation of locked system files by running during the Windows boot process. Actually all files including registry hives and page-file can be defragmented at Windows boot time.

Also one of the primary goals of the UltraDefrag design is doing the job as fast as possible.

UltraDefrag has the following features:

  • system files defragmentation (registry, page-file, ...)
  • MFT (master file table) defragmentation (on XP and later systems)
  • internal NTFS files defragmentation (on Windows 2000 and later systems)
  • ultra fast NTFS analysis
  • fast defragmentation algorithm
  • effective volume optimization algorithm (two strategies available)
  • safety, it can never damage processed files
  • simplicity, it can be used without reading the documentation
  • ability to defragment single files/directories from the context menu of Explorer
  • ability to defragment additional streams attached to NTFS files
  • ability to exclude any unimportant files based on flexible filters
  • ability to defragment files, which have more fragments than specified by a threshold
  • ability to automatically break defragmentation when the specified time interval elapses
  • ability to select multiple volumes for defragmentation
  • well readable HTML reports
  • powerful command line interface
  • ability to automatically hibernate/shutdown PC after a job is done
  • ability to make an automatic effective defragmentation through Windows Task Scheduler
  • multilingual graphical interface
  • little binaries (less than 500 kb)
  • portable version available which requires no installation
  • native 64-bit support
  • open source code licensed under GPL

UltraDefrag runs on Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7, including all 64 bit versions of Windows. NT 4.0 Alpha is currently not supported. ReactOS and Wine aren't supported yet, because they have no defragmentation API implemented at this moment.

Supported file-systems

The following file-systems can be defragmented by UltraDefrag: FAT12/16/32, exFAT and NTFS.

There are a few system restrictions which apply to disk defragmentation. Unfortunately UltraDefrag cannot take away these restrictions:

  • Directories on FAT volumes cannot be moved. This is a well known FAT driver restriction and cannot be fixed.
  • The $Bitmap and other internal NTFS files cannot be defragmented on Windows versions prior to Windows 2000 and to defragment the $MFT file at least Windows XP is needed, because the NTFS system driver prevents accessing them.
  • The first 16 clusters of MFT cannot be moved on Windows XP and Windows Server 2003, this is a file system driver limitation. So, UltraDefrag skips $Mft file on these systems, if it contains two fragments only. In case of three or more fragments the file will be defragmented partially, if possible.
  • NTFS volumes with a cluster size greater than 4 kilobytes cannot be defragmented on Windows NT 4.0 and Windows 2000.
  • On Windows NT 4.0 and Windows 2000 NTFS driver cannot move any part of the file - quite complex rules exist to define whether a part of the file can be moved or not. Due to the complexity of rules, UltraDefrag is not able to process NTFS volumes so effectively as it does on Windows XP and later versions of Windows.

Never try to run UltraDefrag on NTFS v1.2 formatted volumes under Windows NT 4.0, because this may crash your system. NTFS 1.2 had beta status and an appropriate system driver was not reliable.

Processing algorithms

Both optimization algorithms ignore any size, name and fragment count filters.

Defragmentation algorithm

  1. The analysis phase scans the whole volume to collect information about all files and free space.
  2. The defragmentation phase concatenates all fragmented files into one chunk. Files that can't be moved or are locked are skiped.
  3. The partial defragmentation phase tries to concatenate the remaining fragmented files into as less pieces as possible.

Quick optimization algorithm

  1. The analysis phase is the same as for defragmentation.
  2. The next phase moves only fragmented files to the end of the volume to free space at the begining of it.
  3. The defragmentation phase is the same as for defragmentation.
  4. The last phase tries to move as much not fragmented files to the beginning of the volume to create a big free space at the end.

Full optimization algorithm

  1. The analysis phase is the same as for defragmentation.
  2. The next phase moves all files, fragmented or not, to the end of the volume to free space at the begining of it.
  3. The defragmentation phase is the same as for defragmentation.
  4. The last phase is the same as for quick optimization.

Another advantage of the described optimization algorithms over more complicated algorithms is their relatively small processing time.

Unfortunately the volume optimization algorithm works only on NTFS volumes, because FAT directories are not movable.

On the other hand, NTFS volumes are often logically split into several parts by files which cannot be moved ($Bitmap and others). Therefore it may be sometimes impossible to get a very large continuous free space area for, for instance, pagefile defragmentation. For such cases there are two workarounds available:

  • Move all files to another disk, reformat the volume and move all back. This causes the perfect volume optimization.
  • Run GParted or Partition Magic to manually reduce the volume size as much as possible. This operation will move all files including system files to the beginning of the volume. After restoring the original size, you will have a large continuous free space area at the end of the volume. This space may be used hereafter to defragment large files.

Note that UltraDefrag always skips files located directly in MFT records (these files usually have sizes below 1kb), because they are actually part of the MFT. Also files which have no content are skipped, because actually there are no clusters on disk belonging to them. Additionally, UltraDefrag never tries to defragment files marked as temporary by applications which created them. Because such files will be deleted soon, therefore they will not decrease the system performance.

Web resources

The Ultra Defragmenter's home page is at: http://ultradefrag.sourceforge.net

Please be sure to visit this site for information, documentation, tutorials, news, etc. All UltraDefrag related things are available there.

For help requests visit our forum: http://ultradefrag.sourceforge.net/forum

Please report all problems and bugs via our bug tracker: http://ultradefrag.sourceforge.net/bugs

To participate in UltraDefrag translation visit please WikiSpaces.com.

The most recent version of this handbook can be obtained from the program's SVN repository. Download the archive, unpack it, run the Doxygen tool and copy all files from the /rsc subdirectory to /doxy-doc/html. After these steps open /doxy-doc/html/index.html in your browser to view the latest version of the documentation.


Previous: The UltraDefrag Handbook Next: Installation