AWS EC2 Instance Comparison: C6g Vs M6g Vs R6g
AWS has a lot of different instance types and it can be difficult to decide which instance type would be the best for a particular use-case. In this article, we will compare three popular instance types: C6g, M6g and R6g, across various dimensions such as their specs, their performance as well the cost.
Comparing C6g, M6g and R6g instance families
M6g Instances
Amazon EC2 M6g Instances offer a balance of compute, memory and networking resources and thus they are ideal for a broad range of workloads.

R6g Instances
Amazon EC2 R6g instances are memory-optimized instances. R6g instances are well suited for memory-intensive applications such as high-performance databases, distributed web scale in-memory caches, mid-size in-memory databases, real-time big data analytics, and other enterprise applications.

C6g Instances
Amazon EC2 C6g instances are optimized for compute. C6g instances offer the lowest price per vCPU in the Amazon EC2 family and are ideal for running advanced compute-intensive workloads.

Become An AWS Expert
Receive a weekly newsletter with in-depth articles and tutorials about AWS. No spam ever.
Subscribers get cheatsheets and guides.
Email AddressPerformance
We compared the performance between these instance families by running a bunch of tests on the following instances:
- c6g.2xlarge
- m6g.2xlarge
- r6g.2xlarge
| Instance Type | Number of cores | Memory (GB) |
|---|---|---|
| c6g.2xlarge | 8 | 16 |
| m6g.2xlarge | 8 | 32 |
| r6g.2xlarge | 8 | 64 |
We will be using Sysbench to run various tests to measure the CPU, Memory and Disk performance.
CPU
We ran the CPU benchmark using the following command: sysbench cpu --cpu-max-prime=20000 --threads=8 run . We will be comparing the total time as well as the total number of events for the benchmark from start to end.
As we can see from the results below, c6g.2xlarge performed the best on this benchmark.
c6g.2xlarge
General statistics: total time: 10.0009s total number of events: 86278m6g.2xlarge
General statistics: total time: 10.0009s total number of events: 86191r6g.xlarge
General statistics: total time: 10.0009s total number of events: 86191Memory
We ran the CPU benchmark using the following command: sysbench memory --memory-block-size=1M --memory-total-size=100G --num-threads=8 run. We will be comparing the Operations performed for the different instance types.
In this benchmark, r6g.2xlarge performed the best.
c6g.2xlarge
Total operations: 102400 (101111.56 per second) 102400.00 MiB transferred (101111.56 MiB/sec)m6g.2xlarge
Total operations: 102400 (101209.29 per second) 102400.00 MiB transferred (101209.29 MiB/sec)r6g.2xlarge
Total operations: 102400 (101260.04 per second) 102400.00 MiB transferred (101260.04 MiB/sec)Disk performance
We also ran simple read & write benchmarks to test the performance of the EBS volumes on each of these instance types.
m6g.2xlarge instance performed the best on the disk performance benchmarks.
c6g.2xlarge
Write
dd bs=16k count=102400 oflag=direct if=/dev/zero of=test_data 102400+0 records in 102400+0 records out 1677721600 bytes (1.7 GB, 1.6 GiB) copied, 72.8331 s, 23.0 MB/sRead
dd bs=16K count=102400 iflag=direct if=test_data of=/dev/null 102400+0 records in 102400+0 records out 1677721600 bytes (1.7 GB, 1.6 GiB) copied, 41.5291 s, 40.4 MB/sm6g.2xlarge
Write
dd bs=16k count=102400 oflag=direct if=/dev/zero of=test_data 102400+0 records in 102400+0 records out 1677721600 bytes (1.7 GB, 1.6 GiB) copied, 72.2482 s, 23.2 MB/sRead
dd bs=16K count=102400 iflag=direct if=test_data of=/dev/null 102400+0 records in 102400+0 records out 1677721600 bytes (1.7 GB, 1.6 GiB) copied, 35.2356 s, 47.6 MB/sr6g.2xlarge
Write
dd bs=16k count=102400 oflag=direct if=/dev/zero of=test_data 102400+0 records in 102400+0 records out 1677721600 bytes (1.7 GB, 1.6 GiB) copied, 68.3376 s, 24.6 MB/sRead
dd bs=16K count=102400 iflag=direct if=test_data of=/dev/null 102400+0 records in 102400+0 records out 1677721600 bytes (1.7 GB, 1.6 GiB) copied, 45.2198 s, 37.1 MB/sPricing
We compared the prices between these instance families by looking at the price per hour for each instance type.
C6g instances are the cheapest amongst the three instance families whereas the R6g instances are the most expensive. R6g instances are almost 50% more expensive than C6g instances.
Price/core for Linux on-demand instances:
| Instance Type | Price / hour |
|---|---|
| c6g.2xlarge | $0.2720 |
| m6g.2xlarge | $0.3080 |
| r6g.2xlarge | $0.4032 |
Conclusion
The new C6g instances offer the best processor performance as well as price and should be the go-to instance type for most use-cases.
If the use-case requires a lot of memory, then the choice becomes either between M6g and R6g. Critical applications such as in-memory databases and caches should use the R6g instances since they are optimized for such use-cases.
Applications such as batch processing systems are probably better suited for M6g instances since they need the additional memory but are not as performance-critical.
Từ khóa » Ec2 M5 Vs M6g
-
Amazon EC2 M6g Instances - Amazon Web Services
-
Amazon Web Services : M5 Vs M5a Vs M6g - Cloud Mercato
-
AWS EC2 M6g Instance Types - What You Need To Know About New ...
-
Amazon EC2 Instance Types
-
Benchmarking The AWS Graviton2 With KeyDB – M6g Up To 65% Faster
-
AWS EC2 M5 VM Did Up To 1.67x The Work Of EC2 M6G - Intel
-
How To Choose The Right Amazon EC2 Instance Type - Densify
-
When To Use AWS Graviton2 Instances | Amazon EC2 Guide - Densify
-
[PDF] Enable Up To 40% Better Price-performance With AWS Graviton2 ...
-
M5 Vs. T3: How To Choose The Right Amazon EC2 Instance - Apptio
-
Observations On AWS's Amazon EC2 M6g Instances - Honeycomb
-
AWS EC2 Instance Comparison: T4g Vs M6g
-
Comparing Graviton (ARM) Performance To Intel And AMD ... - Percona
-
Comparing Graviton (ARM) Performance To Intel And AMD For MySQL