Extent (file systems)
Template:Short description Template:Refimprove
In computing, an extent is a contiguous area of storage reserved for a file in a file system, represented as a range of block numbers, or tracks on count key data devices. A file can consist of zero or more extents; one file fragment requires one extent. The direct benefit is in storing each range compactly as two numbers, instead of canonically storing every block number in the range.[1] Also, extent allocation results in less file fragmentation.
Extent-based file systems can also eliminate most of the metadata overhead of large files that would traditionally be taken up by the block-allocation tree. But because the savings are small compared to the amount of stored data (for all file sizes in general) but make up a large portion of the metadata (for large files), the overall benefits in storage efficiency and performance are slight.[2]
In order to resist fragmentation, several extent-based file systems do allocate-on-flush. Many modern fault-tolerant file systems also do copy-on-write, although that increases fragmentation. As a similar design, the CP/M file system uses extents as well, but those do not correspond to the definition given above. CP/M's extents appear contiguously as a single block in the combined directory/allocation table, and they do not necessarily correspond to a contiguous data area on disk.
IBM OS/360 and successors allocate files in multiples of disk tracks or cylinders. Files could originally have up to 16 extents, but this restriction has since been lifted. The initial allocation size, and the size of additional extents to be allocated if required, are specified by the user via Job Control Language. The system attempts to allocate the initial size as a contiguous area, although this may be split if contiguous space is not available.
Adoption
The systems supporting file system extents include the following:
- APFSTemplate:Snd Apple File System
- ASMTemplate:Snd Automatic Storage ManagementTemplate:Snd Oracle's database-oriented file system
- BFSTemplate:Snd BeOS, Zeta and Haiku operating systems
- BtrfsTemplate:Snd Extent-based copy-on-write (COW) file system for Linux
- EFSTemplate:Snd Extent File SystemTemplate:Snd SGI's first-generation file system for IRIX
- ext4Template:Snd Linux file system (when the configuration enables extentsTemplate:Snd the default in Linux since version 2.6.23)
- Files-11Template:Snd OpenVMS file system
- HFS and HFS PlusTemplate:Snd Hierarchical File SystemTemplate:Snd Apple Macintosh file systems
- High Performance File System (HPFS) Template:Snd on OS/2, eComStation and ArcaOS
- IceFSTemplate:Snd IceFileSystemTemplate:Snd optional file system for MorphOS
- JFSTemplate:Snd Journaled File SystemTemplate:Snd used by AIX, OS/2/eComStation/ArcaOS and Linux operating systems
- ISO 9660Template:Snd Extent-based file system for optical disc media
- MPE File SystemTemplate:Snd the file system of the Multi-Programming Executive operating system.
- NTFSTemplate:Snd used by Windows
- OCFS2Template:Snd Oracle Cluster File SystemTemplate:Snd a shared-disk file system for Linux
- Reiser4Template:Snd Linux file system (in "extents" mode)
- SINTRAN IIITemplate:Snd file system used by early computer company Norsk Data
- UDFTemplate:Snd Universal Disk FormatTemplate:Snd standard for optical media
- VERITAS File SystemTemplate:Snd enabled via the pre-allocation API and CLI
- XFSTemplate:Snd SGI's second-generation file system for IRIX and Linux
Adoption outside of file systems include the following:
- Microsoft SQL ServerTemplate:Snd versions support 64 KB extents consisting of eight 8 KB pages.[3]
- Oracle Database groups blocks into extents and extents into segments.[4]
See also
References
External links
- Getting to know the Solaris filesystem, Part 1: Allocation and storage strategyTemplate:Snd a comparison of block-based and extent-based allocation