HP-UX HB v13.00 Ch-22 - Performance and Tuning

HP-UX Handbook Rev 13.00 Page 8 (of 19)
Chapter 22 Performance & Tuning
October 29, 2013
Keep in mind that many modern disk arrays buffer their writes with onboard
memory, also many databases use lockable memory to buffer within the System
Global Area or SGA. Some databases do not use an SGA and may benefit from a
large cache.
Note:
Buffers remain in the cache even after a file is closed , as they could be
used again in the future.
Some database vendors recommend locking the cache down , i.e. making the
minimum and maximum cache size the same, this would be referred to as a
static cache. Trade-offs are associated with either a static or dynamic
buffer cache. If memory pressure exists, a static cache cannot be reduced,
potentially causing more important pages to be swapped out or processes
deactivated. A dynamic cache expands very rapidly, but contracts very
slowly and only when memory pressure exists. It is possible to bypass either
static or dynamic caches , in some instances this allows for faster disk I/O
.
This can be accomplished with the Online JFS mount options:
mincache=direct convosync=direct
These should be used together to avoid mixed I/O performance issues.
Example:
mount -F vxfs -o remount, mincache=direct, convosync=direct /dev/vgtest/lvol1
/test
to return to default :
mount -F vxfs -o remount /dev/vgtest /lvol1 /test
If the I/O size is greater than 256KB the system will bypass the cache
and use discovered_direct_io. This cache threshold can be tuned using
vxtunefs , example:
vxtunefs -o discovered_direct_iosz=10485760 /u08
Raw logical volumes bypass the cache, while this has been historically
faster in the past, improvements in I/O handling no longer account for a
substantial difference in well tuned systems.
To monitor the use of the cache run the following command :
sar b 5 100
You will see output similar to :
bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
0 95 100 1 2 54 0
0
In this example we can see that while the system is reading everything it has
written to in cache, it is only writing 54%. If this is consistent behavior
the size of the cache can be reduced by at 45% of the current value.
Large and volatile caches can still have a negative impact on performance.
It is prudent to have the latest cache performance patch configured on
systems with large caches.
Insufficient memory resources are a major cause of performance problems, and should be the