Find how many containers or VMs pack onto one EC2 instance after reservations, and which dimension binds first.
Packing density is a two-dimensional floor division, and the smaller of the two answers wins — one dimension always runs out first and the other's remainder is stranded. Reservations matter more than they look on small instances: 0.5 vCPU and 4 GB held back is 3% of a 16-vCPU node but a quarter of a 2-vCPU one, which is why larger nodes pack more efficiently. The binding dimension tells you which way to change instance shape — memory-bound packing wants an R family, vCPU-bound packing wants a C family — and that choice moves cost per workload far more than shaving requests.
EC2 Instance Density
density = min(floor(allocatable vCPU ÷ vCPU request), floor(allocatable memory ÷ memory request), hard limit); instances = ceil(workloads ÷ density).
density = min(floor(allocatable vCPU ÷ vCPU request), floor(allocatable memory ÷ memory request), hard limit); instances = ceil(workloads ÷ density). Packing density is a two-dimensional floor division, and the smaller of the two answers wins — one dimension always runs out first and the other's remainder is stranded. Reservations matter more than they look on small instances: 0.5 vCPU and 4 GB held back is 3% of a 16-vCPU node but a quarter of a 2-vCPU one, which is why larger nodes pack more efficiently.
The binding dimension tells you which way to change instance shape — memory-bound packing wants an R family, vCPU-bound packing wants a C family — and that choice moves cost per workload far more than shaving requests.
This calculator takes 8 inputs: Instance vCPUs, Instance memory, vCPU reserved for the OS and agents, Memory reserved for the OS and agents, vCPU requested per workload, Memory requested per workload, Workloads to place, Hard per-instance workload limit. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.