Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | Integration Server Administrator’s Guide | Configuring Ehcache on Integration Server | Configuring an On-Heap Cache | Considerations for Configuring On-Heap Cache
 
Considerations for Configuring On-Heap Cache
When you create an on-heap cache, keep the following points in mind:
*The heap space is shared by all processes running in the JVM. When you add an on-heap cache to Integration Server, you may need to increase the size of the heap to ensure that it is large enough to satisfy the heap requirements of the new cache and other consumers of the heap. These include:
*Other on-heap caches that exist on the Integration Server (including system caches).
*All classes, class variables and instance variables used by Integration Server and the services and triggers that are deployed on it.
*OSGI processes that are running in the same JVM as Integration Server (such as the webMethods Event Server).
For sizing information about the system caches that Integration Server and other Software AG products use, see Using Terracotta with webMethods Products on the Software AG documentation website.
*To estimate the amount of the heap that a cache will consume, multiply the size of objects that you want to cache by the number of those objects that you want to keep in cache.
objectSizeInBytes * numObjectsToCache = heapConsumedByCache
*Very large on-heap caches (which require a large heap size) increase the time it takes for the JVM to perform a full garbage collection. When a full garbage collection occurs, all threads in the JVM are paused, which can cause noticeable delays in response times.
When sizing an on-heap cache, you must weigh the benefits of keeping a large amount of data in memory against the periodic interruptions that this imposes on the Integration Server. For additional information about the effect of garbage collection on a cache, see Ehcache product documentation for 2.8 at http://ehcache.org/documentation.
*If garbage collection becomes a significant problem with the size of your on-heap cache, consider maintaining a smaller on-heap cache and enabling Overflow to Disk or Overflow to Off-Heap (BigMemory license required) to extend the cache without increasing its on-heap requirements.
*Make sure your machine is equipped with sufficient memory to support the heap requirements of your JVM and the memory requirements of other applications that run on the machine. Insufficient memory will cause paging.
*If you enable the Overflow to Disk or Persist to Disk option, your cache must contain only serializable keys and values. If a service attempts to put a non-serializable object into a cache that overflows or is persisted to disk, the service will receive a runtime exception.

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release