Know your Default Initial and Max heap size of JVM

7 Jun

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)



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: