CPU Utilization metrics not matching

1

Hi, I'm using c5d.2xlarge EC2 instance. When compared CPU metrics from Cloudwatch with top command, they are not matching.

Even though the top command shows around 90% of CPU utilization, in the cloudwatch it is showing around 26% only.

Could you please help me with this

Reskom
asked a year ago593 views
1 Answer
0
Accepted Answer

The c5d.2xlarge instance type has 8 vCPUs. top will report CPU usage as a percentage of a single CPU. You can press I (shift + i, capital I) to toggle Irix mode, which is explained as:

    1. %CPU  --  CPU Usage
       The task's share of the elapsed CPU time since the last screen
       update, expressed as a percentage of total  CPU  time.   In  a
       true  SMP environment, if 'Irix mode' is Off, top will operate
       in 'Solaris mode' where a task's cpu usage will be divided  by
       the  total  number  of  CPUs.  You toggle 'Irix/Solaris' modes
       with the 'I' interactive command.

Otherwise, you can press 1 within top to show a break down of all the CPUs. This should give you data that is closer to what CloudWatch shows.

profile picture
EXPERT
bwhaley
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions