Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Planning a Workgroup
Planning to Manage File Systems
Chapter 2 101
In general, a JFS file system has better performance than an HFS file
system, due to its use of big extents, optimized file-system space usage,
large read-ahead, and contiguous files. However, the natural result of
file-system is the fragmentation of its blocks.
HP OnLineJFS has an efficient means of defragmenting file system
space, to restore file-system performance. You can defragment a JFS file
system using SAM or directly from the command line using the fsadm
command.
You can perform two kinds of defragmentation directory and extent
defragmentation.
How often should you defragment (reorganize) a JFS file system?
For optimal performance, the kernel extent allocator must be able to find
large extents whenever necessary. To maintain file-system performance
levels, the fsadm utility should be run periodically against all JFS file
systems, to reduce fragmentation. Frequency depends on file-system
usage, activity patterns, and importance of performance, and might
mean daily or monthly.
However, to maintain optimal performance on busy file systems, you
should defragment them nightly.
How do you defragment a JFS file system?
On a Basic JFS file system, you need to perform the same steps as for
an HFS file system: backup the file system, then restore it.
For procedures and backup logistics, see “Backing Up Data” on
page 674.
If you have the optional HP OnLineJFS product, you can defragment
(reorganize) a JFS file system using SAM or the fsadm utility.
For procedure, see “Defragmenting a JFS File System” on page 643.