Thread profiling enables you to identify and isolate bottlenecks in your code stack. In Applications Manager's APM Insight, all thread profiles collected in the chosen time window are listed, along with the thread count, CPU time and memory details. Each thread profile consists of a list of threads that were running when the application was being profiled.
Upon clicking a specific thread profile, one can view:
Once profiling is done, the generated dumps can be analysed in GUI. Check out the Thread Dump Analysis feature to explore more.
Automated Thread Profiling can be configured as an action to capture thread profiles for APM Insight Java/.NET Application Monitors when an alarm is triggered. Learn more
To view Thread Profiles,
Note: Thread profiling is supported only for JAVA and .NET agents.
APM Insight schedules thread profiling twice a day for a period of 5 minutes.
Note:
With On-Demand profiling, one can initiate thread profiling at the current time for a duration ranging from 5 to 30 minutes. The threads are sampled at regular time interval in the specified duration and the collective data is displayed at the end of time duration.
To initiate On-Demand profiling,
Note: On-Demand profiling can be initiated only once per hour (i.e) if you initiate On-Demand profiling for 5 minutes, next initiation can be done only after 55 minutes.
On-Demand profiling can be initiated for both applications and instances.
With this option, you can easily identify the threads that consume the most CPU or memory. You can choose any value (N) from five to 20.
Note: This option is only available for Java agents v6.0 and above.

When ON-DEMAND thread profiling is requested, the agent also monitors the CPU and memory usage of each thread. The agent picks the top N threads that consumed a large amount of resources from each category (CPU and memory) based on the N value you provided. Once the profiling is finished, the threads, along with their usage statistics and stack traces, will be displayed in the Applications Manager web client.
The below figure shows the threads sorted in descending order by the amount of resources consumed.

The left pane lists the thread profiles collected in the selected time range, along with the number of threads captured in each profile and the time at which profiling started. Click a thread profile to view its details.
The summary at the top of the page shows the following details:
| Metric | Description |
|---|---|
| CPU Time | The average CPU time consumed per thread in the profile. Min and Max show the lowest and highest CPU time consumed by a single thread (in ms or sec). |
| Thread Count | The number of threads captured in the profile. |
| Memory Usage | The average memory allocated per thread in the profile. Min and Max show the lowest and highest memory allocated by a single thread (in bytes, KB, MB, or GB). |
| Profiling Duration | The duration for which the threads were profiled (in minutes). |
The Top threads by resource utilization tab lists the following details for each thread:
| Column | Description |
|---|---|
| Thread Id | The unique ID assigned to the thread by the JVM. Use this ID to identify the same thread in a thread dump. |
| Thread Name | The name given to the thread by the application, framework, or application server. The name usually indicates the role of the thread. For example, http-nio-9097-exec-3 is a Tomcat request processing thread for the connector on port 9097, and Thread-23 is the default name the JVM assigns to a thread created without a name. |
| CPU Time | The total CPU time consumed by the thread during the profiling duration (in ms or sec). Click the column header to sort the threads by CPU time. |
| Memory Usage | The memory allocated for the thread since JVM start (in bytes, KB, MB, or GB). |
Use the search icon to find a thread by its ID or name.
Click the arrow next to a thread to expand its Stacktrace. The stack trace lists the method calls the thread was executing when it was sampled. The topmost entry is the method that was running, and each entry below it is the method that called the one above it, down to the thread's entry point (for example, java.lang.Thread.run). Each entry shows the fully qualified class and method name, followed by the source file name and line number, for example, java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442).
Note:
It allows us to track crucial metrics such as response times, resource utilization, error rates, and transaction performance. The real-time monitoring alerts promptly notify us of any issues or anomalies, enabling us to take immediate action.
Reviewer Role: Research and Development