skip to content

Instance Families and Sizing

EC2 instance names are a grammar, not a list to memorise: the letter tells me the resource ratio, the generation tells me the hardware, and the size tells me the slice. Once I can read m7g.2xlarge I can right-size a workload out loud in an interview.

part ofAWSoverview, primer and where to startread it →
on this pageshow

questions

6

Decode the EC2 instance type name m7g.2xlarge: what does each part of the name tell you, and how many vCPUs and how much memory does that instance have?

level: juniorimportance: must knowfreq 75%

answer

  1. four parts, one dot
  2. letter, digit, letters, size
  3. the letter fixes the memory ratio
  4. g after the digit is not a GPU
  5. large is 2 vCPU, then doubling

basics

~20 s

m7g.2xlarge splits into four parts: family m (general purpose, roughly 4 GiB of memory per vCPU), generation 7, processor letter g (AWS Graviton, arm64), and size 2xlarge — 8 vCPUs and 32 GiB of memory.

solid answer

~50 s

EC2 type names are a grammar, not a list to memorise. The leading letter is the **family**, which fixes the resource ratio: `m` general purpose at about 4 GiB per vCPU, `c` compute-optimised at about 2 GiB, `r` memory-optimised at about 8 GiB, `t` burstable, `i` storage-optimised with local NVMe. The digit is the **generation** — higher means newer hardware, and usually better price-performance. Letters after the digit are capability modifiers: `g` for AWS Graviton (arm64), `a` for AMD, `i` for Intel, `d` for local NVMe instance storage, `n` for extra network bandwidth. After the dot comes the **size**, which doubles: `large` is 2 vCPUs, `xlarge` 4, `2xlarge` 8, `4xlarge` 16, and so on, with memory scaling by the family's ratio. So m7g.2xlarge is 8 vCPUs and 32 GiB on Graviton. One trap: `g` in the leading position (`g5.xlarge`) means GPU, not Graviton.

code

bash · 3 lines
bash
aws ec2 describe-instance-types \
  --instance-types m7g.2xlarge \
  --query 'InstanceTypes[0].{vCPU:VCpuInfo.DefaultVCpus,MemoryMiB:MemoryInfo.SizeInMiB,Arch:ProcessorInfo.SupportedArchitectures,Network:NetworkInfo.NetworkPerformance}'

go deeper

for a junior

Be able to read a type name aloud part by part and state the vCPU count from the size suffix. Know that large is 2 vCPUs and each step doubles.

for a middle

Explain the family ratios — roughly 2, 4 and 8 GiB per vCPU for c, m and r — and what the capability letters change about the hardware, including that g after the generation digit means arm64.

for a senior

Turn measured CPU, memory and network usage into a concrete family and size choice, and know to verify with describe-instance-types rather than trusting the name alone.

for a principal

Own the fleet-wide policy: which generations and architectures are approved, how type choices are kept portable across regions and zones, and how teams are moved onto newer generations without a per-team migration project.

