top of page

Posts

[EC2] What Is the CPU Steal Item For CPU Usage?

Updated: Jul 29, 2022



EC2


This blog post is about the CPU steal item, which is a T2-series instance characteristic of AWS EC2.



Results of top command


top - 01:41:32 up 13 min, 1 user, load average: 0.17, 0.17, 0.08
Tasks: 88 total, 1 running, 87 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7%us, 2.0%sy, 0.0%ni, 93.8%id, 3.0%wa, 0.0%hi, 0.0%si, 0.5%st
Mem: 1017372k total, 184052k used, 833320k free, 33848k buffers
Swap: 1048572k total, 52416k used, 996156k free, 24688k cached

You can see the item "st(steal)" on the right side of the Cpu(s): line.



CPU steal


CPU steal is the percentage of time when a request is made to the guest OS but no CPU resources are allocated.


EC2 has various instance types, and among them, T2 instances are equipped with a function that limits performance (bursting) when the usage exceeds a certain amount.




CPU Credits


According to the AWS official website, CPU credit is "the one-minute performance of one CPU core as a whole.


When all the CPU credits for the allocated portion are consumed, it will burst.

It can be described roughly as a number that serves as a guideline for CPU usage.

It is not always the case with T2 series instances that the amount of CPU processing could be secured in proportion to the number of cores.


【Solution】

If the amount to be processed is not changed, there are three possible responses.


・Restart the instance

By restarting the instance, CPU credits will be reallocated.

This is only a temporary measure. The instance will eventually burst if it is left as it is.


・Increase the size of the instance

Increase the T2 instance size to increase the number of CPU credits allocated.


・Change the instance type

T2 series instances use the CPU credit system, which does not mean the number of cores can be processed. Therefore, changing to a fixed performance (M3 series, C3 series, etc.) may be possible to ensure stable processing.





This blog post is translated from a blog post written on our Japanese website





Comments


bottom of page