3 Replies Latest reply on Jun 1, 2005 11:46 AM by belaban

    Benchmark with Jboss Cache

    yos_titi

      Hi,
      I'm doing a benchmark for a very load application and I use Jboss cache as replicated cache within 3 application servers (OC4J).
      I hold a hash map with user names as key and server id as the value.
      In each login to the system I change the server id of the user in the cache.
      The operation without the cache intervention succeed to handle 340 HPS but with the cache option enable it barely handle 160 HPS.

      I use the fc-fast-minimalthreads.xml file for the jgroups configuration, the servers are Solaris V440 8GB ram, 4 1.3Ghz CPU with 1G lan.

      Does the lack in performance can be so dramatic?
      Does other configuration is prefer?

      Best Regards,

      Yossi

        • 1. Re: Benchmark with Jboss Cache
          belaban

          What's HPS (something per second) ?

          Do you have a test case ? Please create a JIRA issue and attach the testcase and your configuration

          • 2. Re: Benchmark with Jboss Cache
            yos_titi

            HPS - hits per seconds.

            it is very simple code...

            public class DistributedCacheManager {

            private static TreeCacheAop cache;
            private static HashMap users;
            private static final Fqn fqn = new Fqn("users");

            public static void init()
            {
            try {
            cache = new TreeCacheAop();
            PropertyConfigurator config = new PropertyConfigurator();
            config.configure(cache, "replSync-service.xml");
            cache.startService();
            //if the cache is empty --> init it
            if ( cache.getObject(fqn) == null){
            cache.putObject(fqn, new HashMap());
            }
            users = (HashMap)cache.getObject(fqn);
            }
            catch (Exception e) {
            Debugger.error("error while init cache: " ,e);
            }
            }

            public static HashMap getCache(){ return users; }
            }

            and in the login process:

            Integer serverID = new Integer((int)( Math.random() * 5 ));
            DistributedCacheManager.put( userName, serverID );

            • 3. Re: Benchmark with Jboss Cache
              belaban

              If you want us to look at it, could you please submit a *complete* test case, which spits out the HPS at the end of the run ?
              Thanks !