奇怪的EC2 CPU使用率

时间:2017-05-05 04:34:40

标签: linux performance amazon-web-services amazon-ec2 server

我真的很困惑。为什么负载平均值和%CPU与下面的进程CPU使用率不匹配。看起来这个过程占用了大量的CPU,而AWS EC2米只表示使用了25%的CPU。 click here to see image

3 个答案:

答案 0 :(得分:2)

  

%CPU - CPU使用率:进程使用的CPU百分比。 默认情况下,top会将其显示为百分比   单个CPU。在多核系统上,您可以拥有百分比   大于100%。例如,如果3个核心使用率为60%,   top将显示180%的CPU使用率。   您可以通过在top运行时按 Shift + i 来切换此行为,以显示可用的总体百分比   正在使用的CPU。

load average: 22.56, 24.99, 26.51

从左到右,这些数字显示平均负载超过最后1分钟最后5分钟最后15分钟

us  --  User CPU time
  The time the CPU has spent running users' processes that are not niced.
sy  --  System CPU time
  The time the CPU has spent running the kernel and its processes.
ni  --  Nice CPU time
  The time the CPU has spent running users' proccess that have been niced.
wa  --  iowait
  Amount of time the CPU has been waiting for I/O to complete.
hi  --  Hardware IRQ
  The amount of time the CPU has been servicing hardware interrupts.
si  --  Software Interrupts
  The amount of time the CPU has been servicing software interrupts.
st  --  Steal Time
  The amount of CPU 'stolen' from this virtual machine by the hypervisor for other tasks (such as running another virtual machine).

查看In Linux “top” command what are us, sy, ni, id, wa, hi, si and st (for CPU usage)的更多详情。

答案 1 :(得分:1)

运行命令“ top”后,可以按键盘上的“ 1”以查看各个CPU的利用率,并在运行命令“ man top”时查看更多详细信息 请注意,进程“ msqld”可以使用多种资源的CPU,并且其利用率%在“顶部”显示中很容易超过100%。

答案 2 :(得分:0)

嗨,也许你的应用程序使用单核和其他核心是免费的。我认为你的实例有4个CPU核心,一个正在使用100%。请你检查每个核心的使用情况。