Whilst doing some Profiling on our code, I noted that (in some cases) much of the time taken to "get" from a Replicated Cache is spent on acquiring a Lease. My understanding of the Lease Model is somewhat limited to the following piece of documentation, so apologies if I'm asking ignorant questions:
Is there any further explanation on how this works? In particular, I'm wondering why Coherence would need to obtain a lease on a simple "get". My underlying data is read-mostly, write-rarely, and a low retrieval time is very important to the application. Is there any way of turning this off, and would it ever be advised?
Edited by: 899446 on 19-Nov-2012 04:38
Edited by: 899446 on 19-Nov-2012 04:39
9,996 µs - 100 inv. com.myproject.MyCacheDao.get + 9,446 µs - 100 inv. com.tangosol.coherence.component.util.SafeNamedCache.get ++ 8,825 µs - 100 inv. java.util.Map.get +++ 8,782 µs - 100 inv. com.tangosol.coherence.component.util.CacheHandler.get ++++ 8,728 µs - 100 inv. com.tangosol.coherence.component.util.CacheHandler.getCachedResource +++++ 7,182 µs - 100 inv. com.tangosol.coherence.component.util.CacheHandler.getLease +++++ 1,025 µs - 100 inv. java.util.Map.get
<coherence> <cluster-config> <services> <service id="1"> <init-params> <init-param id="lease-overflow"> <param-name>graveyard-size</param-name> <param-value>0</param-value> </init-param> </init-params> </service> </services> </cluster-config> </coherence>