Profiling Java Applications in Production Environments

August 19, 2018


The DevOps and SRE practices allow teams to achieve faster production problem resolution by encouraging collaboration and deeper understanding of the applications. This implies that the necessary production analysis tools are available.

Profilers are essential in optimizing and troubleshooting application performance; they provide code-level statistics on application execution. However, traditional profilers are mostly available for development environments. They should be manually attached to the applications locally or remotely and almost always have a very high overhead.

The problems usually manifest themselves in production environments. One reason is that the scale and the data are different in production, which are main causes of performance problems. Therefore, to find the root cause of a problem the application state should be reproduced locally on a developer machine or test environment, which is often impractical and sometimes even impossible.

With production profilers for Go, Node.js, Python and Java, Instana helps developers and operations teams to analyze performance problems as well as potential optimization spots directly in production and cloud environments. Skipping the problem reproduction step can significantly reduce MTTR and stimulate continuous performance improvements, leading, among other things, to infrastructure cost saving.

Using Instana’s Production Java profiler

To enable profiling, edit the agent configuration file

  enabled: true

See the documentation for detailed setup instructions.

After the application is started, the agent will start profiling the application automatically with low-overhead. The profiles will be sent to the Dashboard, where a timeline of various profiles can be analyzed at any time.

Instana Java Profiling Screen Shot

The Java agent currently supports CPU and lock profiling. It additionally reports JVM health metrics for CPU, memory, garbage collection, and more.

Play with Instana’s APM Observability Sandbox

There are multiple reasons why a program will consume more CPU resources than excepted. In the case of a high computational complexity of an algorithm, the amount of data it operates on...
Announcement, Developer, Product
PHP profiling is used by developers to identify performance issues or bottlenecks in their code. Profilers enable developers to drill into individual lines of code to ascertain which ones are running slow...
Announcement, Product
As you may have already heard from us back in December 2019, Instana has acquired StackImpact. During the last few months, we were working hard integrating StackImpact’s continuous profiling functionality to Instana,...

Start your FREE TRIAL today!

As the leading provider of Automatic Application Performance Monitoring (APM) solutions for microservices, Instana has developed the automatic monitoring and AI-based analysis DevOps needs to manage the performance of modern applications. Instana is the only APM solution that automatically discovers, maps and visualizes microservice applications without continuous additional engineering. Customers using Instana achieve operational excellence and deliver better software faster. Visit to learn more.