Skip to content

EC2 Credit balance for t2.small drop from 288 to 0 within 5 minutes

-1

Hi all,

I'm trying to understand a CPU credit balance drop that doesn't match my understanding of the documented credit model, and I'd appreciate a pointer to the right doc or an explanation of what I'm missing.

What I understand from the docs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html):

  • t2.small has 1 vCPU and a maximum credit balance of 288
  • 1 CPU credit = 1 vCPU at 100% utilization for 1 minute
  • Since it has only 1 vCPU, I'd expect the maximum possible spend rate to be 1 credit/minute (100% of that single vCPU)
  • At that max spend rate, starting from a full 288-credit balance (ignoring any credits earned back during the burn), I'd expect it to last roughly 288 minutes (4.8 hours) before hitting zero

What I actually observed:

  • CPUCreditBalance dropped from ~288 to ~0 in approximately 5 minutes
  • CPUCreditUsage during that window shows approximately 2 credits/minute at the spike
  • CPUUtilization (5-minute averaged) only showed moderate values (30-45%) during that window, not a sustained 100%
  • There was a large simultaneous spike in NetworkIn/NetworkOut around the same timestamp

My questions:

  1. How is it possible for a t2.small (1 vCPU) to spend more than 1 credit/minute?
  2. Where in the documentation is the actual metering granularity (how often credits are earned/spent, and whether it's per-second or per-minute) explicitly described? The burstable performance guide states the 1-credit-per-vCPU-minute conversion but I haven't found a section that confirms sub-minute metering behavior.

Any pointers to the relevant docs, or things I should check, would be much appreciated.

Thanks!

asked 20 days ago46 views

2 Answers
0

The credits dropped from 288 to 30 (not 0) because the instance was restarted using stop/start.

T2 Standard instances get 30 launch credits per vCPU at launch or start

and

For T2 Standard, when the instance is stopped, it loses all its accrued credits, and its credit balance is reset to zero. When it is restarted, it receives a new set of launch credits, and begins to accrue earned credits.

Documentation https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-standard-mode-concepts.html#launch-credits

answered 20 days ago

-1

Based on the credit model for burstable instances, your observation is actually consistent with how the system works, though the documentation could be clearer about the metering granularity.

Here's what's happening:

Credit Spending Rate: The credit balance is calculated every 5 minutes, not every minute. The formula used is:

CPUCreditBalance = prior CPUCreditBalance + [Credits earned per hour * (5/60) - CPUCreditUsage]

This means credits are both earned and spent in 5-minute intervals. During those 5 minutes, if your instance bursts significantly, it can consume credits much faster than the 1-credit-per-minute theoretical maximum you calculated.

Why You Saw ~2 Credits/Minute: The CPUCreditUsage metric represents the total credits spent during a measurement period. Even though CloudWatch may show your CPUUtilization averaged at 30-45% over a 5-minute period, this average can mask brief, intense bursts. If your instance spiked to 100% CPU for portions of those 5 minutes (which aligns with your network traffic spike), it would consume credits during those bursts, and the CPUCreditUsage metric would reflect the total consumption across the entire interval.

The Network Spike Connection: The simultaneous spike in NetworkIn/NetworkOut suggests your instance was processing a significant workload that drove both CPU and network usage. This type of bursty workload is exactly what can deplete credits rapidly—the instance bursts above baseline during the intensive period, consuming accumulated credits.

What to Check:

  • Look at your CPUUtilization at 1-minute granularity if available, rather than 5-minute averages, to see if there were sharper spikes
  • Review application logs around that timestamp to identify what workload caused the burst
  • Consider whether your workload regularly has these burst patterns

If your instance frequently depletes its credit balance, you may want to consider either switching to a larger burstable instance size (which earns credits faster) or moving to a non-burstable instance type like m, c, or r series that provides consistent baseline performance without credit constraints.
Sources
Troubleshoot high CPU utilization on my EC2 instance | AWS re:Post
Monitor CPU credits for burstable instances - Amazon Elastic Compute Cloud

answered 20 days ago

EXPERT

reviewed 20 days ago

  • If the instance used 2 credits per 5 minutes, it's not 288 per 5 minutes, as I see on the chart

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.