When set to an appropriate level for the Webfaced application, the Record Definition Cache can provide a
decrease in memory usage, and slightly decreased processor usage. The number of record definitions that
the cache will retain is set by an initialization parameter in the Webfaced application’s deployment
descriptor (web.xml). By changing the cache size, the Webfaced application can be tuned for best
performance and minimum memory requirements. The cache size determines the number of record data
definitions that will be retained in the cache. There is one record data definition for each record format.
If the cache is set too large then all record data definitions
for the Webfaced application would be cached, likely
consuming memory for seldom used definitions.
too large
With the cache set correctly, 90% of all accessed record data
definitions would be retained in the cache with few cache
misses for not commonly used records.
correct
When the cache size is set too small for the Webfaced
application it will adversely affect the performance. In this
case, the definitions would be cached then discarded before
being re-used. There is significant overhead to create the
record definitions.
too small
Effect
Cache Size
In order to determine what is the correct size for a given Webfaced application, the number of commonly
used record formats needs to estimated. This can be used as a starting point for setting the cache size.
The default size, if no size is specified, would be 600 record data definitions. To set the cache size to
something other than the default size, you need to add a session context parameter in the Webfaced
application’s web.xml file. In the following example the cache size is set to 200 elements, which may be
appropriate for a very small application, like the Order Entry example program.
<context-param>
<param-name>
WFBeanCacheSize
</param-name>
<param-value>
200
</param-value>
<description>
WebFacing Record Definition Bean Cache Size
</description>
</context-param>
NOTE:
For information on defining a session context parameter in the web.xml file, refer to the
WebSphere Application Server Info Center. You can also edit the web.xml file of a deployed application.
Typically this file will be located in the following directory for WebSphere V5.0 applications:
/QIBM/UserData/WebAS5/Base/<application-server>/config/cells/..../WEB_INF
And the following directory for WebSphere Express V5.0 applications:
/QIBM/UserData/WebASE/ASE5/<application-server>/config/cells/..../WEB_INF
Cache Management - Definition Cache Content Viewer
To assist with managing the Record Definition Cache, two servlets can be enabled. One is used to display
the elements currently in the cache and the other can be used to load the cache. Both of these servlets are
not normally enabled in a WebFacing application in order to prevent mis-use or exposure of data.
IBM i 6.1 Performance Capabilities Reference - January/April/October 2008
©
Copyright IBM Corp. 2008
Chapter 6 - Web Server and WebSphere
110