HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
f
fsadm_vxfs(1M) fsadm_vxfs(1M)
This means that to allocate an indirect-address extent to a file, an 8K extent must be available. If no
extent of 8K byes or larger is available, even though more than 8K of free space is available, an attempt to
allocate a file into indirect extents fails and returns ENOSPC.
Determining Fragmentation
To determine whether a file system is fragmented, the free extents for that file system must be examined.
If a large number of small extents are free, then there is fragmentation. If more than half of the amount of
free space is taken up by small extents (smaller than 64 blocks), or there is less than 5 percent of total file
system space available in large extents, then there is serious fragmentation.
Running the Extent-Fragmentation Report
The extent-fragmentation report provides detailed information about the degree of fragmentation in a given
file system.
The command syntax for an extent-fragmentation report is:
fsadm -E [-l largesize][
-r rawdev] mount_point
The extent reorganization facility considers some extents to be immovable: that is, if reallocating and con-
solidating extents does not improve performance, those extents are considered immovable. For example, if
a file already contains large extents, reallocating and consolidating these extents does not improve perfor-
mance. The
-l option controls when fsadm considers an extent as immovable. By default, largesize is 64
blocks, meaning that any extent larger than 64 blocks is considered to be immovable. For the extent-
fragmentation report, the value for largesize affects which extents are reported as being immovable
extents.
The following is an example of the output generated by the
fsadm -E command:
# fsadm -F vxfs -E /home
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
Section 1M−−254 Hewlett-Packard Company − 5 − HP-UX 11i Version 1: September 2005