This topic describes the terms related to CPU usage and the causes of high CPU usage.
|CPU usage||The proportion of time during which the CPU is running. The time includes all the time periods that meet the conditions. For example, high CPU usage may occur because the CPU stops processing data and waits for the I/O operations to be completed. The time during which the CPU is running is divided into kernel CPU time and user CPU time.|
|User CPU time||The time spent in running user-mode programs.|
|Kernel CPU time||The time spent in running kernel-mode codes. The time includes the time spent in system calls, kernel threads, and interruptions.|
|Context switch||The kernel program switches the CPU to enable the CPU to run on different address spaces.|
|Interruption||The signals that are sent by physical devices to the kernel. In most cases, I/O services are requested.|
Common causes of high CPU usage
- The number of scanned rows surges. This indicates that improper SQL statements exist, no index is created, or a large number of statistical SQL statements are being executed. In this case, find the problematic SQL statements, view and analyze the execution plans, and optimize these SQL statements. For more information about how to view the number of scanned rows, see Performance monitoring and alert configuration.
- SQL statements are stacked up when sessions are blocked due to lock waits. For more information, see Performance insight.