Monitor Performance Of Your Java Programs Using Verbose

December 9, 2007 at 5:54 am (Java, Tips n Tricks)

Concerned about the memory usage of your java development ? Here is an option that allows you to monitor the performance. Garbage collection is performed automatically in java when the heap size exceeds a threshold percentage of available heap. Verbose comes in two parts – GC verbose and JNI Verbose. which allows us to monitor the internal functioning.

java -verbose:gc <class name>

java -verbose:jni <class name>

This even helps us to set the heap sizes of our application for best and efficient utilization of JVM. ( Setting heap sizes is also available in previous posts ) This may not work for light programs.

Note: Verbose was introduced in J2SE so it is not available in previous versions.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: