Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
EC2 — Virtual Servers  ›  Lesson

Instance Types and CPU Credits

Instance Types 15 minAn EC2 instance type name encodes its family, generation, options and size, and burstable T instances run on CPU credits earned below a baseline and spent above it.

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. t is burstable general purpose, m is balanced general purpose, c is compute-optimised (more CPU per GB of memory), r is memory-optimised, i is storage-optimised, and families such as g and p carry GPUs.
  • 7, the generation: higher is newer, and usually better value.
  • g, the options: extra letters describe the processor or features. Here g means AWS's own Graviton (Arm) chip; i means Intel, a means AMD, and d adds fast local disks.
  • large, the size: sizes step up micro, small, medium, large, xlarge, 2xlarge and beyond, and from large upwards each step roughly doubles CPU and memory. An m7g.large has 2 vCPUs and 8 GiB; an m7g.xlarge has 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.

Sizing Inkwell's web serverStep 1 of 4
  1. 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.

quick drill

In c7g.xlarge, what does the c tell you?

quick drill

Inkwell's reporting database keeps a lot of data in memory. Which family fits best?

quick drill

How much is one CPU credit?

quick drill

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?

quick drill

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.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainPick Inkwell's instance types

Inkwell needs two things: a web server that sits mostly idle but gets short busy bursts, and a nightly job that resizes thousands of cover images using every CPU core flat out for an hour. Suggest an instance family for each, decode one of your chosen type names, and explain why a burstable instance would be a poor fit for the nightly job.