4 Replies Latest reply on May 24, 2016 1:22 PM by pbatiker

    How to confirm JVM Settings

    pandes3

      Hi,

       

      Needed some help here (Jboss AS 7.1, RHEL 6)

       

      I have updated the java options in standalone.conf file

       

      JAVA_OPTS="-Xms2048m -Xmx2048m -XX:MaxPermSize=512m -XX:ThreadStackSize=128"

       

      restarted the Jboss

       

      Now need to confirm the settings have effecctively updated, I run the following command "java -XshowSettings:all" , below is the output

       

      VM settings:

          Stack Size: 1.00M

          Max. Heap Size (Estimated): 1.71G

          Ergonomics Machine Class: server

          Using VM: Java HotSpot(TM) 64-Bit Server VM

       

      The stack size still it is showin as 1 MB and heap size as 1.71 G.

       

      why the settings have not been updated ? Am I looking at right place (java -XshowSettings:all) ?

       

      Help will be most appreciated

       

      Regards

       

      Avinash

        • 1. Re: How to confirm JVM Settings
          rhusar

          No, you are not.

           

          java -XshowSettings:all will start a new process and output infomation about that process. You would need to add that to JAVA_OPTS to be helpful. It will print out settings when you server starts.

           

          But I usually just look at what the process has been started with:

           

          [rhusar@rhusar wildfly-8.0.0.Beta1-SNAPSHOT]$ ps xafu | grep java
          rhusar   17974  147  2.5 3181648 204168 pts/3  Sl+  10:05   0:07  |       \_ /usr/java/latest/bin/java -D[Standalone] -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/home/rhusar/as/build/target/wildfly-8.0.0.Beta1-SNAPSHOT/standalone/log/server.log -Dlogging.configuration=file:/home/rhusar/as/build/target/wildfly-8.0.0.Beta1-SNAPSHOT/standalone/configuration/logging.properties -jar /home/rhusar/as/build/target/wildfly-8.0.0.Beta1-SNAPSHOT/jboss-modules.jar -mp /home/rhusar/as/build/target/wildfly-8.0.0.Beta1-SNAPSHOT/modules org.jboss.as.standalone -Djboss.home.dir=/home/rhusar/as/build/target/wildfly-8.0.0.Beta1-SNAPSHOT -Djboss.server.base.dir=/home/rhusar/as/build/target/wildfly-8.0.0.Beta1-SNAPSHOT/standalone -c standalone-ha.xml
          

           

          ...and I see the options kicked in.

          • 2. Re: How to confirm JVM Settings
            peterj

            And if you are using Windows and running Vista or a later version, you can find the command line in Task Manager on the Processes/Details tab (though you have to add the Command Line column). But that column has a limited lneght so not all of the ocmmand line will show; in that case get Process Explorer from systinternals, it will show you the complete command line.

             

            Also, another way to check the settings is to run JVisualVM and connect to the java process. JVisualVM will show you all of the settings.

            1 of 1 people found this helpful
            • 3. Re: How to confirm JVM Settings
              pandes3

              Hi Radoslav and Peter,

               

              Thank you for the info it was helpful.

               

              Regards

              • 4. Re: How to confirm JVM Settings
                pbatiker

                Hi Radoslav,

                 

                Do you think the allocated JVM memory will be blocked Java process?

                Because we have configured different JVM settings for different sites, to confirm this setting, we have verified the task manager it is reflecting in the Memory utilization column of the Java process.

                But it is not reflection in few configurations, is it not required?

                 

                Regards,

                Prasad Batikeru