AWS CloudOps 101 — EC2 : A Deep Dive into AWS’s Virtual Servers
Hello Readers! I welcome you to my deep dive into the world of AWS EC2 instances. Now, I know what most of you’re thinking; ‘I already know about EC2 instances. I’ve been using them my whole life. I’ve never needed a deep dive and why now? Why should I go through your post?’ And you’re right. Sure, you don’t need to know every little detail to use it, but if you want to get the most out of it, even a little bit of additional knowledge goes a long way.
Now, EC2’s current offerings consist of a whopping 103 instance types, each designed for a specific purpose, and they all have different sizes. Knowing which to use when can significantly enhance your application’s performance while keeping costs to a minimum
The Anatomy of EC2 Naming Convention
EC2 instance types are identified by a naming convention that reflects their family, generation, additional capabilities, and size. This standardized naming scheme helps users to quickly identify the key features of each instance type and choose the best option for their specific workload.
Let’s take a closer look at these four components and explore what they can tell us about an EC2 instance.
Instance Family
Instance families are like groups of instances that share common traits and abilities. Each of these families is designed for a specific use case, workload, or application.
Understanding the each family, will let you use the best instance for your workload
Right, as of today, AWS has 6 EC2 families.
General Purpose are quite versatile and offer a balanced mix of computing, memory, and networking resources.
- They’re great for a wide range of workloads like running web applications or small databases, and building development and testing environments.
- Follows 1:4 ratio for CPU to Memory
- Members are A, M, T & Mac
Compute Optimized are purpose-built for tasks that require a lot of computing power but don’t necessarily need a large amount of memory.
- Well-suited for a variety of compute-intensive applications. From batch processing workloads to media transcoding, high-performance web servers to scientific modeling, and even dedicated gaming servers and machine learning inferences.
- Follows 1:2 ratio for CPU to Memory
- Just one member here. C
Memory Optimized are optimized for memory-intensive workloads that process large data sets in memory
- If you’re working with big data and need to perform operations like in-memory databases and analytics or real-time processing, these instances would be just the ticket!
- Follows a range of 1:4 to 1:32 ratio for CPU to Memory
- Members are R, X, U aka High Memory & Z
Accelerated Computing are designed to deliver high performance for computationally demanding workloads. What makes them so effective are the hardware accelerators they’re equipped with, such as GPUs, FPGAs, and Media Accelerator Cards. These accelerators can really boost performance for specific types of workloads
- Now, these instances can be a bit more pricey than the standard instances, but the performance gains are often well worth it.
- Ideal for machine learning, scientific simulations, graphics rendering, and even big data mining tasks
- Members are P, DL, Trn, Inf, G, F & VT
Storage Optimized designed to handle workloads that require high, sequential read and write access to very large data sets on local storage. They’ve been optimized to deliver tens of thousands of low-latency, random I/O operations per second (IOPS) to applications. High disk IO is certainly an important aspect of these instances, but it wouldn’t be very useful without good network throughput as well. Luckily, these instances tend to offer more network performance at smaller instance sizes than any other type
- Perfect for workloads that require high-speed data access such as NoSQL databases, in-memory databases, and data warehousing. Quite useful for applications that require high-performance file systems like video processing and scientific simulations.
- Follows a range of 1:4 to 1:8 ratio for CPU to Memory
- Members are Im, Is, I, D & H
HPC Optimized are purpose-built to offer the best price performance. These instances are ideal for applications that require high-performance processors, such as large, complex simulations and deep learning workloads. With their impressive capabilities, they can help you handle even the most demanding workloads with ease.
- Just two instances here. hpc6id.32xlarge & hpc6a.48xlarge
Instance Generation
EC2 instances comes in different generations, each one designed to be better than the last. These generations are crafted to enhance performance, reliability, and security, so you can rest assured that you’re getting the most out of your computing resources.
Think of iPhones. 7 is better than 6. Now I purposely used older versions there. But new ones too.. 14 is better than 13 (presumably 😉)
With EC2 instances, you can choose between an Intel processor and AWS’s ARM-based Graviton processor. Both these jumps architecture versions with the generations. Graviton 1 was used by 1st Gen EC2s, Graviton 2 was used by 2nd–6th Gens, and Graviton 3 is used by 7th Gen. For Intel, the 3rd Gen was Haswell, the 4th Gen was Broadwell, and then 5th to current Gens are using Lake. Personally, I’ve been using the Graviton CPU more recently because it’s a little less expensive than its Intel counterpart.
Now, modern EC2 instances are powered by AWS Nitro. The Nitro Cards are a family of cards that offloads and accelerates IO for functions, ultimately increasing overall system performance. Key cards include Nitro Card for VPC, Nitro Card for EBS, Nitro Card for Instance Storage, Nitro Card Controller, and Nitro Security Chip.
Additional Capabilities
The following are the additional capabilities indicated by the instance type names
a - AMD processors
g - AWS Graviton processors
i - Intel processors
d - Instance store volumes
n - Network optimization
b - Block storage optimization
e - Extra storage or memory
z - High frequency
You can have more than one capabilities for an instance. For an example m6gd.large
consists of a Graviton processor and Instance Store volumes
Instance Sizes
EC2 instances come in a variety of sizes, each one tailored to suit different computing workloads and requirements. And the size of an instance is typically determined by the amount of compute resources it offers, such as CPU, memory, storage, and network bandwidth.
These different instance sizes are categorized based on the amount of virtual CPU and memory they provide.
Sizes may comes between nano (the smallest offering) to 112xlarge. The resource increased in a linear way so it’s quite easy to remember the sizes. However, it’s worth noting that there are 10xlarge, 12xlarge, and a few additional unusual Xxlarge sizes are there.
Final Thoughts
I hope this articled helped you all to understand the EC2s naming and purpose of each instance family. I tried to keep it as simple as possible and purposely ignored the payment options (on-demand, spot..) and network performances here.
Another article on AWS Networking is coming down the line and I’ll cover the EC2 networking there.
Amazon EC2 Instance Comparison is an excellent tool to find out the instance specifications
I’m planning to discuss other core AWS CloudOps offerings such as EBS, Security Groups, Elastic Network Interfaces in future posts. So stay tuned!
Since you read all the way through, to show my gratitude, here’s a Haiku I’ve written on EC2 :)
Through the cloud,
EC2 instances take flight,
Cloud computing thrives.