File system fragmentation: Difference between revisions

Content deleted Content added
m rephrase some wording
Codename Lisa (talk | contribs)
mNo edit summary
Line 4:
When [[Disk formatting|a file system is first initialized]] on a [[Disk partitioning|partition]], it contains only a few small internal structures and is otherwise one contiguous block of empty space.{{efn|Some file systems, such as [[NTFS]] and [[ext2]]+, might preallocate empty contiguous regions for special purposes.}} This means that the file system is able to place newly created files anywhere on the partition. For some time after creation, files can be laid out near-optimally. When the [[operating system]] and [[application software|application]]s are installed or [[archive (computing)|archive]]s are unpacked, separate files end up occurring sequentially so related files are positioned close to each other.
 
As existing files are deleted or truncated, new regions of free space are created. When existing files are appended to, it is often impossible to resume the write exactly where the file used to end, as another file may already be allocated there; thus, a new fragment has to be allocated. As time goes on, and the same factors are continuously present, free space as well as frequently appended files tend to fragment more. Shorter regions of free space also mean that the file system is no longer able to allocate new files contiguously, and has to break them into fragments. This is especially true when the file system is becomes full and large contiguous regions of free space are unavailable.
 
=== Example ===