Thanks, ... but if I take MaxObjects upto , say , 500,000 , I end up out of heap space.
I was hoping that JCS would flush to disk fast enough that I wouldn't run out of heap space. I put in a Thread.sleep(10 seconds) every 10,000 inserts to try and slow things down, but the same occurs. I was hoping that the cheanup I tried reducing the shrinker interval too Let me know if I've goofed up by not configuring the in-memory cache and disk cache correctly continuing, after waking up inserted 180000 records continuing, after waking up inserted 190000 records Jul 18, 2008 2:31:42 PM org.apache.jcs.engine.CacheEventQueue put INFO: Cache event queue created: CacheEventQueue [listenerId=933524979, cacheName=testCache1] continuing, after waking up inserted 200000 records Jul 18, 2008 2:31:52 PM org.apache.jcs.engine.CacheEventQueue put INFO: Cache event queue created: CacheEventQueue [listenerId=933524979, cacheName=testCache1] continuing, after waking up Exception in thread "main" java.lang.OutOfMemoryError: Java heap space Jul 18, 2008 2:31:56 PM org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache$ShutdownHook run WARNING: Region [testCache1] Disk cache not shutdown properly, shutting down now. Exception in thread "IndexedDiskCache-DisposalThread" java.lang.OutOfMemoryError: Java heap space jcs.default=DC jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes jcs.default.cacheattributes.MaxObjects=600000 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache # PRE-DEFINED CACHE REGIONS jcs.region.testCache1=DC jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes jcs.region.testCache1.cacheattributes.MaxObjects=600000 jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache jcs.region.testCache1.cacheattributes.UseMemoryShrinker=true jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=30 jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=10 jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500 jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAttributes jcs.region.testCache1.elementattributes.IsEternal=true # 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=c:/tmp jcs.auxiliary.DC.attributes.maxKeySize=600000 ////////////////////////////////////////////////////////////////// On Fri, Jul 18, 2008 at 1:18 PM, Niall Gallagher <[EMAIL PROTECTED]> wrote: > MaxObjects=10000 ? > > On Fri, 2008-07-18 at 13:06 -0500, vinay b wrote: > > > I seem to be losing about 90 % of my keys: > > > > 1. insert 500,000 elements in the cache via a loop > > 2. loop through and check whether all elements are accesable > > >