Forums Register Login

EhCache and JCS throws Out of Memory error.

+Pie Number of slices to send: Send
I was trying to evaluate JCS and EhCache . I need to store approx 1 to 2 M instances in the cache. Which can be shared across other JVMs . EhCache throws OutOfMemory error for more than 0.4 M instances. This is the same case with JCS. I have configured disk store for both of them.

Is anyone has faced this issue earlier. I am not sure if there is any limitation on the number of instances. Please suggest?

EhCahce configuration.

<cache name="testCache"
maxElementsInMemory="100"
maxElementsOnDisk="2000000"
eternal="false"
overflowToDisk="true"
diskSpoolBufferSizeMB="20"
diskPersistent="true"
timeToIdleSeconds="300"
timeToLiveSeconds="600"
memoryStoreEvictionPolicy="LFU"
/>

JCS configuration

#jcs.region.testCache1=DC,LTCP
jcs.region.testCache1=DC
jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=100
jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=true
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=600
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=true
jcs.region.testCache1.elementattributes.IsSpool=true
jcs.region.testCache1.elementattributes.DiskUsagePattern=UPDATE



# AVAILABLE AUXILIARY CACHES
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=Data
jcs.auxiliary.DC.attributes.maxKeySize=2000000
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
jcs.auxiliary.DC.attributes.OptimizeOnShutdown=true
jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500
jcs.auxiliary.DC.attributes.EventQueueType=POOLED
jcs.auxiliary.DC.attributes.EventQueuePoolName=disk_cache_event_queue


# Disk Cache pool
thread_pool.disk_cache_event_queue.boundarySize=50
thread_pool.disk_cache_event_queue.useBoundary=true
thread_pool.disk_cache_event_queue.maximumPoolSize=15
thread_pool.disk_cache_event_queue.minimumPoolSize=1
thread_pool.disk_cache_event_queue.keepAliveTime=3500
thread_pool.disk_cache_event_queue.startUpSize=1
ice is for people that are not already cool. Chill with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3455 times.
Similar Threads
Problem with ehcache
Problem getting JCS (Java caching system)to work
cache solutions for tomcat clustering environment
Hibernate generate select while storing object.
Problem getting JCS (Java caching system)to work
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:46:13.