High CPU usage
Updated at:
This topic explains key concepts and common causes of high CPU usage.
CPU concepts
| Term | Description |
| CPU usage | The percentage of time the CPU spends executing tasks. This includes all active clock cycles, such as cycles spent stalled while waiting for I/O operations. CPU usage consists of user time and kernel time. |
| user time | The time the CPU spends executing code in user mode. |
| kernel time | The time the CPU spends executing code in kernel mode. This includes time spent on system calls, kernel threads, and interrupts. |
| context switch | A kernel operation that switches the CPU from one process or thread to another, allowing it to run in a different address space. |
| interrupt | A signal sent from a hardware device to the kernel, typically to request an I/O service. |
Common causes
- A sudden increase in the number of scanned rows. This can indicate inefficient SQL queries, missing indexes, or a large number of analytical queries. To resolve this, identify the problematic SQL queries, analyze their execution plans, and then optimize the queries. To view the number of scanned rows, see performance monitoring.

- A buildup of SQL queries caused by sessions blocked by a lock wait. For more information, see Performance Insights..On the Waits tab, if wait events such as
Lock:relationandLock:transactionidaccount for the highest average active sessions (for example, 8 and 5.39, respectively), this indicates significant lock contention.
Is this page helpful?