4 Replies Latest reply: Aug 29, 2013 7:03 PM by rp0428 RSS

    fatjar(oneJar) running very slow

    986759

      Hi,

       

      The old fatjar (OneJar) that i built three years ago runs faster than the new fatjar that i built recently.
      In our production environment that new fatjar is running 4 times slower than the old jar.
      I built the old jar using RAD7 IDE but the new one is built using RAD8.

      The new jar has some new classes that support the new requirements.

      The old and the jars use the same JVM and JDBC driver.

      It is getting very hard to identify the reason for the slowness.

      Any suggestions from you all?

       

      Thanks

      Aadil

        • 1. Re: fatjar(oneJar) running very slow
          rp0428

          986759 wrote:

           

          Hi,

           

          The old fatjar (OneJar) that i built three years ago runs faster than the new fatjar that i built recently.
          In our production environment that new fatjar is running 4 times slower than the old jar.
          I built the old jar using RAD7 IDE but the new one is built using RAD8.

          The new jar has some new classes that support the new requirements.

          The old and the jars use the same JVM and JDBC driver.

          It is getting very hard to identify the reason for the slowness.

          Any suggestions from you all?

           

          Thanks

          Aadil

          Jars don't run fast or slow; they don't run at all. So saying a jar runs slow is totally meaningless.

           

          When you get different results it means that SOMETHING has changed. So you need to identify what has changed and which of those changes is contributing to the different results.

           

          You've already identified TWO things that have changed. First, you have new classes. Those could be a factor. Second you built the new jar using RAD8 so that could be a factor.

           

          You need to perform tests to rule those things out or confirm that they are the cause.

           

          1. Build the OLD jar using RAD7 and test it again. And I mean BUILD IT again from scratch - don't just use one you have lying around.

           

          2. If step 1 is ok then build the OLD jar using RAD8 and test it.

           

          3. Build the new jar using RAD8 without the new classes and test it.

           

          4. Build the new jar using RAD7 without the new classes and test it.

           

          5. Repeat steps 3 and 4 but WITH the new classes.

           

          You also need to confirm that NOTHING in the actual production environment has actually changed.

          • 2. Re: fatjar(oneJar) running very slow
            939520

            In addition to the above suggestions, I'd like to point out one of the bottlenecks I've often seen is how (badly) the SQL queries are written. A simple test would be to get the system time before an SQL query is run, and the system time after it runs, then take the difference. Another possible source of bottlenecks is excessive object creation. One or both of these issues may be related to the new classes.

            • 3. Re: fatjar(oneJar) running very slow
              986759

              I just ran the old and new jars in development environment but the processing output is same. Processing the same number of requests approximately in same time.

              I will do some more testing.

              Thanks for your help

              • 4. Re: fatjar(oneJar) running very slow
                rp0428

                986759 wrote:

                 

                I just ran the old and new jars in development environment but the processing output is same. Processing the same number of requests approximately in same time.

                I will do some more testing.

                Thanks for your help

                I didn't say ANYTHING about just 'running' the old and new jars. My comments were about testing by REBUILDING the old and new jars from scratch.