All Products
Search
Document Center

Application Real-Time Monitoring Service:Continuous profiling for Java applications

Last Updated:Apr 09, 2026

Continuous profiling helps you identify performance bottlenecks in your Java applications caused by high CPU, memory, and I/O usage. It provides detailed statistics categorized by method name, class name, and line number. This data allows you to optimize your code, reduce latency, increase throughput, and save costs. This topic describes how to enable continuous profiling in ARMS and view the collected data.

Important

ARMS application monitoring offers a new monitoring details page for users who have enabled the new billing model. For more information about the new billing model, see Product billing (New).

If you are using the old billing plan, you can switch to the new monitoring details page by clicking Switch to New Version on the Application List page.

Performance tests show that when continuous profiling is fully enabled for a typical Spring web application, it introduces approximately 5% CPU overhead and 50 MB of off-heap memory overhead. The impact on garbage collection (GC) and request latency is negligible. For more details, see the Continuous Profiling Performance Test Report for Java Agent 4.x.

Prerequisites

Important
  • The continuous profiling feature is available only in the Expert Edition and the new billing model based on observable data volume. To upgrade to the Expert Edition, see pay-as-you-go. To switch to the new billing model, see Change billing method.

  • Profiling data is stored for up to 7 days.

  • You have connected your application to ARMS application monitoring and upgraded the agent to version 2.7.3.5 or later. For instructions, see Connect an application to application monitoring and Upgrade the ARMS agent.

  • If your application is deployed in a VPC that has a policy restricting access to Alibaba Cloud Object Storage Service (OSS) buckets, you must update the policy. Continuous profiling uploads data to a dedicated ARMS OSS bucket for storage and processing. To ensure successful data collection, add the ARMS profiling bucket (arms-profiling-<regionId>) to your policy's allowlist. Replace <regionId> with the ID of the region where your application is deployed. For example, if your application is in the China (Hangzhou) region, the bucket name is arms-profiling-cn-hangzhou.

  • Continuous profiling currently supports only OpenJDK and Oracle JDK. It does not support IBM OpenJ9 or Oracle GraalVM JDK.

Limitations

Operating system kernel

Linux kernel 2.6.32-431.23.3.el6.x86_64 or later.

Note

Run the uname -r command to check your current kernel version.

JDK version

The continuous profiling feature of ARMS uses the Java Virtual Machine Tool Interface (JVM TI) to get your application's method stacks, which provide details on runtime CPU and memory usage. A known crash issue exists in JVM TI that can cause application failures. This issue is fixed in OpenJDK 8u352, 11.0.17, and 17.0.5, and in Oracle JDK 11.0.21 and 17.0.9. Although ARMS team tests show that this issue is rare and triggered only in specific scenarios, using older JDK versions poses a stability risk. ARMS does not prevent you from enabling continuous profiling on unsupported JDK versions. You can enable the feature temporarily and limit its scope by using an IP whitelist. However, for application stability, we strongly recommend that you upgrade your JDK to a supported version. Using continuous profiling with an older JDK version may cause your application to crash.

Continuous profiling requires debug symbols in the JDK. Alpine base images, which are optimized for size, often strip these debug symbols, which can prevent the feature from working correctly. To use this feature, we recommend using a non-Alpine base image.

Recommended JDK versions:

JDK type

Version

OpenJDK

  • OpenJDK 8u352+

  • OpenJDK 11.0.17+

  • OpenJDK 17.0.5+

Oracle JDK

  • Oracle JDK 11.0.21+

  • Oracle JDK 17.0.9+

Enable continuous profiling

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select a region in the top navigation bar, and then click the name of your application.

    Note

    The icons in the Language column have the following meanings:

    Java图标: A Java application connected to application monitoring.

    image: A Go application connected to application monitoring.

    image: A Python application connected to application monitoring.

    -: An application connected to Trace Explorer.

  3. In the top navigation bar, choose Configuration > Custom Configurations.

  4. In the Continuous Profiling section, turn on the main switch and configure the IP whitelist or IP range.

  5. Click Save.

View continuous profiling data

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select a region in the top navigation bar, and then click the name of your application.

    Note

    The icons in the Language column have the following meanings:

    Java图标: A Java application connected to application monitoring.

    image: A Go application connected to application monitoring.

    image: A Python application connected to application monitoring.

    -: An application connected to Trace Explorer.

  3. In the top navigation bar, choose Application Diagnostics > Continuous Profiling.

  4. In the instance list on the left, select an instance. Then, in the right-side pane, specify a time range.

  5. On the Query tab, you can filter data and view an aggregate analysis.

    数据展示

    1. In the Time window size area (section ①), select a snapshot duration, and then drag the pointer over the chart to select a time range.

    2. From the drop-down list in section ②, select a data type: CPU, JVM Heap, or JVM GC.

    3. Section ③ displays a list of snapshots within the selected time range. Click Aggregate analysis in the upper-right corner to view snapshot details.

      Figure 1. Performance analysis性能分析

      • The Self column shows the time or resources consumed by the method, excluding its child methods. This helps you identify methods that consume significant resources.

      • The Total column shows the time or resources consumed by the method and its child methods. This helps you understand which methods contribute the most to the overall execution time or resource usage of the call stack.

      To identify specific code hotspots, focus on the Self column or examine the wider flames at the bottom of the flame graph on the right. A wide flame indicates a root cause of high resource consumption and often indicates a system performance bottleneck.

      Figure 2. Metric list指标列表

      Figure 3. Snapshot list快照列表

References

For instructions on using continuous profiling to troubleshoot high CPU and memory utilization, see the following topics:

For common issues related to continuous profiling, see FAQ.