File system fragmentation: Difference between revisions

Content deleted Content added
Bender the Bot (talk | contribs)
m Preventing fragmentation: clean up; http→https for YouTube using AWB
m rephrase some wording
Line 2:
 
==Causes==
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 completely freeable to place newly created files anywhere on the partition. For some time after creation, files on the file system can be laid out near-optimally. When the [[operating system]] and [[application software|application]]s are installed or other [[archive (computing)|archive]]s are unpacked, laying out separate files sequentiallyend alsoup meansoccurring thatsequentially so related files are likely to be positioned close to each other.
 
However, asAs 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 morebecomes full; thusand longerlarge contiguous regions of free space are less likely to occurunavailable.
 
=== Example ===