2010-11-16

JVM Tuning Foundation []

Moved to the page http://3rdstage.wikia.com/wiki/J2EE_Application_Tuning in my wiki as of 5th Oct. 2012.

Basic Glossary or Definition

Profiling

a form of dynamic program analysis that measures, for example, the usage of memory, the usage of particular instructions, or frequency and duration of function calls.

from Wikipedia

Debugging

a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected.

from Wikipedia

Tuning

the improvement of system performance.

from Wikipedia

Optimization

improving software to make it work more efficiently or use fewer resources.

from Wikipedia

Diagnosis

the identification of the nature and cause of anything.

from Wikipedia

Types of Diagnostic Information in IBM JVM

Javadump (Thread dump)

The Javadump is sometimes referred to as a Javacore or thread dump in some JVMs. This dump is in a human-readable format produced by default when the JVM terminates unexpectedly because of an operating system signal, an OutOfMemoryError exception, or when the user enters a reserved key combination (for example, Ctrl-Break on Windows®). It can also be generated by calling com.ibm.jvm.Dump.JavaDump() from inside the application. A Javadump summarizes the state of the JVM at the instant the signal occurred. Much of the content of the Javadump is specific to the IBM JVM.

Heapdump

The JVM can generate a Heapdump at the request of the user (for example by calling com.ibm.jvm.Dump.HeapDump() from inside the application) or (by default) when the JVM terminates because of an OutOfMemoryError exception. You can specify finer control of the timing of a Heapdump with the -Xdump:heap option. For example, you could request a Heapdump after a certain number of full garbage collections have occurred. The default Heapdump format (phd files) is not human-readable and you process it using available tools such as Heaproots.

System dump (Core dump)

System dumps (also known as core dumps on Linux® platforms) are platform-specific files that contain information about the active processes, threads, and system memory. System dumps are usually large. By default, system dumps are produced by the JVM only when the JVM fails unexpectedly because of a GPF (general protection fault) or a major JVM or system error. You can also request a system dump by calling com.ibm.jvm.Dump.SystemDump() from your application. You can use the -Xdump:system option to produce system dumps when other events occur

Garbage collection data

A JVM started with the -verbose:gc option produces output in XML format that can be used to analyze problems in the Garbage Collector itself or problems in the design of user applications. Numerous other options affect the nature and amount of Garbage Collector diagnostic information produced. See Garbage Collector diagnostics for more information.

Trace data

The IBM JVM tracing allows execution points in the Java code and the internal JVM code to be logged. The -Xtrace option allows the number and areas of trace points to be controlled, as well as the size and nature of the trace buffers maintained. The internal trace buffers at a time of failure are also available in a system dump and tools are available to extract them from a system dump. Generally, trace data is written to a file in an encoded format and then a trace formatter converts the data into a readable format. However, if small amounts of trace are to be produced and performance is not an issue, trace can be routed to STDERR and will be pre-formatted.

The above are cited from the diagnostic guide of IBM Java SDK which you can find from here.

0 comments:

Post a Comment