Know your Default Initial and Max heap size of JVM

June 7, 2012 | By kiranbadi1991 | Filed in: Development, Environment, Memory, Others, Performance Engineering.

At times it becomes necessary that we know the default heap size allocated to the JVM in order to debug some issues, for those cases, I suggest run the below command on the command line of the server box to get this information,

java -XX:+PrintCommandLineFlags -version

 

On my machine, where I have tomcat server installed, I get the information something like,

 

C:\Users\kiran>java -XX:+PrintCommandLineFlags -version
-XX:InitialHeapSize=16777216 -XX:MaxHeapSize=268435456 -XX:+PrintCommandLineFlag
s -XX:-UseLargePagesIndividualAllocation
java version “1.6.0_32”
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) Client VM (build 20.7-b02, mixed mode, sharing)

 


Tags: , , ,

Comments are closed here.