Science Fair Project Encyclopedia
Defragmentation
In the context of administering computer systems, defragmentation (or defragging) refers to the process of physically reorganizing files on a computer hard drive in order to store files as contiguously as possible.
| Contents |
Aims of defragmentation
Reading and writing data on a heavily fragmented hard drive is slowed down as the time for the heads to move between fragments on the disk surface can be substantial. The disk operates at speeds millions of times slower than the CPU; thus the desire to process more efficiently encourages defragmentation. Operating system manufacturers often recommend periodic defragmentation in order to keep hard drive access as fast as possible.
Fragmented data also spreads over more disk than it needs. Thus one may defragment in order to compact data storage before splitting a single partition into two or more partitions (for example, with FIPS, or PartitionMagic).
Causes and cures
Fragmentation occurs when the operating system cannot or will not allocate enough contiguous space to store a complete file as a unit, but instead puts parts of it in gaps between other files (usually those gaps exist because they formerly held a file that the operating system has subsequently deleted or because the operating system allocated excess space for the file in the first place). As advances in technology bring us larger disk drives, the performance loss due to fragmentation squares with each doubling of the size of the drive. Larger files and greater numbers of files also contribute to fragmentation and consequent performance loss. Defragmentation restores a drive to its original speed.
[Source: Jensen, Craig (1994). Fragmentation the Condition, the Cause, the Cure. Executive Software International. ISBN 0-9640049-0-9.]
A defragmentation program must move files around within the free space available in order to undo fragmentation. This is a memory intensive operation and cannot be performed on a filesystem with no free space. The reorganization involved in defragmentation does not change logical location of the files (defined as their location within the directory structure).
Defragmentation issues
The presence of immovable system files (or of files that the defragmenter will not move in order to simplfy its task), especially a swap file, can impede defragmentation. ntfsresize can safely move these files in order to resize an NTFS partition.
Certain file systems exhibit a greater susceptibility to fragmentation than others, for example, a FAT file system becomes fragmented more quickly than NTFS or ext3 file systems. Most Unix-like systems do not have the ability to explicitly defragment at all (though they may have the ability to perform other maintenance tasks, eg repacking). These systems attempt to keep fragmentation below a certain point so defragmenting is not necessary.
Because fragmentation builds upon itself when left unhandled, daily defragmentation is necessary to keep disk performance at peak and avoid the excess overhead of less frequent defragmentation.
Utilities
Defragmentation programs often come bundled with an operating system (although Windows NT 4 notably did not include one).
A defragmentation utility moves the scattered clusters of each file into consecutive clusters. A hard disk is fragmented when its files are not written into their consecutive clusters.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details


