What should I look for when monitoring an Amazon EC2 Micro Instance's CPU usage?

I'm using Monit to keep an eye on my Amazon EC2 Micro instances, but I'm a little confused about the Load Average CPU metrics because of the Micro instances' ability to use up to 2ECU for short times. Monit is often reporting a Load Average (1 min) of 4 or 5 but I don't really know if this is actually high or not.

As I understand it my usage profile is well suited to the Micro instance although there are some spikes to 100% CPU usage and these roughly coincide with the Monit alerts. alt text

Could someone explain what would be normal Load Average for a Micro instance and at what stage I should start to be concerned about it?


Solution 1:

beware that, in the case of EC2, top is not a reliable tool to measure CPU usage. See more info at http://www.axibase.com/cloud/2010/07/22/ec2-monitoring-the-case-of-stolen-cpu/

Solution 2:

Load average and CPU utilisation are two different things. Load average measures the number of processes in the cpu run queue, waiting for the cpu to execute their instruction.

Load can go up for many reasons, not just because you have processes using up all of the available CPU cycles. For example, if you were trying to access something on disk but the I/O was blocked, this could cause the load average to increase even though the CPU might be idle.

You can look at how your load average trends over time. If your 5 or 15 minute load averages are always more thanthe number of cpus, you may need more cpus. Or look at your CPU utilisation graphs, those will be more accurate. If your CPU utilisation if close to, or at 100%, you need more CPU .