What constitutes “idle” CPU during T2 CPU credit calculation

amazon ec2

The documentation for EC2 T2 "burstable" types say:

The baseline performance and ability to burst are governed by CPU
credits. Each T2 instance continuously receives CPU credits at a set
rate, depending on the instance size. T2 instances accrue CPU credits
when they are idle
, and use CPU credits when they are active. A CPU
credit provides the performance of a full CPU core for one minute.

What I don't understand is what does idle mean? All instances use some CPU > 0%, so is there are CPU usage figure under which the instance is considered to be "idle"?

Surprisingly, given the liberal usage of this term, I cannot find a definition of "idle" anywhere.

Best Answer

Good question, the Amazon EC2 documentation for CPU Credits in T2 Instances could be more precise here indeed - the introductory blog post New Low Cost EC2 Instances with Burstable Performance provides a better explanation, see the table in the middle:

The column labeled "Baseline Performance" indicates the percentage of single core performance of the underlying physical CPU allocated to the instance. For example, a t2.small instance has access to 20% of a single core of an Intel Xeon processor running at 2.5 GHz (up to 3.3 GHz in Turbo mode). A t2.medium has access to 40% of the performance of a single core, which you (or your operating system, to be a bit more precise) can use on one or both cores as dictated by demand.

The column labeled "CPU Credits / Hour" indicates the rate of CPU Credits that the T2 instance receives each hour. CPU Credits accumulate when the instance doesn't use its baseline allocation of CPU, and are spent when the instance is active. Unused CPU Credits are stored for up to 24 hours. [emphasis mine]