PK13460: DISK CACHE PERFORMANCE, GARBAGE COLLECTION, ADDITIONAL PMI MATRIX AND CACHE POLICY ENHANCEMENTS

 Fixes are available

5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for AIX
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for HP-UX
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for Linux
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for AIX
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for AIX
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for HP-UX
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for Solaris
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for Windows
5.1.1.18: WebSphere Application Server V5.1.1 Cumulative Fix 18 for Linux
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for Linux
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for Solaris
5.1.1.17: WebSphere Application Server V5.1.1 Cumulative Fix 17 for Windows
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for AIX
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for Windows
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for Windows
PK13460: Disk Cache Enhancements
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for Solaris
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for Solaris
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for Windows
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for HP-UX
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for AIX
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for Windows
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for Solaris
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for AIX
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for Linux
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for HP-UX
5.1.1.12: WebSphere Application Server V5.1.1 Cumulative Fix 12 for Solaris
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for AIX
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for Windows
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for HP-UX
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for Solaris
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for Solaris
5.1.1.13: WebSphere Application Server V5.1.1 Cumulative Fix 13 for Linux
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for AIX
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for Linux
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for Windows
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for Windows
5.0.2.18: WebSphere Application Server 5.0.2 Cumulative Fix 18 for Linux
5.1.1.14: WebSphere Application Server V5.1.1 Cumulative Fix 14 for HP-UX
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for AIX
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for HP-UX
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for HP-UX
5.1.1.16: WebSphere Application Server V5.1.1 Cumulative Fix 16 for Linux
5.1.1.15: WebSphere Application Server V5.1.1 Cumulative Fix 15 for Linux
5.1.1.19: WebSphere Application Server V5.1.1 Cumulative Fix 19 for HP-UX



APAR status
Closed as program error.

Error description
WCS customers want the following functions:
1. Disk cache performance improvement.
2. Garbage collection to evict disk cache entries.
3. Additional PMI matrix to help disk cache tuning and debug.
4. Cache policy enhancements.
Local fix Problem summary
****************************************************************
* USERS AFFECTED: All WebSphere Application Server Dynamic     *
*                 cache users                                  *
****************************************************************
* PROBLEM DESCRIPTION: This APAR contains several              *
*                      enhancements in the following areas:    *
*                      (1) Disk cache enhancements             *
*                        - Performance level to tune           *
*                          performance of the disk cache       *
*                         (high, custom, balanced, low)        *
*                        - Three fields to limit disk cache    *
*                         (Limit disk cache size in entries,   *
*                          limit disk cache size in GB, and    *
*                          limit disk cache entry size in MB)  *
*                        - Disk cache garbage collector        *
*                      (2) Cache policy enhancements           *
*                        - skip-cache-attribute                *
*                        - do-not-cache property               *
*                      (3) PMI Counters For Disk Cache         *
*                          Enhancements                        *
*                      (4) Dynamic cache MBean statistics      *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
You can configure disk cache with the following JVM
custom properties:

===> Disk Cache Offload Performance Level
com.ibm.ws.cache.CacheConfig.diskCachePerformanceLevel
Valid value: 0, 1, 2 or 3
Performance level to tune performance of the disk cache:
* High Performance and high memory usage (3)
  All metadata (dependency IDs, templates) will be kept in
  memory.
  No need to perform disk scan for expiration, i.e. no cleanup
  frequency
* Custom Performance and custom memory usage (2) Explicitly
  configure the memory consumed by disk cache
  - set htodDelayOflloadEntriesLimit  (<=100)
  - set htodDelayOffloadDepIdBuckets (>= 100)
  - set htodDelayOffloadTemplateBuckets ( >= 10)
  - set htodCleanupFrequency in minutes (1 to 1440); 0 means
    cleanup runs only at the midnight
* Balanced Performance and balanced memory usage (1)
  Some metadata will be kept in memory. use the default
  settings to provide an optimal balance of performance and
  memory usage for most users.
  - set htodCleanupFrequency in minutes (1 to 1440); 0 means
    cleanup runs only at the midnight
* Low Performance and low memory usage (0)
  Very limited metadata will be kept in memory.
  - set htodCleanupFrequency in minutes (1 to 1440); 0 means
    cleanup runs only at the midnight

com.ibm.ws.cache.CacheConfig.htodCleanupFrequency
Value: positive value in minutes; default = 0 (cleanup is
scheduled to run at midnight); This property is used to
specify the frequency at which the disk cache cleanup daemon
should remove expired entries from the disk cache.

com.ibm.ws.cache.CacheConfig.htodDelayOflloadEntriesLimit
Value: positive value; default = 1000; This property provides
a way to limit the buffering of dependency and template
information by specify an upper bound on the number of cache
entries any specific dependency can contain for buffering in
memory. If there are more entries per dependency than this
limit, the dependency/template information is written to disk.

