JFS Tuning and Performance

27
Unified File Cache on HP-UX 11i v3
Filecache_min / filecache_max
The Unified File Cache provides a similar file caching function to the HP-UX buffer cache, but it is
managed much differently. As mentioned earlier, the UFC is page-based versus buffer-based. HP-UX
11i v2 maintained separate caches, a buffer cache for standard file access, and a page cache for
memory mapped file access. The UFC caches both normal file data as well as memory mapped file
data, resulting in a unified file and page cache.
The size of the UFC is managed through the kernel tunables filecache_min and filecache_max. Similar
to dbc_mac_pct, the default filecache_max value is very large (49% of physical memory), which
results in unnecessary memory pressure and paging of non-cache data. The filecache_min and
filecache_max values should be evaluated for the appropriate values based on how the system is
used. For example, a system may have 128 GB of memory, but the primary application is Oracle and
the database files are mounted for Direct I/O. So the UFC should configured be to handle the non-
Oracle load, such as setting the filecache_max value to 4 GB of memory.
fcache_fb_policy
The fcache_fb_policy tunable controls the behavior of the file system flush behind. The default value of
0 disables file system flush behind. The value of 1 enables file system flush behind via the fb_daemon
threads, and a value of 2 enables “inline” flush behind where the process that dirties the pages also
initiates the asynchronous writes (similar to the behavior in 11i v2).
VxFS metadata buffer cache
vxfs_bc_bufhwm
File system metadata is the structural information in the file system, and includes the superblock,
inodes, directories blocks, bit maps, and the Intent Log. Beginning with VxFS 3.5, a separate
metadata buffer cache is used to cache the VxFS metadata. The separate metadata cache allows
VxFS to do some special processing on metadata buffers, such as shared read locks, which can
improve performance by allowing multiple readers of a single buffer.
By default, the maximum size of the cache scales depending on the size of memory. The maximum
size of the VxFS metadata cache varies depending on the amount of physical memory in the system
according to the table below:
Table 5. Size of VxFS metadata buffer cache
Memory Size (MB)
VxFS Metadata
Buffer Cache (KB)
VxFS Metadata Buffer Cache
as a percent of memory
256
32000
12.2%
512
64000
12.2%
1024
128000
12.2%
2048
256000
12.2%
8192
512000
6.1%
32768
1024000
3.0%
131072
2048000
1.5%