allocsize
A filesystem parameter that controls the size of disk space pre-allocated for files, particularly in XFS, to reduce fragmentation and improve write performance by reserving contiguous blocks upfront.
allocsize is a mount option used primarily with the XFS filesystem that specifies the minimum amount of disk space to allocate when writing to a file. Instead of allocating only the exact bytes written, the filesystem reserves a larger contiguous block, reducing the need for future reallocations.
For example, if allocsize=64k is set and you write 10 bytes to a new file, XFS will actually allocate 64 kilobytes of contiguous space on disk. This pre-allocation helps prevent fragmentation and improves sequential write performance.
The default value is typically 64 kilobytes. Higher values reduce fragmentation but waste more disk space if files remain small; lower values conserve space but may increase fragmentation. This is particularly useful for databases and other I/O-intensive workloads that benefit from contiguous allocations.