EC2 Instance Density Calculator
Find how many containers or VMs pack onto one EC2 instance after reservations, and which dimension binds first.
Inputs
Kubernetes defaults to 110 pods per node; the EC2 network-interface and IP limits can bite sooner.
Instances Required
14
Workloads per Instance
30
Binding Constraint
Memory requests fill the instance first
vCPU Filled
93.8%
Memory Filled
93.8%
Spare Slots in the Last Instance
20
Step by step
Values used
Instance vCPUs = 16 vCPU; Instance memory = 64 GB; vCPU reserved for the OS and agents = 0.5000 vCPU; Memory reserved for the OS and agents = 4 GB; vCPU requested per workload = 0.5000 vCPU; Memory requested per workload = 2 GB; Workloads to place = 400 workloads; Hard per-instance workload limit = 110 workloads
EC2 Instance Density
density = min(floor(allocatable vCPU ÷ vCPU request), floor(allocatable memory ÷ memory request), hard limit); instances = ceil(workloads ÷ density).
Instances Required
= 14
Workloads per Instance
= 30
Binding Constraint
= Memory requests fill the instance first
vCPU Filled
= 93.8
Memory Filled
= 93.8
Spare Slots in the Last Instance
= 20
How it works
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.
Formula
EC2 Instance Density
density = min(floor(allocatable vCPU ÷ vCPU request), floor(allocatable memory ÷ memory request), hard limit); instances = ceil(workloads ÷ density).
- allocatable
- Instance capacity left after OS and agent reservations
- request
- Guaranteed resource each workload asks for
- hard limit
- Pods, ENIs or secondary IPs the instance type allows
Frequently Asked Questions
How is EC2 Instance Density calculated?
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.
Why does EC2 Instance Density matter?
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.
What values do I need to enter?
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.
You might also need
- EC2 Instance Right-Sizing CalculatorCommonly used together
- EC2 Memory Utilization CalculatorCommonly used together
- EC2 vCPU Requirement CalculatorCommonly used together
- Reserved Instance Savings CalculatorAlso in AWS Compute
- EC2 Instance Cost CalculatorAlso in AWS Compute
- EC2 Boot Time CalculatorAlso in AWS Compute