How to Choose the Right Amazon EC2 Instance for Optimum Performance and Cost

Nov 30 2016 | by cdynadmin

21 Flares Twitter 0 Facebook 0 LinkedIn 21 Email -- Filament.io 21 Flares ×

As the market leader in public cloud solutions, Amazon Web Services offers customers a formidable range of EC2 instances. You’re practically spoilt for choice, with more than 50 on-demand instance types, from small burstable instances for low-traffic websites to supersized machines for high-end web servers, large-scale number crunching and big data analysis.

Specifications vary from 500MiB of RAM to a mammoth 1.95TiB, onboard storage from 4GB to 48TB and attached EBS storage volumes from 1GB to 16TB. They also include an extensive range of compute levels and specific processor capabilities. And hourly rates range from $0.0065 up to $14.4 (p2.16xlarge instance at N.Virginia price) for Amazon’s on-demand Linux instances.

But, with so much variation in pricing and capabilities, selecting the right instance for your enterprise IT workloads is no easy challenge. So, in this introductory guide, we’ll take you through the main points you should consider to get the best balance between performance and cost from your Amazon cloud deployments.
What Types of Instance Are Available?
Amazon makes it easy to find the instance you need by breaking them down into different combinations of vCPU, memory, storage and networking capacity to suit different use cases. Each combination is known as an instance type, where each instance type is a range of different-sized instances that share common characteristics and features:

General Purpose
Instance types: T2, M3 and M4
Amazon’s general-purpose range provides you with a balance of compute, memory and network capability, which makes them suitable for mainstream enterprise applications, such as small to medium-sized databases, web servers and cluster computing.

The T2 family offers a number of smaller entry-level instances that are ideal for low-traffic websites, development environments and nascent enterprise applications. It also offers bursting capabilities, based on a credit system, where you accrue credits when your vCPUs are idle and consume credits when they’re active.

The M3 family offers a slightly higher memory-to-vCPU ratio and is characterized by onboard SSD storage for high disk I/O workloads. The M4 is the latest generation of general-purpose instances, which offers EBS optimization at no extra cost.

Compute Optimized
Instance types: C3 and C4
The compute-optimized C3 and C4 families give you a higher ratio of vCPU to memory and the best price per vCPU across the entire AWS instance range. They’re geared towards compute-intensive applications such as high-traffic websites, online gaming and high computational scientific workloads.

The main difference between the two families is that C3 instances are backed by instance store, with up to 640GB SSD directly attached storage, whereas C4 machines are EBS-backed instances with dedicated EBS bandwidth and new-generation Intel processors optimized specifically for EC2.
Memory Optimized
Instance types: X1 and R3
The memory-optimized instance types, X1 and R3, are designed for memory-intensive applications, such as performance-sensitive databases and larger deployments of SAP and Microsoft SharePoint. Both instances are backed by instance store and, in terms of memory, offer the best value for money in the EC2 range.

The R3 comes in five different sizes, with SSD storage up to 640GB, and is often used for its clustering capabilities in distributed big data analytics. The X1 is available in two flavours, the largest of which is a 128-vCPU supersized machine with a colossal 1,952GiB of memory and 3.84TB of local storage. Though the X1 is one of the most expensive EC2 families, it comes in at a lower cost per GiB of RAM of all instance types. The X1 is heavily geared towards SAP HANA, but also offers potential for rehosting large-scale legacy applications.
GPU Optimized
Instance types: G2, P2
The G2 and P2 families take advantage of the parallel processing capabilities of GPU, supplementing general vCPU with high-performance NVIDIA processors..

Powered by GPUs hosting 1,536 CUDA cores and 4GB of video memory, G2 instances are suitable for 3D application streaming, machine learning, video transcoding and a multitude of GPU-accelerated scientific and engineering applications.
The P2 family is Amazon’s latest generation of GPU-optimized instances. It offers more memory per vCPU, 2,496 parallel processing cores and 12GiB of in-processor memory for each GPU and larger overall instance sizes of up to 16 GPUs. It is suitable for high-performance databases, large-scale machine learning, computational finance workloads and other server-side GPU compute workloads.

