Wednesday, October 28, 2009

Monitoring IBM WebSphere Portal caches using IBM Tivoli Performance Viewer



Question
The correct sizing of internal caches used by IBM WebSphere Portal is critical to the product performance. In order to configure and tune the caches of IBM WebSphere Portal, monitoring of the caches is required under load conditions. How can the internal caches be monitored without installing extra analysis tooling?

Answer
A selection of the internal caches of IBM WebSphere Portal can be monitored leveraging the Performance Monitoring Infrastructure (PMI) of IBM WebSphere Application Server. For each cache the Performance Management Infrastructure can report the following metrics:

ClientRequestCountThe number of requests for cacheable objects that are generated by applications running on this application server.
DistributedRequestCountThe number of requests for cacheable objects that are generated by cooperating caches in this replication domain.
ClientRequestCountThe number of requests for cacheable objects that are generated by applications running on this application server.
DistributedRequestCountThe number of requests for cacheable objects that are generated by cooperating caches in this replication domain.
ExplicitDiskInvalidationCountThe number of explicit invalidations resulting in the removal of an entry from disk.
ExplicitInvalidationCountThe number of explicit invalidations.
ExplicitMemoryInvalidationCountThe number of explicit invalidations resulting in the removal of an entry from memory.
HitsInMemoryCountThe number of requests for cacheable objects that are served from memory.
HitsOnDiskCountThe number of requests for cacheable objects that are served from disk.
InMemoryAndDiskCacheEntryCountThe current number of used cache entries in memory and disk.
LocalExplicitInvalidationCountThe number of explicit invalidations generated locally, either programmatically or by a cache policy.
LruInvalidationCountThe number of cache entries that are removed from memory by a Least Recently Used (LRU) algorithm.
MissCountThe number of requests for cacheable objects that were not found in the cache.
RemoteCreationCountThe number of cache entries that are received from cooperating dynamic caches.
RemoteExplicitInvalidationCountThe number of explicit invalidations received from a cooperating Java virtual machine in this replication domain.
RemoteHitCountThe number of requests for cacheable objects that are served from other Java virtual machines within the replication domain.
TimeoutInvalidationCountThe number of cache entries that are removed from memory and disk because their timeout has expired.


In order to enable monitoring for the caches exposed to Performance Viewer available in the Integrated Solutions Console of IBM WebSphere Application Server follow the following steps:

  1. Enable Performance Monitoring Infrastructure on the IBM WebSphere Portal Server:
    1. Open the Integrated Solution Console on your portal node for standalone installations or access the Integrated Solution Console on the deployment manager for clustered portal installations.
    2. Go to "Monitoring and Tuning > Performance Monitoring Infrastructure (PMI)".
    3. Select the IBM WebSphere Portal server for which the Performance Monitoring Infrastructure should be enabled, e.g. "WebSphere_Portal" for standalone installations.
    4. Check the "Enable Performance Monitoring Infrastructure (PMI)" checkbox.
    5. Save the changes to the master configuration.
    6. Restart the IBM WebSphere Portal Server if it was last started with the Performance Monitoring Infrastructure disabled.
  2. Configure the caches for monitoring:
    1. Go to "Monitoring and Tuning > Performance Monitoring Infrastructure (PMI)"
    2. Select the IBM WebSphere Portal server for which the Performance Monitoring Infrastructure has been enabled, e.g. "WebSphere_Portal" for standalone installations.
    3. Under "Currently monitored statistic set" click "Custom".
    4. Switch to the "Runtime" tab. Settings defined under the "Runtime" tab in the IBM Integrated Solutions Console will not be persisted.
    5. Expand the "Dynamic Caching" section.
    6. Expand the IBM WebSphere Portal cache of interest. For example: "Object: ws/com.ibm.wps.ac.AccessControlUserContextCache".
    7. Expand the "Object Cache" section and click the "Counters" link.
    8. Enable the counters to monitor by adding checkmarks in front of the counter name.
    9. Repeat 2. for all exposed IBM WebSphere Portal caches of interest.
  3. Monitor the configured caches in Performance Viewer of the Integrated Solutions Console:
    1. Go to "Monitoring and Tuning > Performance Monitoring Infrastructure (PMI) > Performance Viewer > Current Activity".
    2. Click the server name the Performance Monitoring Infrastructure was configured for. The Performance Viewer dashboard is displayed.
    3. Expand the "Performance Modules > Dynamic Caching" section. The entries for caches you configured for monitoring before will be shown in back color. Caches that were not configured yet for monitoring are shown as grey inactive links.
    4. Expand the section of an monitored cache entry. For example: "Object: ws/com.ibm.wps.ac.ExplicitEntitlementsCache.CONTENT_NODE > Object Cache > Counters" and checkmark the "Counters" entries and click the "View Module(s)" button at the top.
    5. The configured counters will be displayed by Performance Viewer of the Integrated Solutions Console and can be visualized in graphs.


Note: Enabling the Performance Monitoring Infrastructure can cause overhead on the IBM WebSphere Portal Server and can cause performance degradation. Enable only necessary statistic stets and test the influence of settings on a test system under load conditions before applying it to production systems.