All Products
Search
Document Center

Application Real-Time Monitoring Service:Memory snapshots

Last Updated:Apr 01, 2024

JVM monitoring can display multiple memory metrics within a specified period of time. However, even if the charts can reflect excessive memory usage, specific information cannot be displayed. Therefore, charts cannot help you troubleshoot problems. To troubleshoot memory issues such as memory leakage and memory waste, you can create memory snapshots and view detailed memory usage in logs.

Prerequisites

  • An ARMS agent for Java V2.7.1.2 or later that was released after September 24, 2021 is installed.

  • You are using the Linux system. This is because you can create memory snapshots only for Linux servers.

Limits

  • The memory snapshot feature is developed based on the built-in heap dumps of JVMs. Heap dumps can trigger scenarios such as safe points and GCs that may suspend all non-VM threads and applications. The suspension time cannot be interfered. Therefore, service quality may degrade.

  • The memory snapshot feature has the following dependency limitations on your application:

    • ARMS agent V2.7.3.5 and earlier do not support JRE, Java 11, or Alpine Linux, and depend on the JAVA_HOME environment variable and the JAVA_HOME/lib/tools.jar file.

    • ARMS agent V2.8.3 and later support JRE, Java 8, Java 11, and Alpine Linux, and depend on the JAVA_HOME environment variable and Java commands. You must add JAVA_HOME/bin to the PATH environment variable.

  • If the VPC network where the application is deployed is configured with a limit on the number of Object Storage Service (OSS) buckets that can accessed, you must add the bucket that stores the memory snapshots to the corresponding policy. Format of the bucket: arms-heapdump-<regionId>. Replace <regionId> with the ID of the region. If your application is deployed in the China (Hangzhou) region, the bucket name is arms-heapdump-cn-hangzhou.

    Note

    The memory snapshot feature uploads the snapshot data collected by application instances to the specified OSS bucket for storage and processing. If you do not specify the OSS bucket in your policy, the data cannot be collected as expected.

  • The retention period of historical snapshots was not limited. However, ARMS has limited the retention period of historical snapshots to 90 days since 00:00 on July 1, 2023. Memory snapshots that are created more than 90 days ago can not be saved. We recommend that you regularly back up data.

Create a memory snapshot

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

  2. On the Applications page, select a region in the top navigation bar and click the name of the application that you want to manage.

    Note

    If the Java图标 icon is displayed in the Language column, the application is connected to Application Monitoring. If a hyphen (-) is displayed, the application is connected to Managed Service for OpenTelemetry.

  3. In the left-side navigation pane, click Application Details. On the Application Details page, click the JVM monitoring tab.

  4. In the upper-right corner of the JVM monitoring tab, click Create Memory Snapshot.

  5. In the Create Memory Snapshot dialog box, select an IP address and click Save.

    Note

    If you have selected an instance in the left-side navigation tree of the Application Details page, the IP address of the instance is automatically selected from the IP drop-down list.

  6. In the message that appears, click Force to dump.

    Important

    The duration of a memory snapshot task varies from a few minutes to half an hour. The application process stops responding during a dump. Proceed with caution.

View memory snapshot details

  1. In the upper-right corner of the JVM monitoring tab, click Historical Snapshots.

    The Number of Snapshot Jobs panel displays the task execution status. Green indicates that the snapshot task is successful, blue indicates that the snapshot task is executing, and red indicates that the snapshot task fails. Find a task and click Details to view the progress of the task.

  2. Find a task and click Analysis to view the analysis results in the Application Troubleshooting Platform (ATP) console.