On 7 July 2014 09:14, Bela Ban <[email protected]> wrote: > > 1: Observation: > ------------- > In my Infinispan perf test (IspnPerfTest), I used > cache.getAdvancedCache().withFlags(...).put(key,value) in a tight loop. > > I've always thought that withFlags() was a fast operation, *but this is > not the case* !! > > Once I changed this and predefined the 2 caches (sync and async) at the > start, outside the loop, things got 10x faster ! So please change this > if you made the same mistake !
Right that's the better way to use the flags; I'm pretty sure we documented this at some point but I couldn't find it in the docs nor javadocs now...?!! bad bad. Where we do use flags internally (Lucene Directory), we hold on to multiple instances of the Cache, even if the same cache content but to use different flags. The code is quite horrible to read as it seems like you interact with different Caches, but as you noticed it's worth it. 10x faster? That's surprising for a benchmark which is supposed to be network bound isn't it? If you can measure a 10X improvement, it seems like your tests where bound by memory allocation (as that's the resource you starve by using _withFlags_ extensively) ? Might be worth checking with flight recorder if that's still the case, as _withFlags_ isn't sufficient on its own to saturate your memory bandwith, so I'd guess there are other hot consumers which might be easy to take down. > > 2. Question: > ----------- > In Infinispan 6, I defined my custom transport as follows: > <transport ... transportClass="org.perf.CustomTransport"/> > > This is gone in 7. Do I now have to use programmatic configuration ? If > so, how would I do this ? I don't know this one, hopefully others will.. ? Cheers, Sanne > > -- > Bela Ban, JGroups lead (http://www.jgroups.org) > _______________________________________________ > infinispan-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/infinispan-dev _______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