com.ibm.ws.cache.CacheConfig.htodDelayOffloadDepIdBuckets
Value: positive value; default = 1000; This property provides
a way to limit the buffering of dependency ID information by
specifying an upper bound on the number of  dependencies that
will be buffered in memory. If the count of dependencies
exceeds this limit, the excess will be written to disk.

com.ibm.ws.cache.CacheConfig.htodDelayOffloadTemplateBuckets
Value: positive value; default = 100; This property provides a
way to limit the buffering of template information by
specifying an upper bound on the number of templates that will
be buffered in memory. If the count of templates exceeds this
limit, the excess will be written to disk.

===> Disk Cache Offload eviction
com.ibm.ws.cache.CacheConfig.diskCacheEvictionPolicy
Valid values 0, 1 and 2
Disk cache garbage collector eviction algorithm:
* None (0) : eviction algorithm disabled,
* Random (1) : The expired objects are removed first. If the
  disk size has not reached the low threshold limit, objects
  are picked from disk cache in random order until the disk
  cache size has reached.
* Size (2) :The expired objects are removed first. If the disk
  size has not reached the low threshold limit, largest-sized
  objects are removed until the disk cache size has reached.
  To enable eviction algorithm, enable the diskCacheSizeInGB
  and/or diskCacheSize features.
Note: The expired entries can be found from eviction table.
No need to perform disk scan when using cleanup frequency.

com.ibm.ws.cache.CacheConfig.diskCacheHighThreshold
Valid values 0 ...100 default= 80  Unit in percent
Start evicting objects out of disk cache when the high
threshold is reached

com.ibm.ws.cache.CacheConfig.diskCacheLowThreshold
Valid values 0 ...100 default= 70  Unit in percent
Sets  a lower limit  on the no. of entries to be evicted from
the disk cache.
Number of eviction entries = diskCacheSize *
(diskCacheHighThreshold - diskCacheLowThreshold)
Size of evicted entries = diskCacheSizeInGB *
(diskCacheHighThreshold - diskCacheLowThreshold))

===> Disk Cache Offload Size control
com.ibm.ws.cache.CacheConfig.diskCacheSize
Valid values: int 0 = no limit
Maximum disk cache size in terms of no. of entries

com.ibm.ws.cache.CacheConfig.diskCacheSizeInGB
Valid values: int 0 = no limit
Maximum disk cache size in terms of no. space occupied in GB

com.ibm.ws.cache.CacheConfig.diskCacheEntrySizeInMB
Valid values: int 0 = no limit
Limit disk cache entry size in MB.Maximum size of individual
cache entry in MB

===> Cache Policy (do-not-cache property)
Define a fragment that is neither cached nor consumed
See Figure 1. Even though DNCParent.jsp is consuming
subfragments and includes DNCChild, DNCChild.jsp will not be
cached or consumed.

Figure 1: cachespec.xml
<cache-entry>
    <class>servlet</class>
    <name>/DNCParent.jsp</name>
    <property name="consume-subfragments">true</property>
    <cache-id>
        <timeout>0</timeout>
    </cache-id>
</cache-entry>

<cache-entry>
    <class>servlet</class>
    <name>/DNCChild.jsp</name>
    <property name="do-not-cache">true</property>
    <cache-id>
        <timeout>0</timeout>
    </cache-id>
</cache-entry>

Do-not-cache can also extend to use on the edge.
See Figure 2. Notice the presence of the edge-cacheable
property. This property must be present to define a fragment
that is not cacheable on the edge.

Figure 2: cachespec.xml (Edge)
<cache-entry>
    <class>servlet</class>
    <name>/DoNotCache.jsp</name>
    <property name="do-not-cache">true</property>
    <property name="edge-cacheable">true</property>
    <cache-id>
        <timeout>0</timeout>
    </cache-id>
</cache-entry>

===> Cache Policy (Skip-cache Attribute)
Defines an attribute that, when present in a request,
specifies that the response cannot be retrieved from or stored
in the specific cache instance.
Figure 1: Applies to base cache
Figure 2: Applies to cacheinstance1

Figure 1: cachespec.xml (Base Cache)
<cache>
  <skip-cache-attribute>previewRequest</skip-cache-attribute>
...
</cache>

Figure 2: cachespec.xml (cacheinstance1)
<cache-instance name="cacheinstance1">
  <skip-cache-attribute>previewRequest</skip-cache-attribute>
...
</cache-instance>

To invoke the skip-cache functionality, simply set the request
attribute as in Figure 3.
SkipCache.jsp is then not retrieved from cache regardless of
its cache policy.

