Fragmentation (computing)

1 GiB of SDRAM mounted in a computer. An example of primary storage.

Phenomenon in which storage space, main storage or secondary storage, is used inefficiently, reducing capacity or performance and often both.

- Fragmentation (computing)
1 GiB of SDRAM mounted in a computer. An example of primary storage.

50 related topics

Relevance

A human computer, with microscope and calculator, 1952

Memory paging

Memory management scheme by which a computer stores and retrieves data from secondary storage for use in main memory.

Memory management scheme by which a computer stores and retrieves data from secondary storage for use in main memory.

A human computer, with microscope and calculator, 1952

These segments had to be contiguous when resident in RAM, requiring additional computation and movement to remedy fragmentation.

An example of external fragmentation

Memory management

Form of resource management applied to computer memory.

Form of resource management applied to computer memory.

An example of external fragmentation

This works well for simple embedded systems where no large objects need to be allocated, but suffers from fragmentation, especially with long memory addresses.

An example of slack space, demonstrated with 4,096-byte NTFS clusters: 100,000 files, each five bytes per file, which equal to 500,000 bytes of actual data but require 409,600,000 bytes of disk space to store

File system

Method and data structure that the operating system uses to control how data is stored and retrieved.

Method and data structure that the operating system uses to control how data is stored and retrieved.

An example of slack space, demonstrated with 4,096-byte NTFS clusters: 100,000 files, each five bytes per file, which equal to 500,000 bytes of actual data but require 409,600,000 bytes of disk space to store
File systems may become fragmented
Directory listing in a Windows command shell

This results in unused space when a file is not an exact multiple of the allocation unit, sometimes referred to as slack space.

Computer simulation, one of the main cross-computing methodologies.

Block (data storage)

Sequence of bytes or bits, usually containing some whole number of records, having a maximum length; a block size.

Sequence of bytes or bits, usually containing some whole number of records, having a maximum length; a block size.

Computer simulation, one of the main cross-computing methodologies.

This leads to space inefficiency due to internal fragmentation, since file lengths are often not integer multiples of block size, and thus the last block of a file may remain partially empty.

Visualization of fragmentation and then of defragmentation

Defragmentation

Process that reduces the degree of fragmentation.

Process that reduces the degree of fragmentation.

Visualization of fragmentation and then of defragmentation
Examples of five states of fragmentation
A Windows defragmentation utility

It does this by physically organizing the contents of the mass storage device used to store files into the smallest number of contiguous regions (fragments, extents).

Computer simulation, one of the main cross-computing methodologies.

System resource

Any physical or virtual component of limited availability within a computer system.

Any physical or virtual component of limited availability within a computer system.

Computer simulation, one of the main cross-computing methodologies.

For example, allocating 1 GB of memory in a single block, versus allocating it in 1,024 blocks each of size 1 MB. The latter is known as fragmentation, and often severely impacts performance, so contiguous free space is a subcategory of the general resource of storage space.

Disk structure:
(A) track
(B) geometrical sector
(C) track sector
(D) cluster

Data cluster

Unit of disk space allocation for files and directories.

Unit of disk space allocation for files and directories.

Disk structure:
(A) track
(B) geometrical sector
(C) track sector
(D) cluster

Storing small files on a filesystem with large clusters will therefore waste disk space; such wasted disk space is called slack space.

Charles Babbage, sometimes referred to as the "father of computing".

Thrashing (computer science)

In computer science, thrashing occurs when a computer's virtual memory resources are overused, leading to a constant state of paging and page faults, inhibiting most application-level processing.

In computer science, thrashing occurs when a computer's virtual memory resources are overused, leading to a constant state of paging and page faults, inhibiting most application-level processing.

Charles Babbage, sometimes referred to as the "father of computing".

Thus even if the code and data working sets fit into cache, if the working sets are fragmented across many pages, the virtual address working set may not fit into TLB, causing TLB thrashing.

An example of slack space, demonstrated with 4,096-byte NTFS clusters: 100,000 files, each five bytes per file, which equal to 500,000 bytes of actual data but require 409,600,000 bytes of disk space to store

Disc Filing System

Computer file system developed by Acorn Computers, initially as an add-on to the Eurocard-based Acorn System 2.

Computer file system developed by Acorn Computers, initially as an add-on to the Eurocard-based Acorn System 2.

An example of slack space, demonstrated with 4,096-byte NTFS clusters: 100,000 files, each five bytes per file, which equal to 500,000 bytes of actual data but require 409,600,000 bytes of disk space to store

The DFS does not support data fragmentation, meaning a file's data must be stored in a single run of consecutive sectors, but free space is prone to becoming fragmented.

Physical layout of sectors in a zone-bit disc: As distance from the centre increases, the number of sectors in a given angle increases from one (red) to two (green) to four (grey).

Zone bit recording

Method used by disk drives to optimise the tracks for increased data capacity.

Method used by disk drives to optimise the tracks for increased data capacity.

Physical layout of sectors in a zone-bit disc: As distance from the centre increases, the number of sectors in a given angle increases from one (red) to two (green) to four (grey).

After some time, when more data are stored in the inner tracks, the average data transfer rate will drop, because the transfer rate in the inner zones is slower; this, combined with the head's longer stroke and possible fragmentation, may give the impression of the disk drive slowing down over time.