Database Reference
In-Depth Information
Java Performance Troubleshooting Tools
SAP provides a number of tools for troubleshooting performance issues in the Java stack.
Wily Introscope is one of the best tools to study the internals of the J2EE engine, and it cap-
tures and presents graphs on such important areas as heap utilization, garbage collection,
thread count utilizations, and response times. In addition to this tool the following dump and
memory analysis tools are helpful for diagnosing complex performance issues in the Java
stack.
Heap Dump
Heap dump will allow you to understand the usage of the heap size in greater detail and will
help to diagnose the root cause of an issue. In order to generate a heap dump, add the para-
meter -XX:+HeapDumpOnOutOfMemoryError to the Java parameter using the configura-
tion tool. This will automatically write a heap dump file in out-of-memory situations at the
following location:
The heap dump files are extremely large and cause the Java system restart to hang as a
result of disk space getting completely filled up. You can set an alternative path for the loca-
tion of the heap dump file by setting the following Java parameter using the configuration
tool:
Heap dumps are binary profiles and need specialized memory analysis tools to perform
additional troubleshooting activities. Heap dumps contain a snapshot of all the Java objects
that are active or alive at the time of the dump. The file can be sent to SAP for additional
analysis to identify the root cause of the issue.
Thread Dump
Sometimes the Java application has issues with individual threads hanging, and an internal
view of the thread will be helpful in understanding the root cause of the issue. There are
several ways to generate a thread dump. One of the easiest ways is to use the JCMON tool.
Call the JCMON tool at the operating system level, and choose menu path 20 (Local Ad-
ministration Menu). Next choose the option dump stacktrace menu by entering the number,
selecting the server process by entering the value from the Idx column, and confirming the
server process by choosing Yes.
For Sun and HP JVMs, the thread dump file is written at the following location:
For IBM JVMs the thread dump file is written at the following location:
Search WWH ::




Custom Search