Cloudability logo
E-book - Choosing the Right EC2 Instances to Optimize Your Cloud

Amazon EC2 Comparisons: C4 vs. C5

By Gavin Cahill on January 29, 2019
Side-by-side, C5 is faster, more powerful and cheaper than C4, but is migrating workloads from C4 to C5 always the best choice?

Amazon Elastic Cloud Computing (EC2) has a dozen different instance families, each designed for specific applications. The C instances are optimized for compute workloads, with a higher ratio of vCPUs to memory and the lowest cost per vCPU. A general purpose m5.large, for example, has two vCPU for eight GiB of memory and an On-Demand price of $0.096/hr (Linux US West – Oregon region), while a c5.large has two vCPU and four GiB of memory for $0.085/hr. (For more information, check out our M5 vs. C5 blog.)

In this post, we’re going to dig into the C4 and C5 families to look at how they compare in terms of performance and price.

Amazon EC2 C5 Specs

Initially released in November of 2017, the C5 family is built on 3.0 GHz Intel Xeon Scalable (Skylake) processors. Using the Intel Turbo Boost Technology, each processor can be run at speeds up to 3.5 GHz. But a big part of the C5’s power isn’t in the raw processor speed — it’s in the hypervisor. Like many of the current-gen EC2 instances (M5, A1, T3, etc.), the C5 is based on the Nitro system, which includes the Nitro hypervisor, Nitro card and Nitro security chip.

Size vCPU Mem (GiB) Storage (GiB) Dedicated EBS Bandwidth (Mbps) Network Performance (Gbps)
c5.large 2 4 EBS-Only Up to 3,500 Up to 10
c5.xlarge 4 8 EBS-Only Up to 3,500 Up to 10
c5.2xlarge 8 16 EBS-Only Up to 3,500 Up to 10
c5.4xlarge 16 32 EBS-Only 3,500 Up to 10
c5.9xlarge 36 72 EBS-Only 7,000 10
c5.18xlarge 72 144 EBS-Only 14,000 25
C5 instance specs.

Over its first year, the C5 proved so effective at compute workloads that AWS built on its success, introducing the C5d (with attached storage) and the C5n (with increased network speeds). In a future blog, we’ll dig deeper into comparing the various C5 variations.

Amazon EC2 C4 Specs

The C4 family was released in early 2015, and is built on the Intel Xeon E5-2666 v3 (Haswell) processors. The base speed of these processors is 2.9 GHz, but they can also be boosted to 3.5 GHz using Intel Turbo Boost Technology.

Size vCPU Mem (GiB) Storage (GiB) Dedicated EBS Bandwidth (Mbps) Network Performance (Gbps)
c4.large 2 3.75 EBS-Only 500 Moderate
c4.xlarge 4 7.5 EBS-Only 750 High
c4.2xlarge 8 15 EBS-Only 1,000 High
c4.4xlarge 16 30 EBS-Only 2,o00 High
c4.8xlarge 36 60 EBS-Only 4,000 10 Gbps
C4 instance specs.

What’s the difference between AWS EC2 C4 and C5 instances?

Truth be told, C5 is bigger, faster and cheaper than C4 across the board. But let’s dig into the numbers a little bit. We’ll start with the two charts above. The first thing you probably noticed is that C5 has an extra instance size: the c5.18xlarge. Beyond that, C5 has more memory and higher EBS bandwidth across all instance sizes.

So obviously, C5 is going to give you more performance, which makes sense since it’s a newer generation than C4. But how does that influence costs? Turns out, C5 beats C4 there, too.

Instance Size C4 price C5 price
large $0.10/hr $0.085/hr
xlarge $0.199/hr $0.17/hr
2xlarge $0.398/hr $0.34/hr
4xlarge $0.796/hr $0.68/hr
8xlarge (9xlarge) $1.591/hr $1.53/hr
18xlarge N/A $3.06/hr
Prices are On-Demand rate in US West (Oregon) for Linux instances.

Why stay with EC2 C4 instances?

Most use cases would be benefited by choosing C5 instances over C4, but there are a couple situations where organizations might want to stay with C4 over C5:

You’ve Purchased Standard Reserved Instances (RIs) for C4 Instances

Standard RIs are tied to a particular instance type and family, so any C4 RIs you have won’t apply to C5 instances. RIs are powerful cost control tools, and their potential savings far outweigh any financial benefit you’d get from switching to C5. Think of it this way: A Standard RI with a three-year term and No Upfront payment for a c4.large has an effective hourly rate of $0.051/hr. The On-Demand rate of a c5.large is $0.085/hr. So if you’ve already purchased C4 RIs, you’re better off staying with C4 until the RI term is done and then switching to C5s.

Regulation and Governance Approval

C4 and C5 instances run on different hardware systems. C4 runs on Haswell chips, while C5 runs on Skylake with the Nitro system. In some situations, such as governmental clouds, all resources have to be vetted and approved. So it’s possible that the C4 might be approved while the C5 isn’t. If you find yourself in this situation, you’ll obviously stick with C4, but you should strongly consider getting C5 on the approved list.

Is It Always Best to Migrate C4 to C5?

In general, you’re going to save money and get more power by migrating C4 workloads to C5 instances, but that doesn’t mean it’s always the best optimization option. Workloads and instance requirements are always changing in the cloud, so it’s important to fully evaluate your instance use before making a migration decision. Also, it’s common for projected compute use to be different than actual use. A workload you thought would be constant might run in bits and starts, which means it might be better to use a burstable T3 instance instead.

At Cloudability, we always recommend looking at all your options before migrating workloads. To help with this, we built our Rightsizing feature, which takes your actual usage (via AWS Cloudwatch), uses machine learning to predict future use, then returns optimization actions along with projected resource clipping risks.

In this example, moving a C4 workload to an M5 or C5 would save similar amounts…

…but the M5 is recommended because the extra memory fits the workload better.

Rightsizing and workload migration is a key part of the Cost Optimization pillar of the AWS Well-Architected Framework, but there’s no such thing as a unilateral best option like blindly switching all C4 loads to C5 instances. Your choices should always be based on your usage, your infrastructure and your company. The more data you have and the more visibility you have into your cloud costs and usage, the better decisions you’ll make.

In the end, it’s well worth your time to figure out a migration plan for any C4 instances you’re running. Just make sure you consider all of your options.


Find out more about choosing the right EC2 instances by downloading our Choosing the Right EC2 Instances to Optimize Your Cloud e-book!

Being in the know feels great