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.
Enterprise Distributed Application Service (EDAS) supports thread profiling in Professional Edition and Platinum Edition, but not in Standard Edition.
Go to the feature page
- Log on to the EDAS console.
- Go to the Application Overview page by using one of the following methods:
- In the left-side navigation pane, choose Container Service Kubernetes Clusters or Serverless Kubernetes Clusters page, click a cluster ID. In the Applications section of the Cluster Details page, click the name of the application that you want to manage. or . In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. On the
- In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a microservice namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list and click the name of the application that you want to manage.
- In the left-side navigation pane of the application details page, choose .
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 CPU time consumption and thread count based on the graphs in the CPU Time Consumption (ms) and Thread Count sections. For example, you can analyze whether the total number of threads per minute is overlarge.
You can also click Method Stack to view the method stack that is actually running within a specified period of time. For example, you can view the method stack of the threads in the BLOCKED state and optimize the specified code block to reduce CPU utilization.