JFS Tuning and Performance

29
Note
When setting vx_ninode to reduce the JFS inode cache, use the -h option
with kctune(1M) to hold the change until the next reboot to prevent
temporary hangs or Serviceguard TOC events as the vxfsd daemon
become very active shrinking the JFS inode cache.
vxfs_ifree_timelag
By default, the VxFS inode cache is dynamically sized. The inode cache typically expands very
rapidly, then shrinks over time. The constant resizing of the cache results in additional memory
consumption and memory fragmentation as well as additional CPU used to manage the cache.
The recommended value for vxfs_ifree_timelag is -1, which allows the inode cache to expand to its
maximum sizes based on vx_ninode, but the inode cache will not dynamically shrink. This behavior is
similar to the former HFS inode cache behavior.
Note
To reduce memory usage and memory fragmentation, set
vxfs_ifree_timelag to -1 and vx_ninode to 128000 on most systems.
Directory Name Lookup Cache
The Directory Name Lookup Cache (DNLC) is used to improve directory lookup performance. By
default, the DNLC contains a number of directory and file name entries in a cache sized by the
default size of the JFS Inode Cache. Prior to VxFS 5.0 on 11i v3, the size of the DNLC could be
increased by increasing the size of vx_ninode value, but the size of the DNLC could not be
decreased. With VxFS 5.0 on 11i v3, the DNLC can be increased or decreased by tuning the
vx_ninode value. However, the size of the DNLC is not dynamic so the change in size will take effect
after the next reboot.
The DNLC is searched first, prior to searching the actual directories. Only filenames with less than 32
characters can be cached. The DNLC may not help if an entire large directory cannot fit into the
cache, so an ll(1) or find(1) of a large directory could push out other more useful entries in the cache.
Also, the DNLC does not help when adding a new file to the directory or when searching for a non-
existent directory entry.
When a file system is unmounted, all of the DNLC entries associated with the file system must be
purged. If a file system has several thousands of files and the DNLC is configured to be very large, a
delay could occur when the file system is unmounted.
The vxfsstat(1M) command with the -i option can be used to verify the size of the VxFS DNLC:
# vxfsstat -i /
: :
Lookup, DNLC & Directory Cache Statistics
337920 maximum entries in dnlc
1979050 total lookups 90.63% fast lookup
1995410 total dnlc lookup 98.57% dnlc hit rate
25892 total enter 54.08 hit per enter
0 total dircache setup 0.00 calls per setup
46272 total directory scan 15.29% fast directory scan
While the size of the DNLC can be tuned using the vx_ninode tunable, the primary purpose of
vx_ninode it to tune the JFS Inode Cache. So follow the same recommendations for tuning the size of
the JFS inode cache discussed earlier.