6 Replies Latest reply on Jun 15, 2010 4:24 AM by Michal Szymanski

    JBoss Cache v3.2.1 - very BAD performance on puts

    Alexandre Verri Newbie

      Dear members,


      I'm testing JBoss Cache v3.2.1 and I've found that it has a very bad performance on puts, even with local caches.


      The test code is very simple:


      factory = new DefaultCacheFactory();

      cache = factory.createCache("./config/local.xml");



      for (int i = 0; i < 100000; i++) {

                  cache.put("/queue", "" + i, "value-" + i);



      The "for" loop above is performing very bad: the average throughput is about 1000 puts/sec on my laptop.

      The corresponding test with EhCache has the following value: 100000 puts/second on the same laptop.



      I'm using the configuration (local.xml) as bellow:


      <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.2">

         <!-- By not specifying the 'clustering' element, the cache runs in LOCAL mode. -->

         <!-- Configure the TransactionManager -->

         <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>



      Is there anything that I'm missing on configuration ?



      A. Veri