Welcome!

Java Authors: Pat Romanski, Hovhannes Avoyan, Bob Gourley, Andreas Grabner, Vivek Arora

Related Topics: Java

Java: Article

Diagnosing Performance Issues in Production Java Applications

Why better tools are needed

Java developers use a variety of tools to diagnose performance problems. These tools provide deep visibility into an application's runtime behavior, including an in-depth view into problem areas with exact line numbers and object values. However, these tools have traditionally been limited to development environments.

However, if one of your production applications is running slowly, you need a diagnostic tool you can use in a production environment. If a particular request is slow, you need to find the line of code or method that is causing the problem and identify the method arguments or method local variables. To determine which resources are causing the performance bottleneck, you need to find the objects causing the memory leaks in a production application. How can you detect and diagnose these performance issues in real-time, as well as diagnose similar problems that happened last night or last weekend?

Diagnosing performance problems in production environments without stopping the application or impacting performance is almost impossible. Developers and administrators have become accustomed to reproducing performance problems in development and test environments, where they can use heavy-duty diagnostic tools to achieve deep visibility. But reproducing the problems is difficult or even impossible because production workloads are different from testing or development environments.

Diagnosing performance problems in a production environment would save significant time, money, and energy. So why are current tools and technologies unable to provide deep Java granularity with very low overhead in production applications?

This article highlights the need for production diagnostics, reviews some of the existing Java monitoring and diagnostics tools, and suggests a new approach for production Java application monitoring and diagnostics.

Why Production Diagnostics?
Diagnosing performance problems in a production environment accelerates problem resolution drastically. IT teams save time and money with production diagnostics because they do not have to waste time reproducing performance problems. Production diagnostics empower IT operations teams to diagnose application problems, and free developers and architects to debug difficult problems. Let's first examine existing monitoring and diagnostic tools for Java-based applications.

JMX-Based Monitoring
Java Management Extensions (JMX)-based tools have low overhead and are often used to expose vital JVM statistics and application-specific metrics. Figure 1 shows a JMX-based monitoring console. Application administrators can establish baselines on JMX-based metrics and be alerted when the metrics are above their thresholds. These tools can provide limited visibility based on the kind of metrics exposed by the application and underlying Java container.

JMX monitoring provides valuable indicators when there is a possible application problem due to a threshold violation. But how do you find out what caused the metric to violate its threshold? Administrators depend on other tools and environments to diagnose the root cause.

More Stories By Rajagopal Marripalli

Rajagopal Marripalli is a principal product manager in the Oracle Applications and Systems Management division. His primary focus has been in the area of application performance management. He has more than 12 years of experience in the software industry in product development and product management. He has published papers and articles as well as presented technical seminars at conferences and user groups.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.