cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Vikram.Parmar
AppDynamics Team

As of August 2020, AppDynamics Java users don't need to choose between dynamic instrumentation and performance when running on IBM JVM

 

When using an AppDynamics Java agent with a newer IBM JVM, customers don’t have to choose between dynamic instrumentation or excellent performance. The newer releases for Java 8 don’t exhibit the same performance penalty when class retransformation is enabled.

 

Table of Contents

 

Context: Java agent performance issue with IBM J9 JVM Java 6

In the past, we discovered poor performance of IBM J9 JVM when the application ran with the AppDynamics Java agent. This poor performance, which could be visible as increased CPU usage and increased transaction latency, was often perceived as "Agent overhead,” and attributed to the AppDynamics Java agent.

 

But as a matter of fact, we also observed the poor performance occurred when the Java agent was entirely disabled

 

Performance root cause isolated and two Java agent versions provided

Through our investigation of the issue, we discovered a simple root cause: whenever an AppDynamics Java agent declared its ability to redefine or re-transform classes, the performance of the Java application code running in the JVM was affected, even if the retransforming functionality was never used, and also if the application code in question was not instrumented.

 

This observation led us to provide our customers with two versions of the Java agent:

  • a regular version with fully functioning dynamic instrumentation (based on class re-transformations) 
  • and an IBM-special version, which had this capability removed. 

 

We also added workarounds such as additional transformation rules and writing some runtime BCI rules to a filesystem. It left our customers using IBM JVMs with a choice: either they had dynamic instrumentation or excellent performance, but not both.

 

Support for Java 8+ makes performance trade-offs unnecessary

Since then, IBM has changed the implementation of their JVM. The release for Java 8 (and presumably later) does not exhibit the same performance penalty when class retransformation is enabled. When using an AppDynamics Java agent with a newer IBM JVM, customers do not have to give up anything; they can have it all.

 

Our three AppDynamics Java agent include support for Java 8+ as well as legacy versions

Starting August 2020, three versions of the AppDynamics Java agent will be generally available:

 

Standard
  • Recommended version for all customers who use Java 8 or later. 
  • It is fully featured, and it works with all supported JVMs.
Legacy
for Sun JVM
  • Version intended for customers who cannot upgrade their Java version in production and are still using Java 6 or Java 7, which is based on HotSpot (OpenJDK, Azul, SAP, etc.). 
  • This version supports dynamic instrumentation of classes.
Legacy
for IBM JVM
  • Intended for customers who cannot upgrade their Java version in production, and are still using IBM Java 6 or Java 7. 
  • This version does not support dynamic instrumentation to avoid the performance penalty introduced by the JVM when such capability is available.

 

Testing: Performance measurements by JVM version 

Below is an effort to quantify the performance impact based on the JVM version.

 

Test Methodology

The program used for this test comes from an old SPEC benchmark but is modified to inflate the execution time for better stability of the results. 

 

The program produces 500 high-resolution frames (images) using a rendering technique known as ray tracing. It uses only one thread that saturates a single CPU core during execution. The Java agent is present in the JVM without applying instrumentation, thus the overhead we see is purely as a result of turning on the re-transformation feature.

 

Test Results

JVM Release
EXECUTION TIME  (seconds)
Observed overhead
without the agent
with agent declaring class retransformation capability

IBM J9 Java 6

114.638

158.515

38.27%

IBM J9 Java 8

117.65

119.368

1.46%

Oracle HotSpot Java 8

   ^78.485

79.922

1.83%

 

^ Legend:

  • The test was specially selected to emphasize the impact of re-transformation capability between the agent types. 
  • Comparison of baselines execution times between JVM types is not recommended as these numbers are not representative of any "real world" application. In most cases, the observed overhead would be much lower. 
  • All runs used a 64-bit JVM running on RHEL 7.

 

Additional Resources

IBM Java Agents

 

Version history
Last update:
‎10-28-2020 08:31 AM
Updated by:
On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here