jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smuts, Aaron" <Aaron.Sm...@travelocity.com>
Subject RE: JCS Thread pool configuration
Date Thu, 15 Sep 2005 16:31:03 GMT
Yes.  72 doesn't sound that bad . . .

You can configure any auxiliary to use a thread pool of your
configuration.  

Send the part of your cache.ccf that deals with auxiliaries, and I'll
show you.


For example if you had a disk cache called DC2, you can tell it to use a
thread pool like this:

jcs.auxiliary.DC2=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
Factory
jcs.auxiliary.DC2.attributes=org.apache.jcs.auxiliary.disk.indexed.Index
edDiskCacheAttributes
jcs.auxiliary.DC2.attributes.DiskPath=target/test-sandbox/raf
jcs.auxiliary.DC2.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC2.attributes.MaxKeySize=10000
jcs.auxiliary.DC2.attributes.MaxRecycleBinSize=5000
jcs.auxiliary.DC2.attributes.OptimizeAtRemoveCount=300000
jcs.auxiliary.DC2.attributes.EventQueueType=POOLED
jcs.auxiliary.DC2.attributes.EventQueuePoolName=disk_cache_event_queue

# Disk Cache pool
thread_pool.disk_cache_event_queue.useBoundary=true
thread_pool. disk_cache_event_queue.boundarySize=75
thread_pool.disk_cache_event_queue.maximumPoolSize=10
thread_pool.disk_cache_event_queue.minimumPoolSize=1
thread_pool.disk_cache_event_queue.keepAliveTime=3500
thread_pool.disk_cache_event_queue.startUpSize=5
thread_pool.disk_cache_event_queue.whenBlockedPolicy=RUN


The above config would limit the disk cache to 10 threads, no matter how
many regions you have.  If you use the default pool, then you will have
as many threads as actively spooling regions.

If you use a boundary, the pool will not create any more threads until
it is reached.  If the max size is reached and the queue is at the
boundary, then this configuration will RUN the update in the current
thread.

Aaron

> -----Original Message-----
> From: chamesh rajasekhara [mailto:chamesh@hotmail.com]
> Sent: Wednesday, September 14, 2005 11:44 AM
> To: jcs-users@jakarta.apache.org
> Subject: JCS Thread pool configuration
> 
> We have got 18 cacheRegions and 4 hosts defined in production, we
would
> have
> upto 4x18  = 72  threads. (Thread names are
ElementEventQueue.QProcessor-
> n.)
> 
> Is there a way we can reduce number of threads for JCS, through
> configurable
> thread pools? Any idea.
> 
> Thanks!
> Chamesh
> 
> 
> 
> ---------------------------------------------------------------------
> 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