1 Reply Latest reply on Oct 24, 2003 1:46 AM by Jochen Cordes

    JBoss performance tuning for production

    equine Newbie

      Hi,
      I am running JBoss 3.2.1 with integrated tomcat 4.1.24.
      The jboss configuration is default except following changes.

      Database : Oracle 8
      commit option A as DB it is not shared by other apps.
      No web server for static contents. Tomcat is working as web server.
      Locking option: QueuedPessimisticLocking

      All our Beans are CMP except one or two which are BMP.
      JBossMQ is running with to post result to other server.
      in-memory Hypersonic database is running for JBossMQ.

      All our ejb-jar.xml and interfaces, Value Objects, Data Objects and facades are generated using xdoclet.

      All our get* methods are read only.

      To display all the products ( approx 2000 items) we are using findAll query. But this query takes long time and at last throws exception saying transaction deadlock occured.

      What are the ways to optimize the JBoss/Tomcat/EJBs?
      How to change the persistance storage for JBossMQ Hypersonic or in-memory Hypersonic to Oracle DB ?


      Thanks in Advance,

        • 1. Re: JBoss performance tuning for production
          Jochen Cordes Novice

          Hi !

          I would recommend the following settings:

          1) compile jboss with optimize turned on and debug turned off
          2) Use cache-invalidation configuration (container name is "Standard CMP 2.x EntityBean with cache invalidation") for CMP EB that may change
          3) Mark you RO Beans as read-only (xdoclet class-level)
          4) Change to org.jboss.ejb.plugins.lock.JDBCOptimisticLock and modified-strategy. How this will effect the performance of your app, you can see for yourself: Comment out EntityLockMonitor and BeanCacheMonitor in conf/jboss-service.xml. Then during some load tests you will notice how your beans suffer from heavy-locking. This will disappear when using optimistic locking for your most needed EB. Also try /web-console. For each Bean there are statistics about invocation time (quite useful for detecting bottlenecks ;-)).
          5) In Tomcat comment in the ajp13 connector as it is not needed in your case
          6) To change the database from Hypersonic to Oracle, declare a Oracle DB with DefaultDS and remove the one based on hypersonic. In jms/hypersonic-jdbc2-service.xml modify the settings for the PersistenceManager to match those for Oracle.
          7) Remove some services that are not needed (i.e. snmp.sar)
          8) Use a page-by-page display using JBossQL OFFSET/LIMIT syntax, calculating the number using a ejbSelect with COUNT.
          9) Use another vm (i.e. JRockit) and give her a lot of RAM.

          There could be more to think off. That's what's coming to my mind right now ...

          HTH,

          Jochen.

          BTW: JBoss 3.2.2 has quite some improvements regarding CMP speed. Give it a try (at least for development)