Understanding EC2 Instance and Storage Volume Types
Intro
When you launch an instance, the instance type you specify determines the hardware of the host computer used for your instance, such as CPU, memory, storage and network.
Amazon EC2 dedicates some resources, such as CPU, memory, and instance storage, to a particular instance. And it shares other resources, such as the network and the disk subsystem, among instances.
Instance type naming convention
Amazon EC2 instance types are named based on their family, generation, processor family, additional capabilities, and size.
Instance families:
- C – Compute optimized
- D – Dense storage
- F – FPGA
- G – Graphics intensive
- Hpc – High performance computing
- I – Storage optimized
- Im – Storage optimized with a one to four ratio of vCPU to memory
- Is – Storage optimized with a one to six ratio of vCPU to memory
- Inf – AWS Inferentia
- M – General purpose
- Mac – macOS
- P – GPU accelerated
- R – Memory optimized
- T – Burstable performance
- Trn – AWS Trainium
- U – High memory
- VT – Video transcoding
- X – Memory intensive
Processor families:
- a – AMD processors
- g – AWS Graviton processors
- i – Intel processors
Additional capabilities:
- b – EBS optimized
- d – Instance store volumes
- n – Network and EBS optimized
- e – Extra storage or memory
- z – High performance
- q – Qualcomm inference accelerators
- flex – Flex instance
Available Instance Types
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases.
- General purpose
- Compute optimized
- Memory optimized
- Storage optimized
- Accelerated computing
- High-performance computing
Instances built on the Nitro System
The Nitro System provides bare metal capabilities that eliminate virtualization overhead and support workloads that require full access to host hardware. Bare metal instances are well suited for the following:
- Workloads that require access to low-level hardware features (for example, Intel VT) that are not available or fully supported in virtualized environments
- Applications that require a non-virtualized environment for licensing or support
There are both virtualized instances and baremetal instances(name as *.metal) built on Nitro system.
In general, you can just use the virtualized instances unless you know what you need with the baremetal instances.
Storage volume types
Some instance types support EBS volumes and instance store volumes, while other instance types support only EBS volumes.
The following is an exmaple of instance type m6idn.12xlarge. When you launch it, the NVMe instance store volumes(2x 1425GB NVMe SSD) are automatically attached to the instance.
1 | [root@ip-172-18-160-187 /]# lsblk |
In this instance type, the attached NVME volume can achieve the 230k IOPS as below.
1 | [root@ip-172-18-160-187 /]# fio --blocksize=4k --ioengine=libaio --readwrite=randwrite --filesize=10G --group_reporting --direct=1 --iodepth=128 --randrepeat=1 --name=job1 --filename=/dev/nvme1n1 |
You can also attach EBS volumes(e.g. nvme3n1) as needed.
1 | [root@ip-172-18-160-187 /]# lsblk |