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.

Image

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
2
3
4
5
6
7
[root@ip-172-18-160-187 /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 100G 0 disk
├─nvme0n1p1 259:2 0 100G 0 part /
└─nvme0n1p128 259:3 0 1M 0 part
nvme1n1 259:1 0 1.3T 0 disk
nvme2n1 259:4 0 1.3T 0 disk

In this instance type, the attached NVME volume can achieve the 230k IOPS as below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[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
job1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
fio-2.14
Starting 1 process
Jobs: 1 (f=1): [w(1)] [100.0% done] [0KB/787.6MB/0KB /s] [0/202K/0 iops] [eta 00m:00s]
job1: (groupid=0, jobs=1): err= 0: pid=266: Fri Jan 26 23:18:07 2024
write: io=10240MB, bw=917710KB/s, iops=229427, runt= 11426msec
slat (usec): min=0, max=195, avg= 3.73, stdev=10.48
clat (usec): min=203, max=1199, avg=553.89, stdev=149.49
lat (usec): min=204, max=1200, avg=557.62, stdev=150.69
clat percentiles (usec):
| 1.00th=[ 258], 5.00th=[ 262], 10.00th=[ 266], 20.00th=[ 286],
| 30.00th=[ 604], 40.00th=[ 620], 50.00th=[ 628], 60.00th=[ 628],
| 70.00th=[ 636], 80.00th=[ 644], 90.00th=[ 652], 95.00th=[ 660],
| 99.00th=[ 676], 99.50th=[ 676], 99.90th=[ 684], 99.95th=[ 684],
| 99.99th=[ 748]
lat (usec) : 250=0.04%, 500=21.03%, 750=78.92%, 1000=0.01%
lat (msec) : 2=0.01%
cpu : usr=13.83%, sys=35.84%, ctx=128620, majf=8, minf=11
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.1%
issued : total=r=0/w=2621440/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
latency : target=0, window=0, percentile=100.00%, depth=128

Run status group 0 (all jobs):
WRITE: io=10240MB, aggrb=917710KB/s, minb=917710KB/s, maxb=917710KB/s, mint=11426msec, maxt=11426msec

Disk stats (read/write):
nvme1n1: ios=41/2616064, merge=0/0, ticks=3/1305473, in_queue=1305476, util=99.30%

You can also attach EBS volumes(e.g. nvme3n1) as needed.

1
2
3
4
5
6
7
8
[root@ip-172-18-160-187 /]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 100G 0 disk
├─nvme0n1p1 259:2 0 100G 0 part /
└─nvme0n1p128 259:3 0 1M 0 part
nvme1n1 259:1 0 1.3T 0 disk
nvme2n1 259:4 0 1.3T 0 disk
nvme3n1 259:5 0 500G 0 disk

Reference