Reputation: 21
We have several caches configured in coherence-cache-config.xml. For eg.,
<cache-mapping>
<cache-name>Cache1</cache-name>
<scheme-name>Cache-Scheme1</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>Cache2</cache-name>
<scheme-name>Cache-Scheme2</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>Cache3</cache-name>
<scheme-name>Cache-Scheme3</scheme-name>
</cache-mapping>
We have 1 GB per node and there are 4 nodes in the cluster. Each cache uses its own service.
<distributed-scheme>
<scheme-name>cache-scheme_1</scheme-name>
<service-name>BaseCacheService1</service-name>
<thread-count system-property="tangosol.coherence.base.threads">2</thread-count>
<guardian-timeout>30m</guardian-timeout>
<backing-map-scheme>
<local-scheme>
<scheme-ref>cache-local</scheme-ref>
</local-scheme>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
Question:
1. How much does memory each cache/service occupy by default in the 1GB of total memory? I understand that 1/3rd of the memory may be used by coherence for core processes. So remaining 600MB need to be spread across the cache.
Does Coherence Cache by default use any memory if no objects are put in the cache?
we are seeing outofmemory error in one of the caches. when the cache reaches it maximum memory, based on eviction policy data will be evicted. I assume outofmemory shouldn't occur when evictions properly happens. Please let me know why the outofmemory error would occur.
Regards Hari
Upvotes: 2
Views: 593
Reputation: 141
Out of the total heap size that you assign to Coherence Node, 1/3rd is used for coherence related stuff like Indexes etc (core services as you've mentioned), 1/3rd will hold the actual data and 1/3rd will go to the backup data the node is holding (assuming you have gone for only single replication). Hence you can effectively use only 340 MB of heap size to store data not 600 MB.
Upvotes: 1