Common Misconfigured HP-UX Resources (April 2006)
The Metadata Cache: Dynamic or Static?
The metadata cache is a dynamic buffer cache, which means it can expand and shrink over time. It
normally expands during periods of heavy metadata activity, especially with operations that traverse
a large number of inodes, such as a find or backup command. Simply reading a large file may fill
up the HP-UX buffer cache, but not the metadata cache.
Unlike the HP-UX buffer cache, which contracts only when memory pressure is present, the metadata
cache contracts after the metadata buffers have been inactive for a period of time (about one hour).
While the metadata cache contracts, it contracts at a slow rate, so it takes some time for inactive
buffers to be reclaimed by the memory subsystem.
You can view the current size of the buffer cache and the maximum size of the buffer cache by using
the vxfsstat command. For example:
# vxfsstat -b /
12:55:26.640 Thu Jan 3 2006 -- absolute sample
buffer cache statistics
348416 Kbyte current 356040 maximum
122861 lookups 98.78% hit rate
2428 sec recycle age [not limited by maximum]
Note that the maximum amount only accounts for the buffer pages, and does not include the buffer
headers, which account for approximately 22 percent more memory.
The Metadata Cache and Memory
The default maximum size of the JFS metadata cache varies depending on the amount of physical
memory in the system according to the following table:
Memory Size (Mb) JFS Metadata Cache (Kb) JFS Metadata Cache as a percent of
physical memory
512 64,000 12.2%
1024 128,000 12.2%
2048 256,000 12.2%
8192 512,000 6.1%
32768 1,024,000 3.05%
131072 2,048,000 1.53%
If the size of memory falls between two ranges, then the maximum sizes is calculated in proportion to
the two neighboring memory ranges. For example, if the system has 4 GB of memory (4096 Mb),
then the calculated maximum metadata cache size is 356,040 Kb, a value proportional to the 2-GB
and 8-GB range.
For systems equipped with memory cells that can be configured as removable, the size of the JFS
Metadata Buffer Cache cannot be more than 25% of kernel available memory.
Note that the table represents the maximum size of the metadata cache, which includes buffer
headers and buffer pages. The cache is dynamic so it will expand as the metadata is accessed and
contract slowly. Operations that touch a lot of metadata, such as a system backup, will attempt to
bring all the metadata into the cache. However, it is possible that there is not enough metadata to fill
28