Choosing Instance Types and Managing Burstable Performance
This lesson covers instance families, sizes and processors, and the CPU credit model of burstable instances, since choosing the right instance type is the first and most effective performance optimisation.
Learning outcomes
After completing this lesson, you will be able to:
- Interpret instance type names.
- Explain CPU credits and standard and unlimited modes.
- Diagnose a burstable instance that slows down.
Families, generations and sizes
An instance type name such as m7g.2xlarge encodes the family (m, general purpose), generation (7), attributes (g for AWS Graviton, i for Intel, a for AMD, d for local NVMe storage, n for enhanced networking) and size. General purpose (M, T) balances CPU and memory; compute optimised (C) suits CPU-bound work; memory optimised (R, X) suits in-memory databases and caches; storage optimised (I, D) provides high local disk I/O; accelerated computing (P, G, Inf, Trn) provides GPUs and ML chips. Newer generations and Graviton instances usually give better price-performance, so moving from m5 to m7g is a common optimisation when the software supports Arm.
Changing the type of an EBS-backed instance requires stopping it, modifying InstanceType and starting it; the private IP and EBS volumes are kept, but the public IPv4 address changes unless an Elastic IP is attached. The new type must support the AMI's architecture, virtualisation and drivers (ENA and NVMe on Nitro).
Which instance family?
Burstable instances and CPU credits
T-family instances (T3, T3a, T4g) provide a baseline CPU level, for example 20% for a t3.medium, and earn CPU credits while running below it. Credits are spent to burst above the baseline. In standard mode, when CPUCreditBalance reaches zero the instance is throttled to its baseline, which appears as slow response times while CPUUtilization sits flat at the baseline percentage. In unlimited mode (the default for T3 and T4g) the instance can keep bursting and is charged for surplus credits when the average usage over 24 hours exceeds the baseline.
The relevant metrics are CPUCreditUsage, CPUCreditBalance, CPUSurplusCreditBalance and CPUSurplusCreditsCharged. A workload that is consistently above the baseline is cheaper and faster on a non-burstable type such as M7g or C7g.
The following diagram shows a credit balance running out during an afternoon peak.

CPU credits
A web server that slows every afternoon
A t3.large web server running in standard credit mode becomes slow each afternoon. CloudWatch shows CPUUtilization rising to 70% from 09:00, CPUCreditBalance falling to zero at 14:00, and CPU then flat at 30%, the baseline for a t3.large. The instance is throttled. Two fixes are possible: switch to unlimited mode, which keeps performance but adds surplus credit charges every day, or move to an m7g.large, which costs a little more per hour but has no credit limits. Because the load is high for most of the day, Compute Optimizer recommends the M family, and that is the better long-term answer.
What must happen to an EBS-backed instance before its instance type can be changed?
Show answer
It must be stopped, and started again after the change.
Exam Tips
Remember for the exam
- Match the family to the bottleneck: C for CPU, R for memory, I for local storage.
- Changing an instance type requires a stop and start for EBS-backed instances.
- CPUCreditBalance at zero in standard mode means throttling to the baseline.
- Unlimited mode avoids throttling but charges for surplus credits.
- Workloads always above baseline belong on non-burstable instances.