8 Replies Latest reply on Jan 27, 2011 10:16 AM by Charisse Hanson

    Performance impact of using jvm option -Xdebug on JBoss 4.0.2

    Charisse Hanson Newbie

      Hello all,

       

      I have a curious question regarding why setting the '-Xdebug' in the jvm options would result in increased performance, particularly with EJB processes.

      My application is a java web application, deployed using JBoss 4.0.2. I am running it from the console, using the run.bat file. My jdk is 1.5, update 7.

       

      Here are my jvm options without -Xdebug in my run.bat:

       

      JAVA_OPTS: -server  -Dprogram.name=run.bat -Xmx1024M -Xms512M -XX:MaxPermSize=256m -Dinnoprise.tomcat.version=5  -Djava.compiler=NONE

       

      A particular process within the application I'm testing this on would load in about 32 seconds with the above jvm options.

       

       

      Now, if I add the -Xdebug in my run.bat:

       

      JAVA_OPTS: -server  -Dprogram.name=run.bat -Xmx1024M -Xms512M -XX:MaxPermSize=256m -Dinnoprise.tomcat.version=5  -Xdebug -Djava.compiler=NONE

       

      The same process re-tested, would load in 13 seconds!

       

       

      If anyone can share their thoughts with this, it is very much appreciated.

      I have been researching this without much luck, as to why enabling remote debugging would have this effect.

       

      Many thanks!

        • 1. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
          Wolf-Dieter Fink Master

          Are you sure that you are testing with the same environment (e.g. systemload, jboss not directly after startup, GC behaviour).

          It might falsificate your measurement significant.

          Is the startup also faster with -Xdebug?

           

          IMHO the option should not have such effect.

          • 2. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
            Charisse Hanson Newbie

            Hi Wolf-Dieter,

             

            Yes, this is the same environment/system. My test system uses XP 32bit.

             

            What I'm literally doing is:

             

            - Start JBoss from run.bat without -Xdebug in the jvm options.

            - Test the application's process

            - Stop JBoss, modify the run.bat, add -Xdebug in the jvm options

            - Start JBoss again from run.bat

            - Test the same exact application's process

             

             

            I completely agree this does not make sense that it would affect performance.

            However, I have been able to reproduce this same results in 2 separate production environments that run in Windows Server 2003 64bit as well, and those are using JDK 1.6, release 18.

            • 3. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
              Charisse Hanson Newbie

              Also (forgot to add in the above reply) the deployment is much faster with -Xdebug as well.

               

              Many thanks.

              Very curious issue indeed.

              • 4. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
                Wolf-Dieter Fink Master

                Mmmmh, sounds strange to me.

                I havn't this behaviour on my system (ATM Win7).

                I try to check tomorrow with Linux/Solaris if I have a bit time ...

                • 5. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
                  Charisse Hanson Newbie

                  Hi Wolf-Dieter,

                   

                  Many thanks for the reply.

                   

                  A co-worker is helping me investigate this issue. I have shown her the performance difference when the JBoss is ran from my machine, with the -Xdebug difference in the jvm options, everything else is the same.

                   

                  My system is running on:

                   

                  Windows XP Professional (32bit)

                  Version 2002

                  Service Pack 3

                   

                  Intel Core2 Quad CPU Q6600 @ 2.40 GHz

                  2.41 GHz, 3.25GB RAM

                   

                   

                   

                  Her system is using a different OS, and I sent her my run.bat file so she can test on her JBoss.

                  She's also using JBoss 4.0.2, her JDK is also the same as my local environment - 1.5, r7.

                   

                  When she adds the -Xdebug vs without it, there is little to no change when testing the same exact application process.

                   

                  Her system information is:

                   

                  Vista Home Premium

                  Service Pack 2

                  64bit

                   

                  IntelR Core (TM) 2 Duo CPU T6400 @ 2.00 GHz

                  4.00 GB RAM

                   

                   

                   

                  The OS seems to be a factor. I have a windows 7 install, however it is not set up for development. I'll try to get that set up and do some testing there. Although I wouldn't be surprised if I get the same results as you did testing on your Windows 7.

                   

                   

                  Many thanks!

                  • 6. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
                    Charisse Hanson Newbie

                    I re-worded my search, and it appears I am not the only one that has come across this before!

                     

                    http://community.jboss.org/message/220221

                    • 7. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
                      Wolf-Dieter Fink Master

                      I try with JBoss5.1/Java 1.6.0_23 and WinXP-SP3 and there is no big difference if I toggle the -Xdebug.

                      So maybe the new java version is different in that point, or it depends to some other parameter whether the debug option will change the performance.

                       

                      I'll keep in mind (such curious things are interesting).

                      But IMHO the 'performance boost' should be handled with care in production, I suppose that there are drawbacks (e.g. memory consumption) if the server run a long time or you use more CPU (wich can be better if JBoss is the only app on the server ;-) )

                      • 8. Performance impact of using jvm option -Xdebug on JBoss 4.0.2
                        Charisse Hanson Newbie

                        Hi Wolf-Dieter,

                         

                        Many thanks for your help investigating this!

                         

                        As you've suggested, at this point I believe there's the platform, as well as the JBoss version, that seem to be factors with this. We're still using the 4.0.2, and this issue may very well have been fixed with the newer versions. I will try and test this with a 5.xx version of JBoss in the near future.

                         

                        And I totally agree - I've kept those 2 production environments I've implemented this on under surveillance the last couple of days now, and will keep monitoring this for the next week or 2. This performance gain is just totally backwards, so I'm proceeding with extreme caution on this. So far the CPU, memory usage have been well with-in normal levels, the CPU load specially, even during peak production hours when they have more users logged into the system are doing heavy processing with in the application.  And yes, these servers are dedicated to run our applications as well.

                         

                        One more, many thanks!