6 Replies Latest reply on Nov 3, 2008 11:01 AM by Peter Johnson

    JVM arguments for increasing performance of JBoss.

    Daniel Genkin Newbie

      Hello,

      We are using JRockit with JBoss 4.2.3-GA.
      We use the following arguments to start JBoss. These parameters helped us to increase performance of JBoss, though they might not be perfect and if anyone can suggest something better that would be great.

      JAVA_OPTS=" -Xms2047M -Xmx2047M -jrockit -Xgc:parallel -Xverbose:memory -Xgcreport -XXaggressive -XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling -Djava.security.policy=$JAVA_HOME/lib/security/java.policy"


      As you can see these arguments are specific for JRockit jvm.
      For the experiment we might switch from JRockit to SUN JVM.

      These arguments:
      Xgc:parallel -Xverbose:memory -Xgcreport -XXaggressive -XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling
      are specific for JRockit JVM and in SUN they are defined differently. I have found some SUN equivalents, but not 100% sure they are correct.

      Can anyone please advice on SUN equivalents for these JRockit arguments?

        • 1. Re: JVM arguments for increasing performance of JBoss.
          Peter Johnson Master

          Rather that telling you the Sun equivalents that you already know about, why don't you list the ones you already found, then we can tell you if they are correct.

          I assume you have seen http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

          • 2. Re: JVM arguments for increasing performance of JBoss.
            Daniel Genkin Newbie

             

            "PeterJ" wrote:
            Rather that telling you the Sun equivalents that you already know about, why don't you list the ones you already found, then we can tell you if they are correct.

            I assume you have seen http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp


            Peter,

            I could not find SUN equivalents for
            XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling
            Please help me out here.

            This is what i have come up with for SUN (are they correct?):
            JAVA_OPTS=" -Xms2048M -Xmx2048M -server -XX:+UseParallelGC -verbose:memory -XX:+PrintGCDetails -XX:+AggressiveOpts -Djava.security.policy=$JAVA_HOME/lib/security/java.policy "

            JRockit:
            JAVA_OPTS=" -Xms2048M -Xmx2048M -jrockit -Xgc:parallel -Xverbose:memory -Xgcreport -XXaggressive -XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling -Djava.security.policy=$JAVA_HOME/lib/security/java.policy "

            thank you

            • 3. Re: JVM arguments for increasing performance of JBoss.
              Peter Johnson Master

               

              I could not find SUN equivalents for
              XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling


              I do not know of any equivalents to these in Sun's JVM.

              The ones you have set look fine, though I want to caution you about using -XX:+AggressiveOpts - this option sets a number of other options so you should always list it first otherwise it might undo options set before it. Also, the AggressiveOpts are tuned for a specific benchmark and might not be the best settings for your app, but you can find that out only by trying with and without it.

              • 4. Re: JVM arguments for increasing performance of JBoss.
                Daniel Genkin Newbie

                 

                "PeterJ" wrote:
                I could not find SUN equivalents for
                XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling


                I do not know of any equivalents to these in Sun's JVM.

                The ones you have set look fine, though I want to caution you about using -XX:+AggressiveOpts - this option sets a number of other options so you should always list it first otherwise it might undo options set before it. Also, the AggressiveOpts are tuned for a specific benchmark and might not be the best settings for your app, but you can find that out only by trying with and without it.


                thanks Peter for your insight and help.

                Does anyone know SUN equivalents for the following JRockit arguments?:
                XXlazyunlocking -XXtlasize:min=4k,preferred=512k -XXcallprofiling


                • 5. Re: JVM arguments for increasing performance of JBoss.
                  Daniel Genkin Newbie

                  Peter,

                  What do you think about the following JAVa arguments?:

                  JAVA_OPTS=" -Xms1024M -Xmx1024M -server -XX:+AggressiveOpts -XX:PermSize=64m -XX:MaxPermSize=128m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:SurvivorRatio=8 -XX:+UseParallelGC -verbose:memory -XX:+PrintGCDetails -Djava.security.policy=$JAVA_HOME/lib/security/java.policy "

                  I have started jboss with this configuration on test environment right now. The apps seem to work a little faster, but i will have my QA team do load testing next week and try killing jboss and check performance.

                  I am new to JVM tuning, so I am experimenting right now and trying to find the optimum between performance and stability.

                  thank you in advance!

                  • 6. Re: JVM arguments for increasing performance of JBoss.
                    Peter Johnson Master

                    Yes, that set of options is a good starting point for load testing.