Memory File System (MemFS) 2.0 for HP-UX 11i v3
# /usr/sbin/umount /memfs
2.2 Tuning Memory File System
MemFS uses kernel memory for storing the file's metadata. Kernel memory is shared
by all the subsystems in the kernel and this memory is not page-able. Over-use of kernel
memory can bring down the performance of the system as well as the applications that
compete for kernel memory.
MemFS provides a tunable called memfs_metamax to restrict the amount of kernel
memory used by all MemFS instances.
Writing data to MemFS files result in reserving system swap space for the MemFS files.
The system swap space is a shared resource. In addition to MemFS, other applications
also consume certain amount of swap space. For example, the execution of very large
programs can be affected if MemFS file systems are huge in size. Thus the swap space
needs to be used judiciously to allow other applications to have an adequate share of
it. MemFS provides a tunable called memfs_swapmax_pct to restrict the amount swap
space being used by all MemFS instances.
2.2.1 memfs_metamax
The metadata of all the MemFS file systems mounted in the system is stored in kernel
memory. The memfs_metamax tunable defines the maximum percentage of kernel
memory that can be used to accommodate MemFS metadata. The tunable does not
reserve or assure the memory of specified size; it just assures that the metadata does
not grow beyond the specified size. Metadata of MemFS file systems is never swapped
out of the memory or reused, unless the MemFS file system is unmounted. The value
of this tunable can be as low as 1% of kernel memory and as high as 30% kernel memory.
The default value is 15% of kernel memory. This tunable can accept both percentage
and absolute values.
Values can be specified as follows:
1. Default
Example:
kctune -s memfs_metamax=Default
2. A percentage of total kernel memory: A positive whole number followed by a
percent symbol (for example, 20%).
Example:
kctune -s memfs_metamax=20%
3. A constant value: A positive whole number that represents number of bytes of
kernel memory, optionally followed by a multiplier suffix, where K=1000, KB=1024,
2.2 Tuning Memory File System 17