Continuing on with the theme of previous cheat sheet articles, this article will help decode the format for Amazon Web Services' Elastic Compute Cloud (EC2) instance types.
An EC2 instance type provides the definition for the size and certain capabilities of the instance:
- Amount of RAM
- Number of vCPUs
- Clock speed of the vCPUs
- Presence/absence of GPUs and FPGAs
- Network connectivity speed and capabilities
- Presence/absence of local storage
Some of this information can be gleaned from the instance type name. For the information that can't, refer to the links below in the references section.
Here is an example of an instance type name: c5d.2xlarge
|family||generation||[optional] generation sub-indicator (eg, presence of local storage, aka instance storage)||"t-shirt size"; defines amount of RAM and number of vCPUs|
Each instance type belongs to a family of instance types where the family defines what the type is optimized for.
- General compute: m, t
- Compute optimized: c
- Memory optimized: r, x, z
- Storage optimized: d, h, i
- Accelerated computing: f, g, p
The generation provides distinction between instance types of the same family but where the technology used for that type has been modified. As an example, when a newer generation of CPU is introduced on the physical host, the generation number might be incremented to indicate that there is a performance and/or clock speed difference between two instance types of the same family.
This single-digit value indicates the instance type is somehow distinct from its adjacent family/generation cousin.
- d: This instance type offers local, aka "instance", storage. In addition to Elastic Block Storage (EBS) volumes, an instance launched on this instance type can use locally attached storage right on the physical host.
- n: This instance type offers up to 100 Gb/s (yes, that's one hundred) of network throughput.
The "t-shirt size" indicates how much RAM and number of vCPUs that will be available to the instance when launched using this type.
The general rule of thumb for decoding this is (I see at least one exception to this, but this works for the majority of instance types):
- A large has 2x vCPUs
- An xlarge has 4x vCPUs. Think of the "x" in "xlarge" meaning "multiply the base 2 vCPUs by 2"
- A 2xlarge has 8x vCPUs. Take the base 2 vCPUs multiple by 2 for the "x" in "xlarge" and multiple by another 2 for the "2" in "2xlarge": 2 x 2 x 2 == 8.
- This pattern continues for 4xlarge, 8xlarge, and so on up the line
- Unfortunately, RAM cannot be decoded this way because base RAM amounts are highly dependent on the instance type family. Use the links below in the references section for information on amount of RAM in each instance type.
Here's an example of decoding the instance c5d.9xlarge:
- This is a compute-optimized type ("c")
- Specifically, it's the 5th generation of this type ("5")
- It has locally attached storage ("d")
- It has 36 vCPUs (2 for large, 2 for "x", 9 for the "9": 2 x 2 x 9 == 36).
Disclaimer: The opinions and information expressed in this blog article are my own and not necessarily those of Amazon Web Services or Amazon, Inc.