jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Cronin" <tcro...@interwoven.com>
Subject RE: wrong key count in indexed key cache ??
Date Wed, 13 Feb 2008 15:23:05 GMT
does this sound like your problem?

https://issues.apache.org/jira/browse/JCS-32


-----Original Message-----
From: Ron Zohar [mailto:rzo@gmx.de] 
Sent: Wednesday, February 13, 2008 3:49 AM
To: jcs-users@jakarta.apache.org
Subject: wrong key count in indexed key cache ??

Hello,

I am currently evaluation JCS.
I am adding 10.000.000 objects to the cache. On program exit and restart
only approx 300.000 keys are written/read from the keys-file.
Is this a bug or do I have to change something in the configuration ?
I was expecting to use the disk cache as an (unreliable) object store,
to be able to retrieve all objects after restart of the JVM.

Further question: In case MaxPurgatorySize == 0, no objects are written
to the disk cache. I was expecting that objects will be written
immediately to  disk.

Concerning the file: what do you think of using a memory mapped file.
would that be more efficient in case of large disk caches ?

# DEFAULT CACHE REGION
jcs.default=DC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut
es
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory
.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=21600
jcs.default.elementattributes.IdleTime=1800
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=true
jcs.default.elementattributes.IsLateral=true


#Auxiliary CACHE (disk cache)
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF
actory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
dDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=e:\jcscache
jcs.auxiliary.DC.attributes.MaxKeySize=10000000
jcs.auxiliary.DC.attributes.MaxPurgatorySize=1000



jcs.region.testCache=DC
jcs.region.testCache.cacheattributes=org.apache.jcs.engine.CompositeCach
eAttributes
jcs.region.testCache.cacheattributes.MaxObjects=0
jcs.region.testCache.cacheattributes.MemoryCacheName=org.apache.jcs.engi
ne.memory.lru.LRUMemoryCache
jcs.region.testCache.cacheattributes.UseMemoryShrinker=false
jcs.region.testCache.cacheattributes.DiskUsagePattern=UPDATE
jcs.region.testCache.elementattributes=org.apache.jcs.engine.ElementAttr
ibutes
jcs.region.testCache.elementattributes.IsEternal=true
jcs.region.testCache.elementattributes.MaxLifeSeconds=-1
jcs.region.testCache.elementattributes.IdleTime=-1
jcs.region.testCache.elementattributes.IsSpool=true
jcs.region.testCache.elementattributes.IsRemote=false
jcs.region.testCache.elementattributes.IsLateral=false


	            try
	            {
	                cache =  JCS.getInstance( cacheRegionName );
	            }
	            catch ( CacheException e )
	            {
	            	e.printStackTrace();
	            }
	            for (int i=0; i<10000000; i++)
	            {
	            City city = new City();
	            try
	            {
	                    cache.put( ""+i, city );
	            }
	            catch ( Exception e )
	            {
	            	e.printStackTrace();
	            }
	            if (i % 4000 == 0)
	            {
                    // yield so disk thread can get the cpu
            	    Thread.yield();
                    System.out.println(cache.getStats());
	            }
	            }


- Ron
http://sourceforge.net/projects/ajax4jmx/


-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message