I am measuring cache lag in a 2-node cluster running JBC3/Hibernate with INVALIDATION_ASYNC like so:
1. update Entity A on cluster node N1
2. thinkTime //account for invalidation lag
3. get Entity A from N2 (and compare to value in 1.)
When thinkTime gets to 30ms comparison in #3 starts to fail. This is true when N1 and N2 are on different hosts on the same subnet *and* when they're both on the same host (so network latency isn't a problem). So, it seems, the time is either spend in JGroups or jbc3 code.
Given how small the load is, 30ms seems quite high and I'd like to understand what's going on. Given the config below, what lag would you expect to see? Where do you think most of the time is spent?
JBC 3.0.3.GA using MVCC, INVALIDATION_ASYNC
-using UDP multicast, multiple channels but shared transport
Tomcat 6 NIO
-using TRANSACTIONAL cache strategy
Hardware (single host):
3ghz intel core2 duo
Make sure you have enable_bundling="false" in your JGroups UDP protocol config. Otherwise JGroups delays sending messages until max_bundle_timeout="30" ms has passed or messages totaling max_bundle_size="64000" bytes have accumulated.
Using ASYNC with an entity or collection cache is not recommended.