> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/elastic-compute/instance-monitoring/04-cpu-spend.md).

# 我的 CPU 实际消耗在哪里？

这些面板按消耗位置对 CPU 时间进行分解，帮助您将负载归因到用户代码、内核工作、I/O 等待及其他状态。

## CPU Utilization

Guest 的 CPU 总繁忙比率，即 `1 − idle`。当 CPU 上升时，首先查看此面板。

## CPU User

Guest 运行用户态代码所消耗的时间。这是应用负责人进行归因的第一条线索——如果该值较高，请对您的应用进行性能分析。

## CPU System

Guest 内核代表用户进程执行系统调用及内核侧工作所消耗的时间。系统时间高而用户时间低，通常指向系统调用风暴、网络软中断压力或内核锁争用。

## CPU IOWait

至少有一个未完成 I/O 请求时 CPU 处于空闲状态的时间。结合磁盘面板和 Hypervisor I/O Wait Time 一起阅读，可定位瓶颈是在 Guest 内部还是在存储后端。

## CPU SoftIRQ

处理软中断所消耗的时间——在繁忙的 VM 上主要由网络 RX/TX 处理主导。此值突然增长是实例正在逼近每秒数据包上限的强烈信号。

## CPU Idle

CPU Utilization 的补集。显式提供此面板是为了让您发现"空闲但不健康"的模式：高空闲率同时伴随高 IOWait 或高 CPU Other。

## CPU Other

较不常见 CPU 状态的兜底桶。**重要：** Guest 侧观测到的抢占时间也记录在此。如果 CPU Other 攀升但 CPU User 和 CPU System 未见明显上升，请怀疑宿主机过度分配，并与 **Hypervisor CPU Queue Time**（[Q1](/welcome/cn/elastic-compute/instance-monitoring/01-overprovisioning.md)）交叉核验。

## Hypervisor CPU Time / User / System

Hypervisor 计入该域的 CPU 总时间——在宿主机侧测量，而非从 Guest 内部获取。分解为总时间、用户态时间和内核时间。在协调 Guest 侧 CPU 消耗与 Hypervisor 侧容量规划时十分有用，也可在 Guest 内部数据不可用时作为备用数据来源。

## Hypervisor I/O Wait Time

vCPU 因 I/O 而阻塞的时间，在宿主机侧测量。结合磁盘延迟面板（[Q5](/welcome/cn/elastic-compute/instance-monitoring/05-disk.md)）一起阅读，可定位 I/O 停滞的根源。

## API 参考

所有实例指标均使用 `DescribeInstanceMonitorData`，并配合以下 `metricType` 值。

| Console 面板               | metricType                |
| ------------------------ | ------------------------- |
| CPU Utilization          | `CPU_UTILIZATION`         |
| CPU User                 | `PROC_CPU_USER`           |
| CPU System               | `PROC_CPU_SYSTEM`         |
| CPU IOWait               | `PROC_CPU_IOWAIT`         |
| CPU SoftIRQ              | `PROC_CPU_SOFTIRQ`        |
| CPU Idle                 | `PROC_CPU_IDLE`           |
| CPU Other                | `PROC_CPU_OTHER`          |
| Hypervisor CPU Time      | `HYPERVISOR_CPU_TIME`     |
| Hypervisor CPU User      | `HYPERVISOR_CPU_USER`     |
| Hypervisor CPU System    | `HYPERVISOR_CPU_SYSTEM`   |
| Hypervisor I/O Wait Time | `HYPERVISOR_IO_WAIT_TIME` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/elastic-compute/instance-monitoring/04-cpu-spend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
