AWS EC2 R6 instances are memory optimized instances that are built to deliver fast performance for workloads that process large data sets in memory.
In this article, we will compare the R6g, R6a, and R6i instance types within the R6 instance family and look at how each of them performs.
Comparing the R6g, R6a and R6q instance families
The R6g, R6a, and R6i instance families are memory optimized instances. They are suitable for workloads that require high memory bandwidth and low latency.
The key difference between the three instance families is that the R6g instances are powered by Arm-based AWS Graviton 2 processors whereas R6a instances are based on the AMD EPYC 7002 processors and R6i instances are based on the Intel Xeon Platinum 8000 processors.
We compared the performance between these instance families by running a bunch of tests on the following instances:
|Instance Type||vCPUs||Memory (GB)|
We will be using Sysbench to run various tests to measure the CPU, and Memory performance.
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,
r6g.xlarge performed much better as compared to
CPU speed: events per second: 4361.34 General statistics: total time: 10.0016s total number of events: 43626 Latency (ms): min: 0.91 avg: 1.83 max: 20.92 95th percentile: 12.98 sum: 79929.89
CPU speed: events per second: 3535.12 General statistics: total time: 10.0015s total number of events: 35359 Latency (ms): min: 1.02 avg: 2.26 max: 37.13 95th percentile: 13.22 sum: 79944.81
CPU speed: events per second: 2404.39 General statistics: total time: 10.0015s total number of events: 24051 Latency (ms): min: 1.30 avg: 3.32 max: 29.62 95th percentile: 13.70 sum: 79927.15
We ran the Memory benchmark using the following command:
sysbench memory --memory-block-size=1M --memory-total-size=100G --num-threads=8 run.
We will be comparing the total time taken to perform the operations.
In this benchmark,
r6a.xlarge performed similarly whereas
r6i.xlarge performed much worse than the other two.
General statistics: total time: 2.0175s total number of events: 102400 Latency (ms): min: 0.08 avg: 0.16 max: 20.08 95th percentile: 0.08 sum: 15965.61
General statistics: total time: 2.0120s total number of events: 102400 Latency (ms): min: 0.04 avg: 0.15 max: 44.07 95th percentile: 0.12 sum: 15656.46
Total operations: 102400 (30871.19 per second) 102400.00 MiB transferred (30871.19 MiB/sec) General statistics: total time: 3.3156s total number of events: 102400 Latency (ms): min: 0.04 avg: 0.25 max: 28.14 95th percentile: 0.18 sum: 25998.35
We compared the prices between these instance families by looking at the price per hour for each instance type.
R6g instances are much cheaper than R6a and R6i instances. Price/core for Linux on-demand instances:
|Instance Type||Price / hour (linux)|
The R6g instances provide much better performance at a lower cost than the R6a and R6i instances. If you are looking for a memory optimized instance and your workload can be run on the ARM architecture, you should consider using the R6g instances.
Otherwise, the R6a instances are a good alternative. They seem to perform better than the the R6i instances and are cheaper than the R6i instances.