HP-UX VxFS tuning and performance - filibeto.org

HP-UX VxFS tuning and performance - filibeto.org HP-UX VxFS tuning and performance - filibeto.org

18.07.2013 Views

28 The kernel tunable vxfs_bc_bufhwm specifies the maximum amount of memory in kilobytes (or high water mark) to allow for the buffer pages. By default, vxfs_bc_bufhwm is set to zero, which means the default maximum sized is based on the physical memory size (see Table 5). The vxfsstat(1M) command with the -b option can be used to verify the size of the VxFS metadata buffer cache. For example: # vxfsstat -b / : : buffer cache statistics 120320 Kbyte current 544768 maximum 98674531 lookups 99.96% hit rate 3576 sec recycle age [not limited by maximum] Note The VxFS metadata buffer cache is memory allocated in addition to the HP- UX Buffer Cache or Unified File Cache. VxFS inode cache vx_ninode VxFS maintains a cache of the most recently accessed inodes in memory. The VxFS inode cache is separate from the HFS inode cache. The VxFS inode cache is dynamically sized. The cache grows as new inodes are accessed and contracts when old inodes are not referenced. At least one inode entry must exist in the JFS inode cache for each file that is opened at a given time. While the inode cache is dynamically sized, there is a maximum size for the VxFS inode cache. The default maximum size is based on the amount of memory present. For example, a system with 2 to 8 GB of memory will have maximum of 128,000 inodes. The maximum number of inodes can be tuned using the system wide tunable vx_ninode. Most systems do not need such a large VxFS inode cache and a value of 128000 is recommended. Note also that the HFS inode cache tunable ninode has no affect on the size of the VxFS inode cache. If /stand is the only HFS file system in use, ninode can be tuned lower (400, for example). The vxfsstat(1M) command with the -i option can be used to verify the size of the VxFS inode cache: # vxfsstat -i / : : inode cache statistics 58727 inodes current 128007 peak 128000 maximum 9726503 lookups 86.68% hit rate 6066203 inodes alloced 5938196 freed 927 sec recycle age 1800 sec free age While there are 128007 inodes currently in the VxFS inode cache, not all of the inodes are actually in use. The vxfsstat(1M) command with the -v option can be used to verify the number of inodes in use: # vxfsstat -v / | grep inuse vxi_icache_inuseino 1165 vxi_icache_maxino 128000

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 nonexistent 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. 29

28<br />

The kernel tunable vxfs_bc_bufhwm specifies the maximum amount of memory in kilobytes (or high<br />

water mark) to allow for the buffer pages. By default, vxfs_bc_bufhwm is set to zero, which means the<br />

default maximum sized is based on the physical memory size (see Table 5).<br />

The vxfsstat(1M) comm<strong>and</strong> with the -b option can be used to verify the size of the <strong>VxFS</strong> metadata<br />

buffer cache. For example:<br />

# vxfsstat -b /<br />

: :<br />

buffer cache statistics<br />

120320 Kbyte current 544768 maximum<br />

98674531 lookups 99.96% hit rate<br />

3576 sec recycle age [not limited by maximum]<br />

Note<br />

The <strong>VxFS</strong> metadata buffer cache is memory allocated in addition to the <strong>HP</strong>-<br />

<strong>UX</strong> Buffer Cache or Unified File Cache.<br />

<strong>VxFS</strong> inode cache<br />

vx_ninode<br />

<strong>VxFS</strong> maintains a cache of the most recently accessed inodes in memory. The <strong>VxFS</strong> inode cache is<br />

separate from the HFS inode cache. The <strong>VxFS</strong> inode cache is dynamically sized. The cache grows as<br />

new inodes are accessed <strong>and</strong> contracts when old inodes are not referenced. At least one inode entry<br />

must exist in the JFS inode cache for each file that is opened at a given time.<br />

While the inode cache is dynamically sized, there is a maximum size for the <strong>VxFS</strong> inode cache. The<br />

default maximum size is based on the amount of memory present. For example, a system with 2 to 8<br />

GB of memory will have maximum of 128,000 inodes. The maximum number of inodes can be tuned<br />

using the system wide tunable vx_ninode. Most systems do not need such a large <strong>VxFS</strong> inode cache<br />

<strong>and</strong> a value of 128000 is recommended.<br />

Note also that the HFS inode cache tunable ninode has no affect on the size of the <strong>VxFS</strong> inode cache.<br />

If /st<strong>and</strong> is the only HFS file system in use, ninode can be tuned lower (400, for example).<br />

The vxfsstat(1M) comm<strong>and</strong> with the -i option can be used to verify the size of the <strong>VxFS</strong> inode cache:<br />

# vxfsstat -i /<br />

: :<br />

inode cache statistics<br />

58727 inodes current 128007 peak 128000 maximum<br />

9726503 lookups 86.68% hit rate<br />

6066203 inodes alloced 5938196 freed<br />

927 sec recycle age<br />

1800 sec free age<br />

While there are 128007 inodes currently in the <strong>VxFS</strong> inode cache, not all of the inodes are actually<br />

in use. The vxfsstat(1M) comm<strong>and</strong> with the -v option can be used to verify the number of inodes in<br />

use:<br />

# vxfsstat -v / | grep inuse<br />

vxi_icache_inuseino 1165 vxi_icache_maxino 128000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!