The system allocates a portion of system memory for use in
block-mode file operations (such as exec() and mount() system calls and inode reading). Buffer space is reserved in
increments of 4096-byte pages, but buffers can be much larger than
4096 bytes, requiring as many as 16 or more pages per buffer, depending
on hardware device and configuration characteristics.
Two methods for allocating buffer space are supported: static
and dynamic. The obsolescent static method allocates buffer space
and buffer header structures at system boot time. The preferred
dynamic buffer cache method allocates buffer space and supporting
data structures as they are needed, using predefined minimum and maximum
values to establish overall buffer cache space allocation limits.
Static
Buffer Allocation |
 |
For administrators who choose not to use dynamic buffer caching,
the two kernel parameters, nbuf and bufpages,
control static buffer allocation. If bufpages is
nonzero, it specifies the fixed number of 4096-byte pages that are
to be allocated for the file system buffer cache. nbuf is
provided for backward compatibility purposes. If set to a nonzero
value, nbuf specifies the maximum number
of buffer headers that can exist in the buffer header array. However,
the preferred approach is to set nbuf to
zero, in which case, one header is created for each two bufpages allocated.
Recommended
Procedure |
 |
Set bufpages and nbuf to
zero, and set dbc_min_pct and dbc_max_pct to
the desired upper and lower limits as a percentage of total system
memory. This activates dynamic buffer cache allocation.
Alternate
Procedure |
 |
To allocate a fixed amount of memory for static buffer cache,
set bufpages to the desired number of 4
KB pages, and set nbuf to zero, which allocates
space for bufpages/2 buffer headers
in the header array. dbc_min_pct and dbc_max_pct are
ignored.
Additional
Information |
 |