AWS continues to upgrade EC2 families with new capabilities and price/performance characteristics. Next generation instances were added recently to Compute Optimized instance family (C5) and General Purpose instance family (M5). C5 instances are powered by 3.0 GHz Intel® Xeon® Scalable processors (Skylake) and offer 25% price/performance improvement over C4 instances. M5 instances are powered by 2.5 GHz Intel® Xeon Platinum 8175 processors (formerly codenamed Skylake), and featuring Intel’s newest vector processing instruction set, Advanced Vector Extension 512 (AVX-512). M5 instances offer 14% improvement in price/performance over M4 instances.
Both C5 and M5 instances are based on lightweight Nitro Hypervisor and use Enhanced Networking using Elastic Network Adapters (ENA) offering better Networking performance up to 25Gbs. They also use NVMe interface for EBS connectivity for better EBS performance.
Price comparison of M5 and M4 families shows 4% savings on on-demand Linux usage (and better compute performance) for instances up to 4xlarge.
Price comparison of C5 and C4 families shows a 9%-13% savings on on-demand Linux usage (and better performance).
Can I Upgrade C4/M4 instances And Save?
Theoretically yes, as the comparisons above show. But practically, it is not a simple instance type switch and may involve tedious steps and in some cases may not be easy for everyone.
One needs to consider the following factors before converting C4/M4 instances.
- Elastic Network Adapter (ENA) Support: C5/M5 families use Enhanced Networking based on ENA. Your AMI/OS needs to be ENA enabled. Details on checking if ENA is enabled on your instances/AMI and how to enable it can be found here.
- NVMe Support needed: Your AMI/OS needs NVMe support. Following OS versions support NMVe drivers as per AWS documentation.
Amazon Linux 2014.03 or later Ubuntu 14.04 or later SUSE Linux Enterprise Server 12 or later Red Hat Enterprise Linux 7.4 or later CentOS 7 or later FreeBSD 11.1-RELEASE Windows Server 2012 R2 Windows Server 2016
- File systems mounted using device names: C5/M5 instances use NVMe interface. NMVe uses a different device name scheme. If device names are used for file system mounting (/etc/fstab) they will need to be modified to change the device names or use device ids (recommended).
[ec2-user@ip-172-31-5-142 ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme2n1 259:1 0 1G 0 disk nvme1n1 259:0 0 1G 0 disk nvme0n1 259:2 0 8G 0 disk ├─nvme0n1p1 259:3 0 8G 0 part / └─nvme0n1p128 259:4 0 1M 0 part
- Available Regions: C5/M5 instances are currently available only in the AWS US East (N. Virginia), US West (Oregon), and EU (Ireland) regions. If your C4/M4 instances run elsewhere you are out of luck at least for now.
- Availability Zones: It seems that C5/M5 instances are not available in certain availability zones within the available regions. Since availability zones are account specific, it is hard to know how it impacts each customer. So until you try it you cannot be sure if you can convert your instances even if your instances match all of the above criteria.
In summary, converting C4/M4 instances may not be a trivial task. But for those that are able to go through the analysis and convert could save significantly and improve application performance. At the pace with which AWS moves it is likely that next generation instances will continue to be available in the coming years so the sooner you upgrade the better prepared you are for the future generation instances.
Other Related Blogs
- A Simple Open Source Tool for EC2 RightSizing Analysis
- Simple AWS EC2 scheduler vs Machine Learning driven EC2 scheduler
- Machine learning CPU Utilization for AWS EC2 scheduling
- A Simple script to implement AWS EC2 TTL (Time to Live)
- AWS EC2 Cost Optimization
- Using Efficiency Metrics to Monitor Public Cloud Costs
- How to reduce the size of EBS Windows boot volume in AWS?
- How to shrink EBS root volumes in AWS – with just one click
- How to reduce AWS costs using machine learning driven EBS IOPS provisioning
- AWS Elastic Volumes and FittedCloud EBS Optimizer
- FittedCloud AWS EBS Optimizer for Docker Containers
- An Open Source AWS EBS Cost Analyzer
- Is it possible to use EBS gp2 instead of io1, achieve same performance and save 50%?
- How to optimize AWS EBS using LVM and reduce cost
- How to create thin provisioned AWS EBS volumes and save a ton!
- AWS EBS Performance – Confused?
FittedCloud Cloud Cost Optimization Solutions
FittedCloud offers machine learning based cloud cost optimization solutions that help customers reduce AWS spend significantly. Our current solutions include machine learning driven actionable advisories with click through actions for EC2, EBS, RDS, DynamoDB, ElastiCache, ElasticSearch, AutoScale, Lambda, etc. and full/lights out automation for EC2, EBS, DynamoDB and RDS. Our solution typically can save customers up to 50% of their cost on AWS. For more details, please visit https://www.fittedcloud.com/.