-
1. Re: Good locking strategy to use for performance(when only one node writes to a cache) ?
galder.zamarreno Feb 21, 2012 2:38 AM (in response to sudheerk84)Eager locking you should use if you expect high contention, i.e. if you're keeping a shared counter in the cache. Explicit or implicit depends on whether you wanna control the locking space from your code, or let each cache.put call result in explicit locking.
To start, you should leave lock striping as is, which is turned off.
-
2. Re: Good locking strategy to use for performance(when only one node writes to a cache) ?
sudheerk84 Feb 21, 2012 4:16 AM (in response to galder.zamarreno)Isnt setting these two flags true a better stratergy when only one node is writing. - USEEAGERLOCKING and EAGERLOCKSINGLENODE ?
Now there shoudl never be any remote calls for locking which shoudl also improve my performance drastically ?
-
3. Re: Good locking strategy to use for performance(when only one node writes to a cache) ?
galder.zamarreno Feb 21, 2012 11:14 AM (in response to sudheerk84)IIRC, eager locking single node is deprecated since in Infinispan 5.1, locks are only acquired in a single node anyway.
-
4. Re: Good locking strategy to use for performance(when only one node writes to a cache) ?
sudheerk84 Feb 21, 2012 11:33 AM (in response to galder.zamarreno)We are currently using infinispan 5.0. Currently with 5.0 , teh behaviour i see is , local locks are taken , and when transaction is commited it tries to get remote locals .
" locks are only acquired in a single node anyway." - Does this mean with teh latest version you never check if a cache entry is being updated remotely in teh same time ? How can you achive consistency without this ?
[ Assuming we use pessimistic locking ]