2 Replies Latest reply on Jun 18, 2014 9:22 AM by tomjenkinson

    How to accelerate JBoss TM when JTS is enabled

    cheezzario

      Hi.

       

      Let me describe my problem.

       

      Legacy C++ application consisting of several distributed components integrates with JBoss via CORBA. We use distributed transactions extensively.

      Obviously such setup requires JTS and all work well except the fact that EntityManager operations have been slowed down compared to JBoss w/o JTS ( up to 20 times slower )

       

      Could you provide some guidelines how to avoid such performance degradation?

       

      Also I'm thinking about disabling JTS and writing custom CORBA interceptor which can transform OTS propagation context to JTA transaction. Is this possible from JBoss TM architectural point of view?

       

      Regards, Andrey

        • 1. Re: How to accelerate JBoss TM when JTS is enabled
          ivagulin

          Have similar problem, easily demonstrated by application below:

          https://github.com/ivagulin/j2ee-domains

           

          Application has very simple post rest api method: it receives entity and persist it.
                  @POST
                  @Path("/create")
                  @TransactionAttribute(TransactionAttributeType.REQUIRED)
                  public void createDomain(Domain d) throws Exception {
                          em.persist(d);
                  }

           

          On default jboss-eap-6.2 with standalone-full.xml it handles ~3000 requests per second

          [root@centos-6 ~/j2ee-domains]# python test-add-zone.py --host=10.29.39.20 --iterations=50000 --concurrency=16
          3447.75776932 req/sec

           

          with jts enabled only ~100

          [root@ivagulin-set5-mn ~]# grep -P '(transactions=|jts)' /usr/local/pem/jboss-eap-6.2/standalone/configuration/standalone-full.xml
                          <initializers security="identity" transactions="on"/>
                      <jts/>

           

          [root@centos-6 ~/j2ee-domains]# python test-add-zone.py --host=10.29.39.20 --iterations=5000 --concurrency=16
          105.680888467 rec/sec

          • 2. Re: How to accelerate JBoss TM when JTS is enabled
            tomjenkinson

            Hi,


            The JTS implementation is slower than the local JTA implementation. An example of this is that the transaction manager will write a file per resource manager for preparing transactions. Most of these decisions are to support distributed nature of the implementations. There may be optimizations possible in this area for local transaction manager which can be discussed over in the Narayana forum (transaction manager implementation: Narayana) if you are interested.

             

            It is also possible that you are being hit by nagles algorithm: [JBPAPP-10603] Performance impact due to TCP_NODELAY in JacORB server socket - JBoss Issue Tracker

             

            Hope it helps,

            Tom