Common Misconfigured HP-UX Resources (April 2006)

The size of the cache is determined by the ninode tunable. Note that the tunable only sizes the HFS
inode cache, and does not affect the JFS inode cache. The tunable also sizes the HFS inode hash
table, which is the previous “power of 2” based on ninode. For example, if the ninode tunable is
configured for 1500 inodes, then the hash table will have 1024 hash entries (since 1024 is the
previous power of 2 to 1500).
When an inode lookup is performed, the device and inode number are both used to hash into the
inode hash table. From the hash header, a linked list of inodes that hash to the same hash header is
analyzed to see if the desired inode is found. If the desired inode is found, use the inode in memory.
If the desired inode for the file is not found, reuse the least recently used inode, which is the first inode
on the free list. The inode information on disk is then read into this newly obtained inode. If there are
no inodes on the free list, the system call will fail with the “inode table is full” message.
Determining the Memory Cost of the HFS Inode Cache
You can determine the cost of the HFS inode cache table by identifying the size of the inode hash
table and the actual cache of inodes. Note that the inode cache is simply an array of vnode/inode
structures (the vnode is the Virtual File System layer part). Since the vnode is actually part of the
inode, you only need to consider the size of the inode. You can use the following table to identify the
number of bytes needed per entry for each structure.
11i v1.5 11.0 32-bit 11.0 64-bit 11i v1 32-bit 11i v1 64-bit 11i v2
inode 336 336 488 367 496 576
hash entry 8 8 16 8 16 16
Using the previous table, you can calculate the memory cost of the HFS inode cache. For example, if
ninode is configured at 10,000 on an HP-UX 11i v1 64-bit system, then the system would use 4844
Kb for the HFS inode table ( 496*10000 / 1024), and 128 Kb for the HFS hash table (previous
power of 2 (8192) * 16 / 1024).
The HFS Inode Cache and the DNLC
The ninode tunable used to configure the HFS inode cache size can also impact the size of the
Directory Name Lookup Cache (DNLC). The size of the DNLC used to be entirely dependent on the
value of ninode. However, this caused some problems since the DNLC was used by HFS and non-
HFS file systems (such as JFS). For example, even if the /stand file system was the only HFS file
system, a customer would have to configure ninode very large in order to get a large enough DNLC
to handle the JFS files.
5