HP-UX Reference (11i v2 07/12) - 1M System Administration Commands A-M (vol 3)
f
fsadm_vxfs(1M) fsadm_vxfs(1M)
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
9293 115 1 149352
blocks used for indirects: 48
% Free blocks in extents smaller than 64 blks: 10.40
% Free blocks in extents smaller than 8 blks: 0.56
% blks allocated to extents 64 blks or larger: 91.67
Free Extents By Size
1: 156 2: 140 4: 101
8: 292 16: 290 32: 241
64: 155 128: 94 256: 43
512: 33 1024: 20 2048: 1
4096: 1 8192: 1 16384: 1
32768: 1 65536: 0 131072: 0
262144: 0 524288: 0 1048576: 0
2097152: 0 4194304: 0 8388608: 0
16777216: 0 33554432: 0 67108864: 0
134217728: 0 268435456: 0 536870912: 0
1073741824: 0 2147483648: 0
The numbers in the column "Total Files" indicate the total number of files that have data extents. The
column "Average File Blks" contains the average number of blocks belonging to all files. The column "Aver-
age # Extents" contains the average number of extents used by files in the file system. The column "Total
Free Blks" contains the total number of free blocks in the file system. The total number of blocks used for
indirect address extent are reported as "blocks used for indirects".
The general shape of free extent map is also reported. There are two percentages reported: % free extents
smaller than 64 blocks and % free extents smaller than 8 blocks. These numbers are typically near zero on
an unfragmented file system.
Another metric reported is the percentage of blocks that are part of extents 64 blocks or larger. Files with
a single small extent are not included in this calculation. This number is generally large on file systems
that contain many large files, and is small on file systems that contain many small files.
The figures under the heading "Free Extents By Size" indicate the totals for free extents of each size. The
totals are for free extents of size 1, 2, 4, 8, 16, ... up to a maximum of the number of data blocks in an allo-
cation unit. The totals are similar to the output of the df -o command unless there was recent allocation
or deallocation activity (because
fsadm acts on mounted file systems). These figures provide an indication
of fragmentation and extent availability on a file system.
Extent Reorganization
If the -e option is specified, fsadm reorganizes the data extents on the file system whose mount point is
mount_point. The primary goal of extent reorganization is to defragment the file system.
To reduce fragmentation, extent reorganization tries to place all small files in one contiguous extent. The
-l option specifies the size of a file that is considered large. The default is 64 blocks. Extent reorganiza-
tion also tries to group large files into large extents of at least 64 blocks. Extent reorganization can
improve performance. Small files can be read or written in one I/O operation. Large files can approach
raw-disk performance for sequential I/O operations.
fsadm performs extent reorganization on all inodes on the file system. Each pass through the inodes will
move the file system closer to optimal organization.
fsadm reduces both file fragmentation and free extent fragmentation in each pass. In older versions of
VxFS, considerable effort was made to obtain an optimal file system layout. In current versions, fsadm
relies on VxFS kernel allocation mechanisms to reallocate files in a more favorable extent geometry. At the
same time, the kernel allocation mechanism is prevented from using blocks in areas of the free list that
fsadm tries to make more contiguous.
The command syntax to perform extent reorganization is
fsadm -e [-E][-v][-s][-l largesize][-p passes][-r rawdev][-t time] mount_point
The following example shows the output from the fsadm -F vxfs -e -s -E command:
# fsadm -F vxfs -e -s -E /home
HP-UX 11i Version 2: December 2007 Update − 6 − Hewlett-Packard Company 281