## 3.2.2  Analysis of CPU Related Issues
This section describes how to analyze high CPU consumption using tools in the SAP HANA cockpit and the command line.
When analyzing high CPU consumption, you need to distinguish between the CPU resources consumed by HANA itself and by other, non-SAP HANA processes on the host. While the CPU consumption of SAP HANA will be addressed here in detail, the CPU consumption of other processes running on the same host is not covered. Such situations are often caused by additional programs running concurrently on the SAP HANA appliance such as anti-virus and backup software. For more information see SAP Note 1730928 - Using external software in a HANA appliance .
## Analyzing CPU Consumption in Cockpit
A good starting point for the analysis is the Overview page in the SAP HANA cockpit. It contains a tile that displays CPU usage. If you click on that tile, the Performance Monitor opens and you can view the SAP HANA CPU usage versus total CPU usage. If SAP HANA CPU usage is low while total CPU usage is high, the issue is most likely related to a non-SAP HANA process.
To find out what is happening in more detail, open the Threads tile (see Thread Monitoring ). In order to prepare it for CPU time analysis, perform the following steps:
- To switch on resource tracking open the Configuration of System Properties monitor and in the resource_tracking section of the global.ini file set the enable_tracking parameter to on . See Memory Information from Logs and Traces .
- Display the CPU Time column in the Thread Monitor.
The Thread Monitor shows the CPU time of each thread running in SAP HANA in microseconds. A high CPU time of related threads is an indicator that an operation is causing the increased CPU consumption.
In order to identify expensive statements causing high resource consumption, turn on the Expensive Statement Trace and specify a reasonable runtime (see Expensive Statements Trace ). If possible, add further restrictive
criteria such as database user or application user to narrow down the amount of information traced. Note that the CPU time for each statement is shown in the column CPU_TIME if resource_tracking is activated.
## General Analysis Resources
The topic 'HANA System-wide Performance Analysis' describes a general approach which can also be applied for CPU related issues. This includes the following actions:
- Generating a runtime dump
- Creating a kernel profiler trace
- Using the HANA Dump Analyzer tool
You can enable and configure the kernel profiler in the SAP HANA Database Explorer (Trace Configuration) or you can manage the kernel profiler from the SQL command line using the ALTER SYSTEM command. In both cases RESOURCE ADMIN or TRACE ADMIN privileges are required. Note that setting a maximum duration or memory limit for profiling is good practice and should be used if appropriate values can be estimated. More information about this tool can be found in Kernel Profiler .
In addition to the runtime dump it may be possible to capture the current state of the system in a full system information dump for later analysis. However, this in itself requires resources and may therefore worsen the situation. To get a Full System Info Dump using SAP HANA cockpit, open Diagnosis Files via the link Manage full system information dumps under Alerting & Diagnostics and choose either a zip file from the list or create a new one via Collect Diagnostics . See also the topic 'Diagnosis Information' in the Tools and Tracing section.
##  Tip
Guided Answers is a support tool for troubleshooting problems using decision trees. A guided answer is available for How to troubleshoot HANA High CPU Utilization .
## Related Information
SAP Note 1730928
Thread Monitoring
Memory Information from Logs and Traces [page 66]
Expensive Statements Trace [page 243]
HANA System-wide Performance Analysis [page 46]
Kernel Profiler [page 291]
Collect and Download Diagnosis Information
Diagnosis Information [page 293]
How to troubleshoot HANA High CPU Utilization (Guided Answer)