Document ID: 0011
Topic: Java, JVM, HotSpot, Performance
Created: 2007-06-10
Last Updated: 2007-10-01
Author: Stefan Parvu
OS: Solaris

My Java application is very slow

Often people are talking about their Java applications running very slow in PROD environments, or test machines. As more and more services are built on top of JVM it seems reasonable to talk about this and list some common procedures for administrators or Java developers, how to troubleshoot and identify these issues. Even if some of these procedures will look more friendly to a system administrator anyone in the Java development team can start using these procedures.

It is as well very interesting to see Dynamic Tracing methods being used versus traditional profiling, so Java developers can easily pickup new methods of understanding their applications!

Table of Contents


Teams: Java Development, Support

Before you start debugging your application, make sure couple of things:

It is very important to have a tuning document where you record all these test cases and write down the findings.


When you run in troubles and would like to know how your application really works you basically need to profile it. There are many ways of doing this: using the default JDK tools, free available profiling tools or use a commercial one. Whatever you use it is very good that you know how to use the tool and how to interpret the results.

The standard Java edition, J2SE contains a default profiler option which can be used to profile your application. Im selecting to talk about this since it is very easy to use and it is more simple from administration point of view. In your case use whatever tool you will think will do your job easier and more flexible.

Dynamic Tracing

It is not always possible to profile directly to a production system, more you should be able to debug a live system as entire or only one or two processes. To do this, you can easily use a dynamic tracing framework, developed under Solaris 10, called DTrace. DTrace can easily be used hand in hand with Java. DTrace is well integrated with Java 6, for all the other versions you will need to load an agent during your application startup.

Teams: Java Development, Support

Back to main Java homepage

This document is Copyright (c) 2007 Stefan Parvu
Document License: PDL