简体   繁体   中英

GCE shows only ~15% usage but top shows ~99%

I was running a load test but seeing only ~20% CPU on GCE. That was surprising, so I decided to SSH into my machine and run top , which showed me 99.7% utilization.

I found a question that was very similar: Google Cloud Compute engine CPU usage shows 100% but dashboard only shows 10% usage

However, I am certain I only have one core (1 vCPU, 3.75 GB memory).

Here's top running that shows 99.7% utilization:

最佳

What could be the reason for this?

Even for a single core case, when workload is not split between several cores, the curve shape and the Y-coordinate of the CPU Utilization chart depend on the aggregation and alignment settings you use: for instance max or mean , 1m or 1h alignment period, etc. For instance in case of a short peak load, the wide time window will act as a big denominator for the mean aligner. That way you'll get lower values on the chart.

For more details please see:

Google Monitoring > Documentation > Alignment

Google Cloud Blog > Stackdriver tips and tricks: Understanding metrics and building charts

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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