Upgrading to AWS EC2 C5/M5 Instances to Reduce Cost and the Caveats

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.

VCPU ECU MEMORY(GIB) LINUX USAGE VCPU ECU MEMORY(GIB) LINUX USAGE PRICE DIFFERENCE
M5
large
2 10 8 $0.096 per Hour M5 large 2 6.5 8 $0.1 per Hour 4.00%
M5 xlarge 4 25 16 $0.192 per Hour M5 xlarge 4 13 16 $0.2 per Hour 4.00%
M5 2xlarge 8 31 32 $0.184 per Hour M5 2xlarge 8 25 32 $0.4 per Hour 4.00%
M5 4xlarge 16 61 64 $0.765 per Hour M5 4xlarge 16 53.5 64 $0.8 per Hour 4.00%
M5 10xlarge 40 124.5 160 $2 per Hour N/A
M5 12xlarge 48 173 192 $2.304 per Hour N/A
M5 16xlarge 64 188 256 $3.2 per Hour N/A
M5 24xlarge 86 345 384 $4.608 per Hour N/A

 

Price comparison of C5 and C4 families shows a 9%-13% savings on on-demand Linux usage (and better performance).

VCPU ECU MEMORY(GIB) LINUX USAGE VCPU ECU MEMORY(GIB) LINUX USAGE PRICE DIFFERENCE
c5
large
2 9 4 $0.145 per Hour c4
large
2 8 3.75 $0.16 per Hour 9%
c5 xlarge 4 17 8 $0.23 per Hour c4 xlarge 4 16 7.5 $0.258 per Hour 11%
c5 2xlarge 8 34 16 $0.47 per Hour c4 2xlarge 8 31 15 $0.528 per Hour 11%
c5 4xlarge 16 68 32 $0.61per Hour c4 4xlarge 16 62 30 $0.826 per Hour 13%
c5 9xlarge 36 141 72 $1.56per Hour c4 8xlarge 36 132 60 $1.721 per Hour 4%
c5 18xlarge 72 281 144 $3.19 per Hour N/A

 

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.

  1. 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.
  2. 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

3. 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

4. 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.

5. 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 the above criteria.

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.

Editor’s note: This post was originally published on the now retired FittedCloud blog (January 2018).

Download 4 steps to successfully monitor and optimize hybrid IT

A hybrid IT approach offers the best of both on-premises and public cloud by keeping costs and risk low while increasing efficiency and speed. But monitoring and optimizing hybrid environments is complicated.

Apptio® Cloudability provides cost and resource optimization capabilities across all leading public cloud providers (AWS, Azure and Google Cloud) so IT leaders can increase the efficiency of public cloud spending and slash waste from over-purchase and underuse.

Try Apptio Cloudability for free 

Article Contents

Categories

Tags

Additional Resources