Figure 3: Invoking skip-cache from a filter
public void doFilter (ServletRequest request, ServletResponse
response, FilterChain chain){
  try {
      String parm = request.getParameter("previewRequest");

      if (parm == null)
          request.setAttribute("previewRequest",null);
      else if (parm.equals("true"))
          request.setAttribute("previewRequest","true");
      else if (parm.equals("false"))
      request.setAttribute("previewRequest","false");

      chain.doFilter(request, response);
  } catch (Throwable t) {}}

===> PMI Counters For Disk Cache Enhancements
* DependencyIDBasedInvalidationFromDisk(cumulative count)
  The number of dependency ID based invalidations that have
  been performed since the server startup.
* DependencyIDsBufferForDisk
  The number of dependency IDs that have been currently
  buffered in memory for the disk.
* DependencyIDsOffloadedToDisk (cumulative count)
  The number of dependency IDs offloaded to disk since the
  server startup.
* DependencyIDsOnDisk
  The number of dependency IDs that are currently on disk.
* ExplicitInvalidationsFromDisk (cumulative count)
  The number of explicit invalidations resulting in an entry
  being removed from disk.
* GarbageCollectorInvalidationsFromDisk (cumulative count)
  The number of garbage collector invalidations resulting in
  the removal of entries (not expired) from disk cache due to
  high threshold has been reached since the server startup.
* HitsOnDisk (cumulative count)
  The number of requests for cacheable objects that are served
  from disk.
* ObjectsOnDisk
  The number of cache entries that are currently on disk.
* OverflowInvalidationsFromDisk (cumulative count)
  The number of invalidations resulting in the removal of
  entries from disk due to exceeding the disk cache size limit
  or disk cache size in GB limit since the server startup.
* PendingRemovalFromDisk
  The number of pending entries that are currently to be
  removed from disk.
* TemplateBasedInvalidationFromDisk (cumulative count)
  The number of template based invalidations that have been
  performed since the server startup.
* TemplatesBufferedForDisk
  The number of templates that have been currently buffered in
  memory for the disk.
* TemplatesOffloadedToDisk (cumulative count)
  The number of dependency IDs offloaded to disk since the
  server startup.
* TemplatesOnDisk
  The number of templates that are currently on disk.
* TimeoutInvalidationFromDisk (cumulative count)
  The number of entries that are expired from disk.

===> Dynamic cache MBean statistics
Used for adequate performance monitoring and tuning capabilities
of the dynamic cache service.
Access cache statistics with the MBean interface, using JACL
Start the wsadmin scripting client from the App_server_root/bin
directory.

* Obtain a lists of dynamic cache Mbean Identifiers:
$AdminControl queryNames type=DynaCache,*

* Set your dynamic cache Mbean:
set mbean <dynamic_cache_mbean>

* Retrieve the names of the available cache statistics:
$Admincontrol invoke $mbean getCacheStatisticsNames

* Retrieve the names of the available cache instances
(WAS 5.1.x and 6.0.2.x only):
$AdminControl invoke $mbean getCacheInstanceNames

* Retrieve all of the available cache statistics for the
base cache instance:
$AdminControl invoke $mbean getAllCacheStatistics

* Retrieve all of the available cache statistics for the
named cache instance (WAS 5.1.x and 6.0.2.x only):
$AdminControl invoke $mbean getAllCacheStatistics
"services/cache/servletInstance_4"

* Retrieve cache statistics that are specified by the names
array for the base cache instance:
$AdminControl invoke $mbean getCacheStatistics
{"ObjectsReadFromDisk4000K RemoteObjectMisses"}

* Retrieve cache statistics that are specified by the names
array for the named cache instance (WAS 5.1.x and
6.0.2.x only):
$AdminControl invoke $mbean getCacheStatistics
{services/cache/servletInstance_4 "CacheHits" "ObjectsOnDisk"}
Problem conclusion
The fix for this APAR is currently targeted for inclusion in
fixpack 5.0.2.18, 5.1.1.12, 6.0.2.17.
Please refer to the recommended updates page for delivery
information:

http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
.
For more details related to Disk Cache Enhancement, please see
the Technote for Disk Cache Enhancements:

http://www-1.ibm.com/support/docview.wss?uid=swg27007969
Temporary fix Comments
APAR information
APAR number PK13460
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00W
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2005-10-13
Closed date 2006-07-06
Last modified date 2006-11-16

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:
PK31239

Modules/Macros

Publications Referenced

Fix information
Fixed component name WAS BASE 5.0
Fixed component ID 5630A3600

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00P PSY    UP
R00S PSY    UP
R00W PSY    UP
R103 PSY    UP
R10A PSY    UP
R10H PSY    UP
R10I PSY    UP
R10P PSY    UP
R10S PSY    UP
R10W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PK13460
IBM Group: Software Group
Modified date: Nov 16, 2006