HP-UX Reference (11i v2 04/09) - 1M System Administration Commands A-M (vol 3)

f
fsadm_vxfs(1M) fsadm_vxfs(1M)
Directory Reorganization Statistics (pass 2 of 2)
Dirs Dirs Total Failed Blocks Blocks Immeds
Searched Changed Ioctls Ioctls Reduced Changed Added
fset 999 5439 552 2448 0 708 4188 0
total 5439 552 2448 0 708 4188 0
Directory Fragmentation Report
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 34663 6231 29224 0 147 267
The column labeled "Dirs Searched" contains the number of directories searched. Only directories with
data extents are reorganized. Immediate directories are skipped. The column labeled "Dirs Changed"
contains the number of directories for which a change was made.
The column labeled "Total Ioctls" contains the total number of VX_DIRSORT ioctls performed. Reorgani-
zation of directory extents is performed using this ioctl.
The column labeled "Failed Ioctls" contains the number of requests that failed for some reason. The rea-
son for failure is usually that the directory being reorganized is active. A few failures should be no cause
for alarm. If the
-v option is used, all ioctl calls and status returns are recorded.
The column labeled "Blocks Reduced" contains the total number of directory blocks freed by compressing
entries. The column labeled "Blocks Changed" contains the total number of directory blocks updated
while sorting and compressing entries.
The column labeled "Immeds Added" contains the total number of directories with data extents that were
compressed into immediate directories.
Reporting on Extent Fragmentation
As files are created and removed over time, the free extent map for an allocation unit changes from hav-
ing one large free area to having many smaller free areas. This process is known as fragmentation. Also,
when files increase in size (particularly when growth occurs in small increments) small files can be allo-
cated in multiple extents. In the best case, each file that is not sparse would have exactly one extent (con-
taining the entire file), and the free-extent map is one continuous range of free blocks.
Conversely, in a case of extreme fragmentation, there can be free space in the file system, none of which
can be allocated. For example, on Version 2 disk layouts, the indirect-address extent size is always 8K
long. 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
consolidating extents does not improve performance, those extents are considered immovable. For exam-
ple, if a file already contains large extents, reallocating and consolidating these extents does not improve
performance. The
-l option controls when fsadm considers an extent as immovable. By default, lar-
gesize 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 immov-
able 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
Section 1M214 Hewlett-Packard Company 5 HP-UX 11i Version 2: September 2004