All Products
Search
Document Center

Enterprise Distributed Application Service:Thread profiling

Last Updated:Feb 01, 2024

The thread profiling feature collects statistics on the CPU time per thread and the number of threads per type. This feature records and aggregates the method stacks of threads every 5 minutes. This helps you review the code execution process and identify thread issues. When the CPU utilization of a cluster is high or a large number of slow methods are detected, the thread profiling feature can be used to identify the thread or method that consumes the most CPU resources.

Limits

Enterprise Distributed Application Service (EDAS) supports thread profiling in Professional Edition and Platinum Edition, but not in Standard Edition.

Go to the feature page

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region, select a microservices namespace from the Microservices Namespace drop-down list, select Kubernetes Cluster from the Cluster Type drop-down list, and then click the name of the desired application.

  3. In the left-side navigation pane of the application details page, choose Monitor > Application Diagnosis-Threads.

Perform thread profiling

On the Threads Profiling page, all threads of the application are listed on the left. You can detect abnormal threads based on statistics in the CPU Time Consumption (ms) section. Select an abnormal thread and analyze the changes of the graphs for CPU Time Consumption (ms) and Thread Count. For example, you can analyze whether the total number of threads per minute is overlarge.

pg_am_threads_profiling

You can also click Method Stack of an abnormal thread to view the method stack that is running within a specified period of time. For example, by viewing the method stack of the threads in the BLOCKED state, you can optimize the specified code block to reduce CPU utilization.

pg_am_method_stack