Common Misconfigured HP-UX Resources (April 2006)

The following figure shows the HP-UX buffer cache.
Note that buffers remain in the buffer cache even after a file is closed. Thus, if a file is reopened a
short time later, the buffers may still be available in the buffer cache. For example, if your buffer
cache is 500 MB in size, and you enter a grep command on a 100-MB file, each data block will
need to be read into the buffer cache as the file is scanned. However, if you enter a subsequent grep
command on the same file, the file should be accessed via the buffer cache without accessing the disk
device even though the file was closed after the first grep command.
Buffer Cache and Memory
How much memory does the buffer cache take? This seems like a simple question. However, if you
configure your buffer cache to a dynamic maximum of 10 percent of physical memory on a system
with 12 GB of memory, then the maximum size of the buffer cache is 1.2 GB of memory. Note that
this only represents the buffer pages. Other structures used to manage the buffer cache are not
accounted for in this total. These other structures include the following:
Buffer headers
Buffer cache hash table
Buffer hash locks
Buffer cache address map and buffer cache virtual map
Buffer Headers
Each buffer in the buffer cache needs a header structure that defines what the block represents, how it
can be used, and how it is linked. For a 64-bit system, buffer headers are 600 bytes on HP-UX 11.11
and 692 bytes on HP-UX 11i v2. If the buffer cache is fixed, nbuf buffer headers are allocated at
system initialization. If the buffer cache is dynamic, buffer headers are allocated dynamically as
needed. When more buffer headers are needed a page of memory is allocated and carved up into
as many buffer headers as will fit in one 4-KB page.
9