6 Replies Latest reply on Jan 22, 2014 1:20 AM by manmanlai

    Is PerRequestRuntimeManager helpful?

    manmanlai

      I am doing some performance testing on jBPM 6.0.0.Final. I have finished parts of work - a setup without database, but i met scale problems in the setup with database (Oracle11g).

      As the suggestion from Chapter 5. Core Engine API, I use PerRequestRuntimeManager both for with db and without db setup.

      For without db case, it works well; But for with db case, it is not scale at all.

       

      Some Code Pieces:

      KieServices ks = KieServices.Factory.get();

      KieContainer kContainer = ks.getKieClasspathContainer();

      kbase = kContainer.getKieBase("kbase");

      emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");

      builder = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder().entityManagerFactory(emf).knowledgeBase(kbase);

      manager =  RuntimeManagerFactory.Factory.get().newPerRequestRuntimeManager(builder.get(), "jbpm.benchmark");

      runtimeEngine = manager.getRuntimeEngine(null);

       

      I create manager when application startup, and create/dispose runtime engine per request.

      Any advice ? The performance can not scale when I increase request threads and tps is very low.

       

      /Xiang

        • 1. Re: Is PerRequestRuntimeManager helpful?
          swiderski.maciej

          what are the actual figures you see regarding performance? Could it be some data base tuning applied to increase the performance?

           

          If you use embedded jbpm then try upgrading to 6.0.1 which has quite few improvements when it comes to performance that was significantly enhanced when persistence and transaction mechanism was unified for runtime engine and task service.

           

          HTH

          • 2. Re: Is PerRequestRuntimeManager helpful?
            manmanlai

            I has wrote a simple standalone JSE application(embedded jbpm) and database is in another machine, and some test workflows(one only has start/end node, one has several manual task nodes). In non-perisist environment, it can reach 3000+ TPS. But in persist mode, it only can reach 10+ TPS.

             

            Besides to try 6.0.1, any other possibe causes? Do I need to optimize the database, such as add some indexes etc.

             

            /Xiang

            • 3. Re: Is PerRequestRuntimeManager helpful?
              swiderski.maciej

              try adding this index and see if that makes any difference:

              CREATE INDEX IDX_EVENTTYPES ON EVENTTYPES (INSTANCEID);


              HTH

              1 of 1 people found this helpful
              • 4. Re: Is PerRequestRuntimeManager helpful?
                manmanlai

                I have already tried it yesterday, because we met deadlock issue in Oracle Database.

                 

                Where I can download 6.0.1?

                 

                One more question, I did not create database manually, it is done by jba automaticlly everytime. Do you think we should use specific oracle schema to create one manually?

                 

                /Xiang

                • 5. Re: Is PerRequestRuntimeManager helpful?
                  swiderski.maciej

                  6.0.1 is available in maven repository.

                   

                  II hope you mean that you create schema once for entire test not for every iteration?! And using hibernate auto ddl is fine as far as can tell.

                   

                  HTH

                  • 6. Re: Is PerRequestRuntimeManager helpful?
                    manmanlai

                    I have upgraded to 6.0.1.Final, the performance is increased from 10+ to 230+ TPS, which is similar level as other workflow engines.

                    Thanks for your suggestions, it is worth to highlight for 6.0.1 as a huge performance improvement, well done!