On 25 Oct 2010, at 11:46, Mircea Markus wrote:
On 25 Oct 2010, at 09:56, Galder ZamarreƱo wrote:
>
> On Oct 24, 2010, at 10:41 PM, Vladimir Blagojevic wrote:
>
>> User on a forum complained seeing eviction thread per created cache [1]. Although
global configuration settings are shared amongst all caches created in CacheManager each
created cache gets a fresh copy of these global elements?! Each created cache therefore
indeed gets a new eviction executor service with one running thread. Does that mean that
by default we also create one async transport executor per cache with 25 threads spinning?
>>
>> If so, we should tell users that running more than two dozen caches per
CacheManager is going to impact the system significantly.
>>
>> [1]
http://community.jboss.org/thread/157913
>
> This is not down to the user. It's the 2LC case where there's a cache per
each entity/collection type. So, if you have a lot of entities/collections in your case,
you'll get this effect.
>
> Expiration is set on per cache level, but maybe we need a more clever way for cache
manager to manager expiration when two or more caches shared the same expiration settings.
Or more simply, manage expiration at the cache manager level.
Expiration runs from eviction thread. It is possible to share the same eviction thread
between multiple caches by writing a custom ScheduledExecutorFactory and specify it in the
global evictionScheduledExecutor.
Hmm, shouldn't this be the default? :/
It is true that the global component is a singleton, in this case the global component is
the DefaultExecutorFactory.
http://fisheye.jboss.org/browse/Infinispan/branches/4.2.x/core/src/main/j...
But the factory creates a *new* executor each time it is asked for one.
Perhaps we need a DefaultSharedExecutorFactory, which should be the *real* default?
Cheers
Manik
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org