jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: configuration jcs remote rmi cache
Date Tue, 16 Sep 2008 03:07:48 GMT
Purgatory is a buffer where items go on the way to disk.  If you put them in the cache faster
than they can go to disk, the buffer will grow.  if you exceed the maximum size the items
will be dropped.  You can either make purgatory bigger or use a thread pool with a when full
policy of BLOCK or RUN.

Aaron


--- On Mon, 9/15/08, Manfred Quasten <manfred.quasten@liantis.com> wrote:

> From: Manfred Quasten <manfred.quasten@liantis.com>
> Subject: configuration jcs remote rmi cache
> To: jcs-users@jakarta.apache.org
> Date: Monday, September 15, 2008, 5:20 AM
> I try to configure a remote disk cache running on tomcat.
> Server and 
> client should run with a minimum java heapsize.
> 
> My configfiles are (server) :
> 
> # Registry used to register and provide the
> # IRemoteCacheService service.
> registry.host=localhost
> registry.port=1102
> # call back port to local caches.
> remote.cache.service.port=1102
> # cluster setting
> remote.cluster.LocalClusterConsistency=true
> remote.cluster.AllowClusterGet=true
> 
> 
> ##############################################################
> ##### CACHE REGIONS
> jcs.region.myRegion1=DC
> jcs.region.myRegion1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> 
> 
> jcs.region.myRegion1.cacheattributes.MaxObjects=-1
> jcs.region.myRegion1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> 
> 
> #jcs.region.myRegion1.cacheattributes.DiskUsagePattern=SWAP
> ##############################################################
> ##### AUXILIARY CACHES
> # Indexed Disk Cache
> 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=dump
> jcs.auxiliary.DC.attributes.MaxPurgatorySize=100
> jcs.auxiliary.DC.attributes.MaxKeySize=-1
> 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
> 
> 
> 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
> 
> 
> 
> client:
> 
> jcs.auxiliary.RC=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
> jcs.auxiliary.RC.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
> 
> 
> jcs.auxiliary.RC.attributes.FailoverServers=localhost:1102
> jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true
> jcs.auxiliary.RC.attributes.GetOnly=false
> 
> 
> jcs.region.myRegion1=RC
> jcs.region.myRegion1.elementattributes.IsEternal=false
> jcs.region.myRegion1.elementattributes.MaxLifeSeconds=60000
> jcs.region.myRegion1.elementattributes.IsSpool=true
> jcs.region.myRegion1.elementattributes.IsLateral=true
> jcs.region.myRegion1.elementattributes.IsRemote=true
> jcs.region.myRegion1.elementattributes.IsRemote=true
> 
> 
> 
> 
> 
> # DEFAULT CACHE REGION
> jcs.default=RC
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.default.cacheattributes.MaxObjects=0
> jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> 
> 
> 
> 
> jcs.auxiliary.RC.attributes.OptimizeOnShutdown=true
> jcs.auxiliary.RC.attributes.MaxRecycleBinSize=7500
> jcs.auxiliary.RC.attributes.MaxPurgatorySize=100
> jcs.auxiliary.RC.attributes.EventQueueType=POOLED
> 
> jcs.auxiliary.RC.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=3500000
> thread_pool.disk_cache_event_queue.startUpSize=1
> 
> 
> 
> I write 50 000 objects into the cache (within a for loop) :
> 
> jcs.putInGroup(id, groupName , object);
> 
> 
> 
> after this, I try to read the keys back from cache and
> there are a lot 
> of objects lost
> 
> for ( int i=0 ; i < 50000 ; i++ ) {
>            final int x = (int) (50000*Math.random());
>            //System.out.println(x);
>            if ( cacheManager.getFromCache(""+  x)
> == null ) {
>                lost++;
>            }                       if (( i % 1000 == 0 )
> && (i > 0 ))
>                System.out.println(i);
>           }
> 
> This is the output from the servlet after the keys are
> written: The Key 
> Map Size is to smal , it is less than 50000
> 
> ---------------------------
> Region Name = myRegion1
> HitCountRam = 0
> HitCountAux = 38121
> ---------------------------LRU Memory Cache
> List Size = 0
> Map Size = 0
> Put Count = 50000
> Hit Count = 0
> Miss Count = 50000
> ---------------------------Indexed Disk Cache
> Is Alive = true
> Key Map Size = 37986
> Data File Length = 1438444745
> Hit Count = 38121
> Bytes Free = 37866
> Optimize Operation Count = 6411
> Times Optimized = 0
> Recycle Count = 6410
> Recycle Bin Size = 1
> Startup Size = 0
> Purgatory Hits = 0
> Purgatory Size = 0
> Working = true
> Destroyed = false
> Empty = true
> Queue Size = 0
> Queue Capacity = 50
> Pool Size = 0
> Maximum Pool Size = 15
> 
> ---------------------------
> Region Name = myRegion1
> HitCountRam = 0
> HitCountAux = 38121
> ---------------------------LRU Memory Cache
> List Size = 0
> Map Size = 0
> Put Count = 50000
> Hit Count = 0
> Miss Count = 50000
> ---------------------------Indexed Disk Cache
> Is Alive = true
> Key Map Size = 37986
> Data File Length = 1438444745
> Hit Count = 38121
> Bytes Free = 37866
> Optimize Operation Count = 6411
> Times Optimized = 0
> Recycle Count = 6410
> Recycle Bin Size = 1
> Startup Size = 0
> Purgatory Hits = 0
> Purgatory Size = 0
> Working = true
> Destroyed = false
> Empty = true
> Queue Size = 0
> Queue Capacity = 50
> Pool Size = 0
> Maximum Pool Size = 15
> 
> 
> Where is the mistake ?  Can somebody help ?
> 
> 
> ---------------------------------------------------------------------
> 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