How to select EC2 Instance Type

OpsLyft
Guardians of Cloud
Published in
7 min readApr 7, 2020

If an organization is using Amazon Web Services, the use of EC2 instances becomes inevitable for them. At first, the deployment of EC2 instance seems like an easy task to everyone and with a little knowledge of AWS it actually is. But choosing the right type of EC2 instance can be a difficult choice for many people. Initially, people choose an EC2 instance based on the computing power, cost and memory they need.

This kind of selection technique is feasible only when you’re just using a single EC2 instance or when you want to prototype something but if you really want to move your workload and services onto the cloud, then you should really think about learning more about the process of selecting appropriate EC2 instance type. Selecting an appropriate EC2 instance type can make a big difference in your cloud bill and performance.

To help you understand how exactly should you choose an EC2 instance type from the different family types we have created a guide for you which has six deciding factors which are not that popular. These factors will help you decide which EC2 instance suits the best for your workflow and needs. This will ultimately help you save costs which can be really helpful in this ongoing crisis and the added benefit of the performance boost is also there. Let us look at these criteria which will help you in rightsizing your EC2 instance:

1. Storage within Instances

There are many EC2 instance types that have some storage available with them and the caveat is that you don’t even have to pay for it as it is included in the price of the instance. Like EBS volumes will provide instances that have external storage and if you delete the instance even then you will have that storage available to you. We will take a look at those instances which offer internal and external storage in the included price.

Instance families of some kind additionally incorporate an EC2 occurrence store. The instance store is situated on discs that are physically appended to the host PC. This store is undeniably appropriate for the capacity of data that should be accessed to rapidly and often, however that can likewise be viewed as fleeting as opposed to permanent.

Storage that is temporary, for example, buffers, caches, and others can be stored right now, without requiring extra room on the appended EBS volume. Due to the fact that this storage is appended to the instance and included for the expense for the instance, it tends to be confounding while computing storage necessities and expenses.

Source: AWS

However, when you use the internal storage you should keep in mind that it is not permanent. So. if you’re thinking about taking it in use for your long term solutions you should refrain from it.

Storage streamlined instances, for example, the H1 and D2 instance families incorporate HDD based local storage, which is included for the cost of the instance and supports higher throughput rate than would be accessible from EBS volumes joined to the instance. Just as the instance store, this storage is already included for the expense of the instance. H1 instances give you the option to have up to 16TB of local storage and D2 instances give you the option of having up to 48 TB of HDD-based local storage.

Keep in mind that this storage is only available to you as long as the instance exists which is similar to the instance store. While it accommodates extra, and higher throughput of information, it can’t be segregated and connected with an alternate instance, as should be possible with an EBS volume.

2. Transfer Limitations of Storage

You may have different types of applications that have their own needs and some of them may even require a high number of disk reads and writes. You have to take care of this requirement as when you create an EC2 instance, an EBS volume accompanies it and gets created. So to make sure that your application runs smoothly calculate the input and output operations (IOPS) and take a decision whether the EC2 instance and the accompanying EBS volume are correct for you or not.

Explicit families of EC2 instances are EBS-streamlined and exploit an upgraded design stack which can bolster a more significant level of IOPS between the instance and its EBS volume.

There are certain instance types that support EBS optimization so try to enable it whenever you can so that you can take full advantage of it. You can become familiar with which instance families bolster this component and how to arrange it from the AWS EC2 User Guide regarding the matter.

Source: AWS

3. Minimum Requirements

Before you purchase any EC2 instance or plan to get one, you should think about what are the minimum requirements of the task that you’re going to set up on the EC2 instance and not just think about the cost of the EC2 instance. For example, the t2.nano instance type only has a single vCPU allotted to the instance and 0.5 GiB of memory and would throttle if you load a complex processing or a memory-intensive application on it. But it starts at less than $5 a month and the finance department may suggest you use it.

Regardless of whether you are building your own Amazon Machine Image (AMI) or buying an AMI from the AWS marketplace, make certain to check the minimum size requirements and guarantee that the instance type you select can meet or surpass those necessities.

In addition to all of this don’t think that buying an overhead or a sufficient enough instance type will cut the slack. For example SQL Server Enterprise 2017 on Linux: Requires at least 4 GiB of memory, but is recommended to be hosted on an m4.xlarge which has 16 GiB of memory. Windows Server 2016: Requires a minimum of 2 GiB of memory.

4. Performance gain from CPU Bursting

There is a concept called CPU bursting which is available only in T2 and T3 family of instance types. The idea behind it is that virtual machines are relegated a virtual CPU (vCPU) with an assignment of CPU cycles every second. In the event that a machine isn’t working at 100% usage of distributed CPU cycles, the unused limit is changed over into CPU Burst Credits, which are related to a particular instance.

There might be cases in which the instance requires processing power, the machine may exchange Burst Credits for extra CPU limit, permitting the machine to utilize more than its designated CPU cycles, as long as it has abundant credits.

Source: AWS

This element is particularly helpful for machines that don’t get a steady degree of traffic and could hope to surpass their ability every so often. In the event that you anticipate that your service should continue a degree of handling close to 100% of the CPU limit, instance types without CPU bursting might be a superior decision.

Points that you should keep in mind:

  • Restarting instances in the T2 family brings about a loss of every single gathered credit.
  • CPU credits accumulate dependent on the instance type. Bigger instances collect more credits every hour.
  • There is a cutoff to the number of credits that can collect. Larger instances sizes have a higher cutoff.
  • Credits for instances in the T3 family persevere their credits for seven days if the instance is halted.

5. Consider EMR

To support big data frameworks there is Amazon Elastic MapReduce (EMR) which is a managed cluster platform. Using an EMR cluster, you can ingest a lot of information and have it prepared over all instances in your bunch, while AWS deals with arranging and dealing with the cluster.

While making your EMR group, you are answerable for figuring out which occasion type to use for the master and slave nodes. The inability to choose a bolstered instance type or an instance type that is inaccessible in your picked location may bring about a failure arrangement process, or the cluster entering an inert state.

You can study AWS EMR through the official EMR documentation.

6. Network Bandwidth Requirement

Numerous organizations decide to migrate their application to the AWS Cloud with the goal that they can support and scale online applications for clients over the world.

There might be a chance that you are managing gigantic migration of data or a high volume of traffic, you may run into confinements on the size of the network connection between your instance and customers who are assigned to it. However there are instance families and explicit instance types inside those families that can bolster 10 Gbps or 20 Gbps of transfer speed. But the caveat is that only these instance families support this level of network bandwidth.

Source: AWS

For a network-intensive application or if you are migrating a lot of data, at that point guarantee that you select an instance type that can bolster a great network bandwidth. A few families which bolster upgraded networking with up to 10 Gbps are the C3, C4, D2, I2, and R3 families.

The P2, R4 and X1 families utilize an Elastic Network Adapter and can bolster up to the 20 Gbps.

Get your answers at Opslyft

In this article, we tried to explain to you the process of how to choose the EC2 instance type according to your needs and preferences but if you still are not completely sure what type of EC2 instance you should use, we can help you. Opslyft has a well-experienced team who are experts in AWS and can guide you thoroughly through this process. We aim at optimizing the infrastructure of organizations which will ultimately help them save costs and get some overhead for development rather than problem-solving.

--

--

OpsLyft
Guardians of Cloud

On a mission to make cloud simpler for organizations across the globe. Join us on our journey: www.opslyft.com