Instance Types and CPU Credits
Inkwell is about to launch its first EC2 server and meets a drop-down with hundreds of options: t3.micro, m7g.large, c7i.2xlarge, r6i.xlarge. Picking at random either wastes money or starves the shop of power. The names look like noise, but every one follows the same pattern.
The rule
Read the name left to right: family, generation, options, size.
Take m7g.large:
m, the family: what the machine is balanced for.tis burstable general purpose,mis balanced general purpose,cis compute-optimised (more CPU per GB of memory),ris memory-optimised,iis storage-optimised, and families such asgandpcarry GPUs.7, the generation: higher is newer, and usually better value.g, the options: extra letters describe the processor or features. Heregmeans AWS's own Graviton (Arm) chip;imeans Intel,ameans AMD, anddadds fast local disks.large, the size: sizes step upmicro,small,medium,large,xlarge,2xlargeand beyond, and fromlargeupwards each step roughly doubles CPU and memory. Anm7g.largehas 2 vCPUs and 8 GiB; anm7g.xlargehas 4 vCPUs and 16 GiB.
The T family has a twist: CPU credits. A T instance has a baseline, a share of CPU it can use all the time. Below the baseline it earns credits; above it, it spends them. One credit is one vCPU at 100% for one minute. A t3.micro has 2 vCPUs, a baseline of 10% each, and earns 12 credits per hour.
When credits run out, standard mode throttles the instance back to its baseline. Unlimited mode, the default for T3 and T4g, keeps bursting but bills you for the extra.
The shortcut
Match the workload's shape to the family: mostly idle with bursts → T; steady and balanced → M; CPU-hungry → C; memory-hungry → R. Then size from the smallest that fits.
Describe the shape
Quiet most of the day, short bursts when customers browse. Mostly idle with bursts.
The trap: a T instance running flat out looks cheap, but it either gets throttled or quietly runs up unlimited-mode charges.
Drills
Answer fast — trust the rule.
In c7g.xlarge, what does the c tell you?
Inkwell's reporting database keeps a lot of data in memory. Which family fits best?
How much is one CPU credit?
A t3.micro earns 12 credits per hour. A job holds both vCPUs at 100% for an hour. How many credits does it spend in that hour?
A T3 instance in standard mode runs out of credits. What happens?
Remember
- Read the name left to right: family, generation, options, size.
- Match the workload's shape to the family: bursty T, balanced M, CPU C, memory R.
- Trap: T instances run on credits; sustained load drains them into throttling or extra charges.
