1 Reply Latest reply on Mar 20, 2009 12:16 PM by brian.stansberry

    expected lag with INVALIDATION_ASYNC?

      I am measuring cache lag in a 2-node cluster running JBC3/Hibernate with INVALIDATION_ASYNC like so:

      loop:
      {
      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.)
      4. thinkTime
      }

      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?

      My stack:
      JBC 3.0.3.GA using MVCC, INVALIDATION_ASYNC
      JGroups 2.7.0.GA
      -using UDP multicast, multiple channels but shared transport
      Tomcat 6 NIO
      Hibernate 3.3.1
      -using TRANSACTIONAL cache strategy
      Spring 2.5.6

      Hardware (single host):
      3ghz intel core2 duo
      4gb ram
      vista




        • 1. Re: expected lag with INVALIDATION_ASYNC?
          brian.stansberry

          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.