查看资源利用率和饱和度,然后通过测量确认。 一个系统的方法 — USE 方法(Utilization、Saturation、Errors)— 检查每个资源,这样您就不会指责错误的资源。
USE 方法
对于每个资源(CPU、内存、磁盘、网络),提出三个问题:
text
UTILIZATION → how busy is it (% time in use)?
SATURATION → how much queued/waiting work (load, run queue, swap)?
ERRORS → any errors (dropped packets, disk errors, OOM kills)?
→ a resource that is saturated, not just busy, is usually the bottleneck.
每个资源的工具和症状
每个资源都有一个独特的特征,您可以使用标准工具读取:
text
CPU → top/htop: high %us or load > #cores, run queue backed up
MEMORY → free/vmstat: low free RAM + high SWAP in/out (si/so) → swapping = thrashing
DISK I/O→ iostat/vmstat: high %iowait, %util ~100%, high await → I/O-bound
NETWORK → iftop/sar/ss: bandwidth saturated, retransmits, high latency
