Troubleshooting Performance and Memory Problems
When you encounter performance problems, you must first isolate the application that is causing the performance problems. You can stop the Redwood Server application in and monitor system performance to see if the problem is related to Redwood Server.
Once you have determined that Redwood Server is the cause of performance issues, you contact your Redwood support services representative.
To analyse memory-related issues, you can be asked to perform a thread or heap dump, also known as Javadump.
When Redwood support services request heap dumps, Redwood recommends you create at least three. The first should be created once the web application has initialized completely, the other at peak usage and the third as soon as response-times are very high. Remember that if you have been asked to create more, you should try to spread them evenly. Note also, that it is easier to analyse heap dumps when the difference in file size is big.
This topic concentrates on Sun/Oracle's JVM, if you are sing a JVM from another vendor, please consult the following topics:
Thread Dumps
Thread dumps contain information about the threads that are active at the time of the dump.
You use jvisualvm
to generate thread dumps, it is a gui tool. In the window, you locate the java process and choose Thread Dump from the context-menu. The Thread Dump file is stored in the temporary directory, for example /tmp/visualvm.dat/
on UNIX.
Heap Dumps
Heap dumps contain information about all objects that are referenced in memory at the time of the heap dump. This allows you to analyse memory usage and helps detect memory leaks.
note
Heap dumps can get very big and can cause temporary performance issues. You should not create heap dumps repeatedly within a short time-frame.
You can use one of the following commands, which are shipped with the JDK 11.
- jmap - command line tool
- jvisualvm - gui tool
You use jmap
as follows:
Locate the PID of the java
process that is running the application server, and perform the following:
jmap -J-d64 -dump:format=b,file=<filename> <pid>
You can also use jvisualvm
, it is a gui tool. In the window, you locate the application server process and choose Heap Dump from the context-menu. The location of the file containing the Heap Dump is printed on the Heap Dump tab.
Procedure
Create a Thread Dump with the SUN/Oracle JVM on GNU/Linux
- Open to
$JAVA_HOME/bin/jvisualvm
. - Locate the entry for your application server process.
- Choose Thread Dump from the context-menu.
Create a Heap Dump with the Sun/Oracle JVM on Microsoft Windows
- Open to
%JAVA_HOME%/bin/jvisualvm.exe
. - Locate the entry for your application server process.
- Choose Heap Dump from the context-menu.
See Also
- Troubleshooting Performance and Memory Problems with HP JVM
- Linux: Extensive Memory Usage or Out Of Memory Killer (OOMK) Termination
onsiteTopic