Common Misconfigured HP-UX Resources (April 2006)
There are multiple object sizes available but not all sizes are represented. For example, on
HP-UX 11.0 there are pages that use the 1024-byte object and the 2048-byte object, but nothing in
between. If JFS requests 1040 bytes of memory, then an entire 2048-byte object is taken from a page
divided into two 2048-byte objects.
As inodes are allocated, the kernel will allocate memory pages and divide them into objects, which
are then used by the JFS subsystem for inodes and associated data structures. To allocate 128,000
inodes that each take 1024 bytes, the system needs to allocate 32,000 pages (4 inodes per page).
As discussed earlier, the JFS inode cache is dynamic. Inodes that are not accessed are eventually
freed. These freed inodes go back to the object freelist. If you enter an ll(1) or find(1) command to
access 128,000 inodes, and the inodes are unreferenced for some time, then large object freelist
chains can form as the JFS daemon thread starts to free the inodes. This can occur for each CPU
object freelist since inodes are freed to the CPU’s object chain where they were allocated.
Note in the previous figure that if CPU 3 needed a new inode, then the kernel memory allocator
would return the first object from the object freelist chain. However, the object freelist chain for CPU 1
is empty. If you enter an ll or find command, new inodes will be needed in the JFS inode cache.
New memory pages will be allocated and divided up into objects and placed in the object freelist for
CPU 1. The kernel memory allocator will not steal free objects from another CPU’s free object chain.
By not stealing objects, the system realizes a performance gain by reducing contention on the object
chain locks. However, when an inode is freed, the kernel memory allocator will place the freed area
on the free object chain for CPU 1 to be used for a subsequent allocation. The freeing of the inodes
creates potentially large free object chains for each CPU as the JFS inode cache shrinks.
While the object freelists can be used for other 1024-byte allocations, they cannot be used for other
sized allocations as all the objects allocated from a page must be the same size. If you have four
CPUs, then you can potentially consume memory for freed inodes on the object freelist as well as used
inodes in the JFS inode cache.
The HP-UX kernel performs “object coalescing”, such that if all the objects in a given page are freed,
then the memory page can be returned to the free pool and allocated for use in other areas (process
memory, different size memory objects, and others). However, this “object coalescing” only occurs if
there is memory pressure present and there is some overhead in performing the coalescing.
23