11 Replies Latest reply: Oct 26, 2010 9:25 AM by Michal Szymanski RSS

    Bad performace in cluster.What is wrong?

    Michal Szymanski Newbie

      Hi

      Recently we have made small test of Infinispan performance in a cluster and we have had got very bad performance andI have no idea what is wrong.

      For one node we get about 50-100 thousands of put per seconds what is very good result bu when we add at least one more node (on the same serverer) performance is about 1-3 thousends per second We make test on Core2Duo and we are usng  Infinispan 4.1.

      Our program looks like this (Eclipse project and runnable jar file in attachments):

       

      GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
      GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
      gc.setClusterName("TestCluster");   
      Configuration c = new Configuration();
      c.setCacheMode(Configuration.CacheMode.DIST_SYNC);   
      c.setNumOwners(2);
      EmbeddedCacheManager cm = new DefaultCacheManager(gc, c);
      Cache defaultCache = cm.getCache();    

       

      and

       

      Random generator2 = new Random( );
      long start = System.currentTimeMillis();
      double num=100000;
      int r=0;
      String key="";
      for (int i=0; i<num; i++){
          key = "test" + generator2.nextInt();
          defaultCache.put(key, new Integer(i));
      }
      System.out.println("msg/sec=" + num/ ((double)(System.currentTimeMillis()-start)/1000));