## Why the name is a grammar AWS publishes hundreds of EC2 instance types, and no interviewer expects you to recite them. What they expect is that you can look at a type you have never seen and say what it is for. The name is fully systematic, so one parsing rule covers the whole catalogue. ``` m 7 g .2xlarge family generation capability size ``` ## Part 1 — the family letter fixes the ratio The leading letter tells you the vCPU-to-memory ratio and therefore which workload the type is shaped for: - `t` — burstable general purpose. A low sustained baseline with the ability to burst above it. Cheap, and the right default for dev boxes and low-traffic services. - `m` — general purpose, about **4 GiB of memory per vCPU**. The safe default when you have not measured anything. - `c` — compute optimised, about **2 GiB per vCPU**. Batch, encoding, CPU-bound API servers. - `r` — memory optimised, about **8 GiB per vCPU**. Caches, in-memory analytics, large JVM heaps. `x` and `u` families go further still. - `i` — storage optimised with large local NVMe. `d` families are dense HDD storage. - `g`, `p`, `inf`, `trn` in the **leading** position — accelerated computing: GPUs for graphics (`g`), GPUs for training/HPC (`p`), and AWS's own inference and training accelerators. The ratios are the point. If you know a service needs 32 GiB and 8 vCPUs, you already know it is an `m` shape; if it needs 64 GiB with the same 8 vCPUs, it is an `r` shape. ## Part 2 — the generation digit A higher digit is newer silicon. m5 → m6i → m7i are successive general-purpose generations. Newer generations normally deliver more performance for the same or lower on-demand price, so "move to the current generation" is one of the cheapest optimisations available. Generations are not interchangeable in every region — a new type reaches regions in waves, which is why launch failures sometimes trace back to a type simply not existing where you asked for it. ## Part 3 — capability letters after the generation These stack, in a fixed order, and each one is a real change to the hardware: - `g` — AWS Graviton, an **arm64** processor. Requires an arm64 AMI and arm64 binaries. - `a` — AMD EPYC; `i` — Intel. Both x86_64, but different silicon and price points. - `d` — includes local NVMe **instance store** volumes. - `n` — higher network and EBS bandwidth for the same vCPU count. - `e` — extra memory or storage; `z` — higher sustained clock speed. So `c7gn.4xlarge` reads as: compute optimised, 7th generation, Graviton, network enhanced, 16 vCPUs. The collision worth memorising: `g` as the **first** letter is a GPU family (`g5.2xlarge` is an NVIDIA GPU instance), while `g` **after the generation digit** is Graviton (`m7g.2xlarge`). Candidates mix these up constantly. ## Part 4 — the size suffix Sizes double along a fixed ladder: ``` large = 2 vCPU xlarge = 4 vCPU 2xlarge = 8 vCPU 4xlarge = 16 vCPU 8xlarge = 32 vCPU (and on up: 12xlarge, 16xlarge, 24xlarge, 32xlarge, 48xlarge) ``` Memory follows the family ratio, so within a family the whole machine scales linearly: m7g.large is 2 vCPU / 8 GiB, m7g.2xlarge is 8 vCPU / 32 GiB, m7g.4xlarge is 16 vCPU / 64 GiB. Below `large` you find `nano`, `micro`, `small` and `medium`, which exist mainly on burstable `t` families and a few Graviton families — not across the whole catalogue. A `.metal` suffix means no hypervisor at all: the whole physical host, used for nested virtualisation, licence-bound software, or workloads that need direct access to CPU features. ## Checking rather than guessing The grammar tells you the shape; the API tells you the truth. `aws ec2 describe-instance-types` returns exact vCPU counts, memory, supported architectures, and network performance for any type, and it is the right way to settle an argument or to build an allow-list of types for a fleet. ## What this buys you in an interview Being able to parse the name lets you answer the real question that follows — "what would you run this service on?" — out loud, in one sentence: family from the resource ratio, generation from what is current in the region, capability letters from architecture and network needs, size from measured usage plus headroom.

  • In a type name like c7gn.4xlarge, what do the letters after the generation digit mean?
    They are capability modifiers. `g` means an AWS Graviton arm64 processor and `n` means network- and EBS-bandwidth enhanced for that vCPU count. Other modifiers you will meet are `a` (AMD), `i` (Intel), `d` (local NVMe instance store), `e` (extra memory or storage) and `z` (higher clock). So c7gn.4xlarge is a compute-optimised, 7th-generation, Graviton, network-enhanced instance with 16 vCPUs.
  • If m7g.large has 2 vCPUs and 8 GiB, what do you expect from m7g.8xlarge, and what else scales with size?
    32 vCPUs and 128 GiB — the ladder doubles, and memory follows the family's 4 GiB-per-vCPU ratio. Network and EBS bandwidth scale with size too, and that matters more than people expect: smaller sizes are quoted as "up to" some figure, meaning a burst ceiling over a lower sustained baseline, while the largest size in a family gets the full non-burstable allocation.
  • Why can the same instance type fail to launch in one region and succeed in another?
    Instance types roll out region by region and Availability Zone by zone, so a current-generation type may simply not be offered where you asked. `aws ec2 describe-instance-type-offerings` tells you what exists in a given region or zone. This is why hard-coding a single type in a fleet is fragile — a list of acceptable types is more resilient.

saying these in an interview costs you the question

  • Reads the generation digit as the vCPU count
  • Thinks every 'g' in a type name means GPU
  • Assumes xlarge means the same memory in every family
  • Believes m5a and m5 are the same processor
  • Says all families offer nano through 32xlarge sizes

context

open as a page

An EC2 t3 instance running a web service performs well for a while and then its CPU flatlines at a low fixed percentage while requests queue up. Explain the burstable T-instance CPU credit mechanism behind this, and what unlimited mode changes.

level: middleimportance: must knowfreq 62%

basics

~20 s

Burstable T-family instances earn CPU credits at a fixed hourly rate and spend them to run above a size-specific baseline. In standard mode, an exhausted balance throttles the instance to that baseline; unlimited mode keeps bursting and bills surplus credits instead.

open as a page

EC2 offers three placement group strategies — cluster, spread and partition. What does each one do to where instances physically land, and which kind of workload does each suit?

level: middleimportance: should knowfreq 40%

basics

~20 s

Cluster packs instances close together in one Availability Zone for the lowest network latency. Spread puts each instance on distinct underlying hardware to avoid correlated failure. Partition groups instances into blocks that share no hardware between blocks, for replicated distributed systems.

open as a page

Your team wants to move an EC2 fleet from x86 instances to AWS Graviton types such as m7g. What actually has to change for the workload to run, and how would you validate the move before committing?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Graviton instances are arm64, so everything compiled has to change: an arm64 AMI, arm64 runtimes, recompiled native code and multi-architecture container images. Interpreted code usually moves untouched; native dependencies and third-party agents are where migrations stall.

open as a page

How do you decide which EC2 instance family and size to run a service on, and why is a fleet of many small instances not automatically cheaper or safer than fewer large ones?

level: principalimportance: should knowfreq 45%

basics

~20 s

Pick the family from the resource your workload is actually bound by, then the size from measured usage plus headroom. Small sizes carry burstable network and EBS bandwidth and pay fixed per-instance overhead repeatedly; large ones concentrate blast radius and coarsen scaling steps.

open as a page

What is the AWS Nitro system, and what does running on Nitro-based EC2 instance types change for the operating system and AMI you boot?

level: middleimportance: nice to knowfreq 32%

basics

~20 s

Nitro is the hardware and hypervisor platform behind current EC2 instances: dedicated cards take over networking, storage and management so nearly all host resources go to the guest. Practically, volumes appear as NVMe devices and the AMI needs ENA and NVMe drivers.

open as a page