Skip to main content

Posts

Showing posts with the label heap

Java Heap Dump Analyzer

Overview Identifying reason for the out of memory error of java applications with larger heap size may be one of the nightmares of a developer, because most of the out of memory situations may not be identified during the testing phase. It may occur only in production after running for a long time. The purpose of this article is to explain the use of Heap analyser tool to identify the memory leakage of larger enterprise java applications, which uses larger size of heaps. Before going to the details we will discuss about following points.          Heap       Garbage Collection           Out of memory What is heap? The space used by the Java Runtime to allocate memory to Objects and JRE Classes is called Heap. The heap space can be configured using the following JVM arguments. o    -Xmx<size> - Setting maximum Java heap size o    -Xms<size> - Setting initial Java...

Visual VM tutorial

VisualVM is a visual tool available with JDK to monitor and analyze the performance of Java applications. Accessing Visual VM  In Windows   /bin/jvisualvm.exe  In Linux  /bin/jvisualvm  By default the Locally executing Java applications will be listed under Local node of Visual VM Visual VM – Remote Monitoring The following steps will help the user to monitor the remote application from windows machine Step 1 : Add following in remote application JVM argument -Dcom.sun.management.jmxremote.port=5555 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Step 2 : Add Remote Host in local Visual VM Step 3: Step 4:   Step 5 : Enter the JMX port given as JVM argument Step 6 : Double click on the newly added node  This will display the JVM details in the right hand side.