AWS EC2 Support
EC2 T3 and T4g CPU credit throttling: diagnose and fix.
Burstable instances run at a baseline CPU level and spend credits to go above it. When credits run out, a standard-mode instance is throttled and an unlimited-mode instance keeps going but can add surplus credit charges. We check which one you have and whether the instance should be burstable at all.
When You Need This
The situations where this work pays for itself.
Signs it is time
- A T-family instance is fast after launch and slow hours later
- CPU looks pinned at a low percentage but the app is starved
- Latency spikes line up with CPUCreditBalance reaching zero
- The bill shows surplus CPU credit charges on T instances
- A T2 instance is in standard mode and nobody remembers why
What you get
- Credit usage analysis for each burstable instance
- Recommendation: unlimited mode, larger size or a fixed-performance family
- CloudWatch alarms on credit balance and surplus charges
- Cost comparison between the options using current pricing
How we do it
A clear, safe process you can follow along with.
1. Confirm the instance is burstable and its mode
We check the instance family and the credit specification with describe-instance-credit-specifications. T2 defaults to standard mode, while T3, T3a and T4g are launched in unlimited mode by default. A launch template or ASG may have overridden it.
2. Graph the credit metrics
In CloudWatch we plot CPUUtilization, CPUCreditUsage, CPUCreditBalance and, for unlimited mode, CPUSurplusCreditBalance and CPUSurplusCreditsCharged over a few weeks. A balance that trends to zero means the workload needs more than the baseline.
3. Compare sustained use to the baseline
If average CPU stays above the size's baseline, credits will run out eventually. Burstable instances suit idle-heavy workloads with spikes, not steady busy ones.
4. Pick the fix that matches the workload
For short-lived spikes we switch to unlimited mode or move to the next size, which has a higher baseline. For steady load we move to a fixed-performance family such as M, C or the Graviton equivalents.
5. Check for runaway processes first
Before paying for more CPU, we look for a loop, a log flood, a cron job or a malware miner using credits. top, pidstat and the application logs show it quickly.
6. Apply and watch the balance
We change the credit specification (this does not require a restart) or resize the instance, then monitor the balance and latency for several days. We add an alarm on a low CPUCreditBalance for standard mode and on surplus credits for unlimited mode.
Mistakes we help you avoid
Common ways this goes wrong, and what we do instead.
Reading CPU percentage alone
A throttled standard-mode instance can show moderate CPU while performing badly. The credit balance tells the story.
Leaving unlimited mode on without a budget view
It avoids throttling but surplus credits beyond what an instance earns can be billed. We monitor the charge metric.
Using T instances for always-busy services
A steadily loaded T instance may cost more than a right-sized M or C instance. We compare.
Ignoring the actual bottleneck
Memory pressure, disk I/O or a network limit can look like a CPU problem.
Frequently Asked Questions
What happens when EC2 CPU credits run out?
In standard mode the instance is limited to its baseline CPU performance, which can make an application crawl. In unlimited mode it keeps bursting and the extra usage can be charged as surplus credits.
Should I use unlimited mode?
It is a good safety net for unpredictable spikes. If an instance stays in surplus credit most of the time, a larger or non-burstable instance is usually the better choice.
Can I change T3 credit mode without downtime?
Yes. The credit specification can be modified on a running instance. Resizing to a different instance type needs a stop and start for EBS-backed instances.
Want Help With EC2 T3 and T4g CPU credit throttling: diagnose and fix?
Schedule an appointment. Tell us about your environment and we will outline the safest, highest-value approach.
Schedule Appointment › No commitment required