Show TOC

Cache Management SystemLocate this document in the navigation structure

Use

AS Java implements the concept of a centralized cache management infrastructure that consolidates caches that are used by various applications within the SAP system landscape. This infrastructure is provided by the Cache Management Library (CML).

Features

The system provides central configuration of all caches. It allows the user to change the behavior of the cache (scope, thresholds, eviction).

System wide cache analysis and optimization, as well as central monitoring of all caches (hit rate, miss rate, request count, update count, remove count, eviction count, utilization and so on) are available for administration purposes.

The Cache Management System also provides the following features:

  • Sharing of caches between all server process of an instance.

  • Cluster-wide invalidation of cached objects.

  • Tools to analyze the cache size and behavior of each region.

Activities

Enabling Cache Benchmarking and Monitoring

The cache.benchmark.enabled property allows you to check basic performance parameters on a particular system.

The cache.monitoring.enable property allows you to monitor the centralized cache management (in SAP Management Console).

To modify the properties, use the following procedure:

  1. Start the Config Tool by double-clicking the configtool script file from <SAP_install_dir>/<system_name>/<instance_name>/j2ee/configtool directory.

  2. Choose Start of the navigation path cluster-data Next navigation step template Next navigation step instance - <n> Next navigation step  managers  Next navigation step CacheManager End of the navigation path.

  3. From the list of properties, select cache.benchmark.enabled .

  4. In the Custom value field, set the required Boolean value.

  5. To apply the new value, choose Set Custom Value .

  6. To save the changes, choose Apply changes .

  7. For the changes to take effect, restart the cluster.

You can use this procedure analogically to configure the cache.monitoring.enable property.

Configuring Database Cache Connections

The cml.dbWorkerThreadsNumber property limits the number of database threads used by the cache. If this number is high, it can lead to a system performance degradation. If you need to modify this property, we recommend to set a maximum value between 10 and 15.

To modify the property, use the following procedure:

1. Start the Config Tool.

2. Choose Start of the navigation path cluster-data  Next navigation step template Next navigation step  instance - <n> Next navigation step services Next navigation step tc~je~cachemgmt~srv End of the navigation path.

3. From the list of properties, select cml.dbWorkerThreadsNumber .

4. In the Custom value field , set the required value.

5. To apply the new value, choose Set Custom Value .

6. To save the changes, choose Apply changes. .

7. For the changes to take effect, restart the cluster.

Configuring Cache Thresholds

Thresholds enable you to control the number of objects stored in the cache. To modify the cache thresholds, use the following procedure:

  1. Find out the threshold settings of the cache regions that best fit your scenario. You can do so with the help of SAP support, or by using the following Telnet commands from the CACHE group:

    • cache_info - lists detailed information about the cache regions

    • cache_modify - performs configuration operations on a cache region

  2. After you have identified the optimal values of the cache thresholds, change their settings in the cache-configuration.xml file in the SDA of the component. Define the two types of thresholds for the region as shown in the following example.

                         <thresholds>
        <count start="750" upper="950" critical="1000">
        <size start="750000" upper="950000" critical="1000000">
    </thresholds>
                      

    In the example above, the eviction of the objects starts when there are 750 objects in the cache region. At 950 objects in the cache, the eviction policy starts evicting an object on each put. At 1000 objects in the cache region, the critical size of the cache is reached and the benefit of the cache is not clear. The size thresholds are not supported and taken into account, but should be present in the XML.

  3. Redeploy the component.