Veritas™ File System 5.0.1 Programmer's Reference Guide
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.
Extent attributes
VxFS allocates disk space to files in groups of one or more extents. In general, the
internal allocation policies of VxFS attempt to achieve two goals: allocate extents
for optimum I/O performance and reduce fragmentation. VxFS allocation policies
attempt to balance these two goals through large allocations and minimal file
system fragmentation by allocating from space available in the file system that
best fits the data. These extent-based allocation policies provide an advantage
over block-based allocation policies. Extent based policies rarely use indirect
blocks with allocations and eliminate many instances of disk access that stem
from indirect references.
VxFS allows control over some aspects of the extent allocation policies for a given
file by two administrative tools, setext and getext, and an API. The
application-imposed policies that are associated with a file are referred to as
extent attributes. VxFS provides APIs that allow an application to set or view
extent attributes associated with a file and preallocate space for a file.
See the setext(1) and getext(1) manual pages
Attribute specifics
There are two extent attributes associated with a file: reservation and fixed extent
size. You can preallocate space to the file by manipulating a file’s reservation.
You can also override the default allocation policy of the file system by setting a
fixed extent size. Other policies determine the way these attributes are expressed
during the allocation process.
You can specify the following:
77Veritas File System I/O
Extents