Storage Optimized
Instance types: I2 and D2
Amazon’s I2 and D2 instances offer low-cost directly attached storage and are designed for storing, processing and analyzing large amounts of data in the cloud.

The I2 family uses high I/O SSD ephemeral storage, which makes it a good fit for performance-sensitive NoSQL databases such as MongoDB and Cassandra. By contrast, the D2 family uses HDD, offers the best-value throughput performance on EC2 and is suitable for high-end MPP data warehousing, log processing and MapReduce jobs.

Each instance type generally comes with a choice of Windows and three Linux distributions—Red Hat Enterprise Linux, SUSE Linux Enterprise Server and a free version based on Red Hat and CentOS. Windows and license-based Linux instances are up to twice the price of their basic Linux counterparts. But you can also bring your own license (BYOL), in which case you’ll pay the same.
What Instance Size Do We Need?
One of the first things you’ll notice when comparing instances is that AWS uses two different units of measure for processing power. Amazon’s own compute unit, the ECU, is its own benchmark measurement designed to give users a consistent and predictable amount of CPU capacity. The vCPU, on the other hand, follows a traditional approach to defining processing power, which is familiar to users of other virtualized environments.

As AWS uses different processors for different instance types, two instances with the same number of vCPUs may not necessarily offer the same compute capability. Therefore you should only use vCPU as a rough guide to the processing power you need.

For more detailed specifications, you can refer to Amazon’s list of EC2 instance types. And it goes without saying that you should track your usage history, and monitor the performance and cost of your instances, bearing in mind you can resize or migrate to another instance any time.
Do We Need Instance Store or an EBS-Backed Instance?
Whereas virtual machines backed by instance store offer the speed benefits of directly attached storage, EBS-backed instances provide far more functionality.

Unlike their instance store counterparts, you can stop and start them to reduce cost whenever your applications aren’t needed. You can resize them dynamically without having to migrate your applications. You can create point-in-time snapshots of both your running instances and your mountable EBS data volumes. They also have built-in redundancy and boot more quickly. And you can also use instance snapshots to create template machine images.

Most EBS-backed instances now offer dedicated bandwidth, known as EBS Optimization, which reduces latency between your different EBS volumes. But, despite the clear advantages of EBS, instances based on instance store are useful for applications that benefit from fast read and write speed. Nevertheless, instance store is both ephemeral and less durable. So you may need to build fault tolerance into your storage architecture or consider backing up your data to EBS or S3.

What Pricing Model Should We Choose?
As well as on-demand pricing, AWS offers alternative pricing models such as Reserved Instances (RIs) in which you commit to reserved capacity in exchange for a discounted hourly rate. If you’re flexible about when your applications run then you could also consider Spot Instances, where you bid on spare EC2 capacity.

However, even though it’s important to be aware of the cost-saving potential of Reserved and Spot Instances, it makes sense to start with the on-demand model until you have a better idea of your utilization. Once you’ve established a clear pattern of your on-demand resource usage you’ll be able to make informed decisions on the likely RI capacity you’ll need and have a clearer picture of the potential savings. Learn more
The Choice Will Only Get Bigger
When estimating the cost of your AWS deployments, don’t forget to include other services you might need, such as load balancing and Amazon’s CloudFront content delivery network. And beware of hidden costs such as data transfer and unused Elastic IP addresses.

But also remember your choice of instances will only get bigger, as AWS continues to enhance its offering with new instance families for different computing challenges. So keep your eyes peeled for new opportunities to improve your application performance and increase cloud cost efficiency.

And who knows? AWS may one day offer a fully flexible build-your-own virtual machine service with a mix-and-match inventory of vCPU, memory, storage and network resources. But, as far as cost monitoring and optimization are concerned, that could be the biggest challenge of all.

Login

SSO Login

Forgot Password?

No account yet? Register.

21 Flares Twitter 0 Facebook 0 LinkedIn 21 Email -- Filament.io 21 Flares ×