2 Replies Latest reply on Jul 18, 2011 10:28 AM by lampsound

    JBoss 6 + MT EJB Client -> 50 concurrentCalls only

    lampsound

      Hi all,

      Last week i'm trying to understand "strange" behavior of JBoss 6.0 with multithreaded EJB client. My task is to measure peak loads under our test environment.

       

      My test case is:

      1. JBoss 6.0.0.Final, with Xmx=2048M and tuned remoting-jboss-beans.xml:

      <entry><key>maxPoolSize</key> <value>3000</value></entry>
      <entry><key>clientMaxPoolSize</key> <value>500</value></entry>
      

       

      2. Debian Linux OS, tuned in /etc/security/limits.conf and ulimit

      3. Deployed EAR with some Stateless-beans. Beans annotated with:

      @Pool(value = PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX, maxSize = 5000, timeout = 1000)
      

       

      4. EJB-client, that starts 1000 of Threads. In each thread i have a while(true) cycle that calls method of my Bean (through remote interface):

       

       final Properties props = new Properties();
              props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
              props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
              props.setProperty("java.naming.provider.url", "jnp://addr:1099");
      
              return new Runnable() {
                  public void run() {
                      try {
                          InitialContext ctx = new InitialContext(props);
                          MainService mainService = (MainService) ctx.lookup("ejbTest/MainService");
                          ctx.close();
      
                          while (true) {
                              try {
                                  long start = System.currentTimeMillis();
                                  ProcessingResult process = mainService.process();
                                  long end = System.currentTimeMillis();
                                  long time = end - start;
                                  times.add(time);
                              } catch (Exception e) {
                                  e.printStackTrace();
                              } finally {
                                  tps.incrementAndGet();
                               }
                          }
                      } catch (Exception e) {
                          e.printStackTrace();
                      }
                  }
               };
      
      
      
      

       

      The Main Problem is i can't achieve performance higher than 700 transactions per second. JMX-console shows me, that concurrentCalls  of my bean is just around 50:

      sshot-1.png

      Any tricks and tuning of known and described in JBoss-books parameters/pools doesn't change this situation - this number 50  is like a internal JBoss magic

       

      Also i found, that access to this Stateless-bean through web-service doesn't limited to 50 instances. Via webservices i have around 2500 transaction per seconds and ~1000 beans in pool.

       

      Any thoughts about this situation are welcome!