An Investigation of EC2 Micro Instances

Published on November 1, 2012

An Investigation of EC2 Micro Instances

Unlike ordinary instances, EC2 Micro Instances can burst (run at high speed) for short periods. However, the Amazon Web Services website does not describe the details of this behavior, so I conducted an investigation into it.

Behavior Under High Load

There are two modes in which the CPU of an EC2 Micro Instance is throttled. On this page I refer to them as the fast mode and the slow mode. According to the investigation, as of November 2012 the CPU steal rate in fast mode (the fraction by which the CPU is throttled relative to its native speed) averaged about 4%, while the CPU steal rate in slow mode averaged about 90%.
When the CPU has been idle for a while, an EC2 Micro Instance basically runs in fast mode, but once a high load has been applied for some time it transitions to slow mode. According to the investigation, as of November 2012 the transition to slow mode occurred somewhere between 10 and 20 seconds.
Figure 1: CPU steal rate when a high load is applied
(the vertical axis is the CPU steal rate [%], and the horizontal axis is the time since the high load began [seconds])
Method:
I applied load to the CPU while monitoring the steal column of /proc/stat once per second. To reliably return to fast mode, each trial was spaced 200 seconds apart. The figure above is the average of 100 trials.

Behavior Over Very Short Intervals in Slow Mode

For very short intervals of around 10 milliseconds, an EC2 Micro Instance succeeds in running at high speed with a probability of about 65% even in slow mode. Also, when slow execution happens, work that would normally take 10 milliseconds takes about 1 second.
Method:
I investigated the time until the switch to slow mode while watching a for-loop counter and its execution time, and performed the calculation on the trials in which the duration of fast mode was 1 second or less.

Duration of Fast Mode

The duration of fast mode was about 14 seconds. The duration was roughly constant and rarely fell below 10 seconds, but under conditions I could not determine it would, with a probability of about 10%, continue for around 20 seconds.
Method:
I investigated the time until the switch to slow mode while watching a for-loop counter and its execution time, and performed the calculation on the trials in which the duration of fast mode was 1 second or more.

Change in Available Runtime Over Time

The limit on the available runtime of an EC2 Micro Instance appears to be set not only over short periods but also over long periods. Whereas within the first hour of applying load an average of about 13% of capacity could be achieved, after continuing the experiment for about 20 hours it dropped to a little over 2% on average.
Figure 2: Change in available runtime over time
(the vertical axis is the CPU utilization [%], and the horizontal axis is the duration of the experiment)
Method:
For 5 micro instances immediately after launch, I investigated the change in the number of for-loop iterations completed during each one-hour interval.