Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is CPU Credit Balance in EC2? [closed]

I came across CPU Credit Balance in EC2 monitoring . What is CPU Credit Balance?

like image 902
Ramesh Murugesan Avatar asked Oct 05 '22 11:10

Ramesh Murugesan


People also ask

What happens when I run out of CPU credits AWS?

If unused, earned CPU credits expire after 24 hours. If you deplete your CPU credits, the instance performance will be capped at the baseline CPU value (for example, 5% for a t2. micro). If you reach this point, your application is presumably experiencing high-traffic.

What is a CPU credit?

A CPU Credit provides the performance of a full CPU core for one minute.” So the instance is constantly “fed” CPU Credits, and consumes them when the CPU is active. If the rate of consumption is less than the rate of feeding, the CPUCreditBalance (a metric visible in CloudWatch) will increase.

Is EC2 instance charged when stopped?

If you ran an EC2 instance at the beginning of the month but you stopped or terminated it later, then your bill will include charges for the time that the instance was running.


1 Answers

AWS EC2 has 2 different type of instances: Fixed Performance Instances(e.g. M3, C3 etc) and Burstable Performance Instances (e.g. T2). Fixed Performance Instances provides a consistent CPU performance whereas Burstable Performance Instances provide a baseline CPU performance under normal workload. But when the workload increases Burstable Performance Instances have the ability to burst, i.e. increase the CPU performance.

CPU Credit regulates the amount CPU burst of an instance. You can spend this CPU Credit to increase the CPU performance during the Burst period. Suppose you are operating the instance at 100% of CPU performance for 5 minutes, you will spend 5(i.e. 5*1.0) CPU Credit. Similarly if you run an instance at 50% CPU performance for 5 minutes you will spend 2.5(i.e. 5*0.5) CPU Credits.

CPU Credit Balance is simply the amount of CPU Credit available in your account at any moment.

When you create an instance you will get an initial CPU Credit. In every hour you will get certain amount of CPU credits automatically(this amount depends on the type of instance). If you don't burst the CPU performance the CPU Credit will be added to your CPU Credit Balance of your account. If you are out of CPU Credit(i.e. CPU Credit Balance turns into 0) your instance will work on baseline performance.

Read more on CPU Credits and Baseline Performance for Burstable Performance Instances

like image 265
Mostafiz Rahman Avatar answered Oct 06 '22 23:10

Mostafiz Rahman