Amazon recently introduced the next generation of their compute-optimized instances: EC2 C5 instances. Compute instances are well suited to compute-heavy workloads such as batch processing, distributed analytics, high-performance computing etc.

If you are considering whether you should migrate your workload from the previous generation instance families to C5, then the next couple of sections should help with the decision.

What’s new in C5?

The C5 instances are powered by the Skylake processor from Intel. The Skylake processor has several improvements over the Haswell processor which is used in the C4 instance family.

Amazon has also introduced a new instance type for the C5 instance family, c5.18xlarge, which provides 72 vCPUs and 144 GB of memory. There is no comparable instance type in any of the previous instance families.

Comparing C4 and C5 instances

Let’s take a closer look at the differences between the two instance families.

Specs

The C5 instances are powered by the next generation of the Intel® Xeon® Processor family called Skylake whereas the C4 instances are based upon the older generation processor called Haswell. The C5 instances also use Amazon’s new lightweight hardware accelerated hypervisor.

The instance sizes look pretty similar between C4 and C5. AWS introduced a new and larger size for the C5, c5.18xlarge.

The C5 instances use the next generation Elastic Network Adapter (ENA) and can offer up to 25 Gbps of network bandwidth which is significantly faster than the comparable C4 instances.

Instance Type Memory vCPUs Network Performance
c5.large 4 GIB 2 vCPUs Up to 10 Gbps
c5.xlarge 8 GIB 4 vCPUs Up to 10 Gbps
c5.2xlarge 16 GIB 8 vCPUs Up to 10 Gbps
c5.4xlarge 32 GIB 16 vCPUs Up to 10 Gbps
c5.9xlarge 72 GIB 36 vCPUs 10 Gigabit
c5.18xlarge 144 GIB 72 vCPUs 25 Gigabit
Instance Type Memory vCPUs Network Performance
c4.large 3.75 GIB 2 vCPUs Moderate
c4.xlarge 7.5 GIB 4 vCPUs High
c4.2xlarge 15 GIB 8 vCPUs High
c4.4xlarge 30 GIB 16 vCPUs High
c4.8xlarge 60 GIB 36 vCPUs 10 Gigabit

Performance

We used Geekbench to compare the performance of the two instance families. Geekbench is a processor benchmarking program. It runs a series of tests on a processor and times how long the processor takes to complete the tasks. The faster the CPU, the higher the score.

C5 instances are significantly faster than the C4 instances. c5.8xlarge, for example, is almost 24% faster than c4.8xlarge.

Instance Type c5 score c4 score Improvement
large 4914 4411 11.4%
xlarge 9062 8255 9.77%
2xlarge 17367 15166 14.51%
4xlarge 30445 27150 12.17%
8xlarge 51674 41802 23.61%

Pricing

We compared the prices between the two instance families by looking at the price per core per hour for each instance type. C5 instances are between 4 to 15% cheaper than C4 instances.

Price/core for Linux reserved instances:

Instance Type c5 c4 Improvement
large $0.0270 $0.0315 14.29%
xlarge $0.0268 $0.0315 14.92%
2xlarge $0.0268 $0.0315 14.29%
4xlarge $0.0268 $0.0315 14.29%
8xlarge $0.0268 $0.0280 4.29%

Price/core for Linux on-demand instances:

Instance Type c5 c4 % difference
large $0.0425 $0.0500 15.00%
xlarge $0.0425 $0.0498 14.66%
2xlarge $0.0425 $0.0498 14.66%
4xlarge $0.0425 $0.0498 14.66%
8xlarge $0.0425 $0.0442 3.85%

Conclusion

Overall, the new C5 instances offer a much better performance and price compared to the C4 instances.

Please feel free to leave any comments below if you have any questions or feedback.