Extents

In general disk space is allocated in 512-byte or 1024-byte (DEV_BSIZE) sectors to form logical blocks. VxFS supports logical block sizes of 1024, 2048, 4096, and 8192 bytes. The default block size is 1K for file systems up to 2 TB in size, and 8K for other file system sizes. Users can choose any block when creating file systems using the mkfs command. VxFS allocates disk space to files in groups of one or more adjacent blocks called extents. An extent is a set of one or more consecutive logical blocks. Extents allow disk I/O to take place in units of multiple blocks if storage is allocated in consecutive blocks. For sequential I/O, multiple block operations are considerably faster than block-at-a-time operations.

VxFS uses an aggressive allocation policy for allocating extents to files. It also allows an application to pre-allocate space or request contiguous space. This results in improved I/O performance and less file system overhead for performing allocations. For an extending write operation, the policy attempts to extend the previously allocated extent by the size of the write operation or larger. Larger allocation is attempted when consecutive extending write operations are detected. If the last extent cannot be extended to satisfy the entire write operation, a new disjoint extent is allocated. This policy leaves excess allocation that is trimmed at the last close of the file or if the file is not written to for some amount of time. The file system can still be fragmented with too many non-contiguous extents, especially file systems of smaller size.