On 21 Jul 2010, at 19:29, Galder ZamarreƱo wrote:
On Jul 21, 2010, at 3:24 PM, Mircea Markus wrote:
> Hi,
>
> Eviction thread does two things right now:
> - evict stuff from DataContainer
> - purge entries from a CacheStore
>
> CacheStore.purge might slow down eviction as it is generally an expensive operation.
It might not even be needed, if the users don't use expiration.
It's not considered here, but I think it'd be hard to figure out that expiration
is not in use at runtime. You'd have to track calls with expiration and make sure
there's at least one expiration that has not expired. Probably not practical.
well spotted! Not hard to implement, and definitely simple for the users, as
doesn't need an additional config.
> What about:
> a) making EvictionThread.purgeCacheStore configurable.
> or/and
> b) use another thread for purging the store.
>
> This doesn't came out of the blue, there's a user that has eviction+cache
store configured with eviction thread wakeup set to 1 sec - he still gets OOM.
>
> Wdyt?
I think both are valid actually but let me be more precise.
More than making EvictionThread.purgeCacheStore configurable, I'd make expiration as
a whole configurable. So, if user does not use expiration, having expiration=false would:
- Disallow calls to overloaded cache methods taking expiration
- Do not check for expiration when entries are retrieved from memory/cachestore
- Don't do EvictionThread.purgeCacheStore
This would also make sure that the
user won't add expiry stuff by mistake.
I like both solutions :)
>
> Cheers,
> Mircea
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder ZamarreƱo
Sr. Software Engineer
Infinispan, JBoss Cache
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev