Memory and Heap Size Guideline for Cache Agents

Guidelines for memory and heap size depend on the cache provider.

With TIBCO BusinessEvents DataGrid Cache Provider

The JVM can use much more memory than expected because it often defers garbage collection. If the JVM uses a large percentage of the available physical memory, TIBCO BusinessEvents DataGrid might not perform well, due to swapping. The JVM and TIBCO BusinessEvents DataGrid run in the same process; therefore they compete for the same addressable space in the RAM. If the JVM uses a large percentage of the addressable space, out of memory errors can occur in TIBCO BusinessEvents DataGrid. This situation is more likely to occur on 32-bit systems, where the addressable space is 4GB or less. To avoid this situation, set a heap limit to restrict the amount of memory used by the JVM, so that it does not compete with TIBCO BusinessEvents DataGrid. For example, you could use the command line option -Xmx512m.

With Oracle Coherence Cache Provider

With Oracle Coherence as the cache provider, the amount of memory you need for cache agents depends on factors such as how many objects you have, their object management configuration, and whether you are using limited or unlimited cache.

You must find an appropriate balance for your projects between too little memory, which leads to too much time spent in garbage collection, and too much memory, which leads to longer garbage collection cycles. The optimal heap size depends on factors such as how much data is kept in each cache agent, how many cache agents are used, and whether the cache is limited or unlimited.

For example, if you use a JVM heap size of 1024 MB (1GB), in order to minimize the impact of garbage collection, about 75% of the heap can be used to store cache items, which means about 768 MB per heap. The other 25% is then available for garbage collection activities.

Different operating systems have different requirements: adjust as required.