All Products
Search
Document Center

Serverless App Engine:Thread profiling

Last Updated:Jun 19, 2025

The thread profiling feature provides statistics on CPU time consumption at the thread level and the number of threads per type. ARMS records and aggregates the method stacks of threads every 5 minutes. This helps you review the code execution process and locate thread issues. When you notice high CPU usage in a cluster or a large number of slow methods, you can use the thread profiling feature to identify the threads or methods that consume the most CPU resources.

Note

This feature currently only supports Java applications.

Locate thread profiling

On the Application Monitoring page, click Application Diagnostics > Thread Profiling.

Perform thread profiling

The left list on the Thread Profiling page displays all threads of the application. You can quickly identify abnormal threads based on the CPU Time statistics. After you select an abnormal thread, you can analyze the changes in CPU time consumption and thread count based on the CPU Time and Thread Count curves. For example, you can analyze whether the total number of threads per minute is excessive.

You can also click Method Stack of an abnormal thread to view the actual method stack during a specific period. For example, you can view the methods that correspond to threads in the BLOCKED state and optimize the relevant code segments to reduce CPU usage.

pg_am_method_stack

If your probe version is 2.7.3.5 or above, ARMS provides more accurate thread CPU usage method stack information through continuous profiling as shown in the following figure.

image

Note

If no data is displayed after you click Method Stack, troubleshoot as follows:

  • If your probe version is below 2.7.3.5, check whether the switch is turned on under Application Configuration > Custom Configuration > Thread Settings > Thread Profiling Method Stack. If the switch is not enabled, method stack information cannot be recorded. If enabled, method stack information is collected every 5 minutes.

  • If your probe version is 2.7.3.5 or above, check whether the main switch under Application Configuration > Custom Configuration and CPU Hot Spot switches in the Continuous Profiling section are turned on. If the switches are not enabled, method stack information cannot be recorded.