[infinispan-dev] CD datastore inserts slow

Sanne Grinovero sanne at infinispan.org
Wed Jun 18 12:21:41 EDT 2014

Hi Ales,
I've looked at the benchmark.
The main problem is that the high amount of IndexWriter open/close
cycles are quite CPU intensive and also generate a huge amount of
temporary objects; as previously mentioned the easy workaround is to
write objects in batches or transactions, but we can do other
improvements too of course.

My mainline is ~320 seconds when running CapeDwarf as-is; when
reconfiguring the backend to use the more efficient Infinispan
IndexManager (as we had actually previously suggested!) we avoid the
open/close cost but we still have the synchronous flush, so
performance improves but is still not good: 215 seconds.

This last scenario is harder to improve further, as the bottleneck
becomes the chattiness of the Index storage in Infinispan, combined
with the CacheStore usage. We can change the default buffer sizes for
the index to improve it but it would be much more effective if you
could batch multiple changes together.
Also we should look at improving the CacheStore performance, which is
the main bottleneck, although its cost gets amplified by the
inefficient use we do at higher level.. I will try some more
experiments with this.

To compare, I reconfigured it to use local-only NTR backends (not
suited for clustering) and so doing I found another problem: all of
your caches are sharing the same index!
By reconfiguring each cache to use and independent path to isolate the
indexes, the benchmark completes in 20 seconds, and these remaining 20
seconds are all spent in CapeDwarf code, with some more object
allocations from Infinispan core.

So in short, even perfectly tuning indexing away, you can' t get
faster than 20 seconds without making some more changes in CD and
Infinispan Core as well.. would that be an acceptable goal?

Also, question: do you really need both clustering and the persistent
CacheStore for the TCK tests? disabling these aspects would massively
speedup the whole thing.


On 3 June 2014 19:39, Ales Justin <ales.justin at gmail.com> wrote:
> Here:
> ---
> I've added this test to GAE TCK:
> *
> https://github.com/GoogleCloudPlatform/appengine-tck/blob/master/core/benchmark/src/test/java/com/google/appengine/tck/benchmark/ObjectifyBenchmarkTest.java
> You need CapeDwarf 2.0.0.CR2:
> * http://capedwarf.org/downloads/
> And clone GAE TCK:
> * https://github.com/GoogleCloudPlatform/appengine-tck
> Run CapeDwarf:
> * https://github.com/capedwarf/capedwarf-blue/blob/master/README.md (see
> (5))
> Then run the ObjectifyBenchmarkTest:
> * cd <GAE_TCK_HOME>
> * mvn clean install
> * cd core/benchmark
> * mvn clean install -Pcapedwarf,benchmark
> Ping me for any issues.
> Thanks!
> -Ales
> On 03 Jun 2014, at 17:40, Sanne Grinovero <sanne at infinispan.org> wrote:
> Hi Ales,
> I don't have CD installed anymore but will try it out. Do you have
> some pointers to set up and run this benchmark?
> Sanne
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

More information about the infinispan-dev mailing list