Amazon EC2 micro instance has 100% CPU usage

Keep in mind, the m2.micro instances are just that--they're small. Any real amount of load will max them out.

As @zvik pointed out in his comments, you should find out what processes are consuming the most memory and/or CPU cycles. He recommended running top, which is a command found on Linux distributions. By pressing Shift-P, it will sort them based on CPU usage. You will need to use this information to figure out where the bottleneck is. For example, if this is running Apache, the default config for Apache may be to launch more processes than the server is capable of.

Try running top and seeing which commands are consuming the most resources.


Your issue may actually be down to "CPU steal" which happens across Amazon's stack (and as a matter of fact, any virtualised infrastructure). You can read more about CPU steal here.

Essentially, your VM is idle and Amazon is "borrowing" some of your CPU cycles to give to someone else who needs it - this is standard practice for a virtualised environment where physical server resources like RAM usage and CPU cycles are often hugely over-committed.

To check for CPU steal, run top and take a look for the %st value highlighted here:

top command output

If this value is anything other than zero, it means your VM's CPU cycles are being "borrowed".