9 Replies Latest reply on Sep 4, 2002 3:16 PM by benw

    Performance 3.0 vs 2.4

      I have seen some posts about performance issues in JBoss 3.0 but they seem to be mainly concerned with CMP performance. I have a set of BMP entity beans that I have deployed under both 3.0RC1 and 2.4.4 and have also run into some performance issues. It's a bit difficult to get meaningful performance numbers but I have found that 3.0 is consistently slower than 2.4 with the difference increasing as the load JBoss increases.

      I have a test client that spawns threads that do read-only access of the beans. To put the server under load, I increase the number of threads that the client spawns. What I have found is that if I only spawn 1 thread, the amount of time to completion is about the same for both 2.4 and 3.0. As the number of threads increases, the amount of time for each thread to complete gradually increases but the rate of increase is much greater for 3.0 compared to 2.4. For example, if I spawn 20 threads, each thread takes about 33% longer to complete using 2.4 but with 3.0, each thread takes about 250% longer.

      To me, this indicates that 3.0 does not perform as well under load as 2.4 does. We are already running into performance issues with 2.4 and given the above results, I am concerned about what would happen if we move to 3.0 when it is officially released.

      Dan.

        • 1. Re: Performance 3.0 vs 2.4
          scoy

          Check the server.log for [DEBUG] messages. If you see these, then try changing the log threshold to INFO in conf/log4j.xml.

          • 2. Re: Performance 3.0 vs 2.4
            dsundstrom

            This is interesting, yet to vague to be useful. Could you get a copy of OptimizeIT and run some timing tests? When you figgure out exactaly what is slower post it.

            • 3. Re: Performance 3.0 vs 2.4

              Well, I've tried both suggestions given above.

              Bumping the log threshold so that only INFO messages are written to the server log did not make an appreciable difference.

              I'm not entirely certain how to interpret the results of running OptimizeIT. After a fair bit of poking around through the profiler snapshots I came across one glaring difference between 3.0 and 2.4. I'm not sure if this is the culprit but it looks like it might be.

              During the processing of a request, a call is made to

              sun.rmi.server.UnicastServerRef.dispatch()

              This method calls

              org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke()

              which ultimately calls the desired method on the bean, and

              sun.rmi.server.UnicastRef.unmarshallValue()

              In JBoss 2.4 the percentage of time taken up by these two calls is about 60% and 10%, respectively. In JBoss 3.0, on the other hand, the percentages are about 55% and 30% respectively. It seems that unmarshalling takes considerably longer in 3.0.

              Digging a little deeper, I discovered that the unmarshalling process in 3.0 uses a class that does not exist in 2.4:

              org.jboss.invocation.MarshalledInvocation

              whose readExternal method takes a whopping 25% of the time required to process the request.

              As I said above, I don't know if this is the cause of the performance hit or not but it does look like it to me.

              Dan.

              • 4. Re: Performance 3.0 vs 2.4
                dsundstrom

                Ok this is very helpful, but definately not a DB issue. I suggest you post your findings to the jboss-dev list, as they are currently working on tuning for the 3.0 release.

                • 5. Re: Performance 3.0 vs 2.4
                  townsendmerino

                  please post the command file used to start up JBoss 3.0 with Optimizeit.
                  Thanks

                  • 6. Re: Performance 3.0 vs 2.4
                    anand_sankaran

                    Did you get the startup script to start JBoss 3.0 with OptimizeIt?

                    thanks

                    anand

                    • 7. Re: Performance 3.0 vs 2.4
                      dsundstrom

                      I have been told that OptimizeIt comes with a JBoss startup script.

                      • 8. Re: Performance 3.0 vs 2.4
                        anand_sankaran

                        OptimizeIt ships with support for JBoss 2.2.4

                        I tried to modify the JBoss startup script for 3.0 to do the same things, but the JVM crashes with a hotspot error. The JBoss 2.2.4 script used by optimizeIt uses the -classic option and starts the server.

                        I use JDK1.4.0 with JBoss 3.0 and I can not disable the hotspot compiler here.

                        If some one has used JBoss 3.0 with optimizeIt, it would be great if you can share your startup script.

                        • 9. Re: Performance 3.0 vs 2.4
                          benw

                          Read the manual that came with OptimizeIt! I was able to get JBoss 3.0 working with OptimizeIt! in less than half an hour.

                          Good luck,
                          Ben