简体   繁体   English

Dashboard和VM中的Google Compute Engine CPU使用率差异

[英]Google Compute Engine CPU usage discrepancy in Dashboard and VM

In Google Cloud, I have an autscaling setup which scales depending on CPU usage. 在Google Cloud中,我有一个自动扩展设置,可根据CPU使用情况进行扩展。 Even if no processes are consuming CPU on the VM, it is maxed out in the dashboard. 即使没有进程在VM上消耗CPU,它也会在仪表板中消失。 Basically, the dashboard shows a much larger CPU usage than what the VM actually is using. 基本上,仪表板显示的CPU使用率远远超过VM实际使用的CPU使用率。 This is triggering a lot of instance start-ups. 这引发了很多实例初创企业。 Unnecessarily. 不必要的。

This is the CPU usage graph from Google Compute Engine dashboard. 这是Google Compute Engine信息中心的CPU使用率图表。 This is the usage for a single instance and not for the overall group. 这是单个实例的用法,而不是整个组的用法。

Google Compute Engine CPU usage from dashboard 来自仪表板的Google Compute Engine CPU使用情况

And, this is the CPU usage stats for all the CPUs from the VM. 并且,这是来自VM的所有CPU的CPU使用率统计信息。 This has hardly any consumption, and most of the time is spent idle. 这几乎没有任何消耗,大部分时间都是空闲的。

CPU usage from the VM 来自VM的CPU使用率

Is it possible that these VMs perform some heavy I/O operations? 这些VM是否可能执行一些繁重的I / O操作? (using persistent disk, network communication). (使用持久磁盘,网络通信)。 If so, this could be virtualization overhead of VMs, which is not visible to the guest operating system. 如果是这样,这可能是VM的虚拟化开销,这对客户操作系统是不可见的。

Look at your "CPU Usage from the VM" screenshot, the very top line, right side: 看看你的“VM使用率”截图,最上面一行,右边:

load average: 0.61, 0.94, 0.86

This is your CPU usage average over 1, 5, 15 minutes. 这是您在1分钟,5分钟,15分钟内的平均CPU使用率。 See here for more details . 有关详细信息,请参见此处

So you can see that there is something going on, and the Google Compute Engine CPU graph isn't wrong. 因此,您可以看到正在发生的事情,并且Google Compute Engine CPU图表没有错误。 It looks like it's graphing your 1 minute average. 它看起来像是你的1分钟平均值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM