AWS recently announced the 7th generation of their Memory instance family. These instances powered by the new AWS Graviton3 processors.

The Graviton processors offer better performance at a lower cost and additional capabilities.

In this article, we will compare the R7g instance family with the Graviton3 processors to the R6g instance family with the previous generation of Graviton2 processors.

Comparing the R7g and R6g instance families

Both R7g and R6g instance families are optimized for memory-intensive workloads.

The key difference between the two instance families is that the R6g instances are powered by Arm-based AWS Graviton 2 processors whereas R7g instances are based on the newer Graviton 3 processors.

Performance

We compared the performance between these instance families by running a bunch of tests on the following instances:

  • r6g.xlarge
  • r7g.xlarge
Instance Type vCPUs Memory (GB)
r6g.xlarge 4 32
r7g.xlarge 4 32

We will be using Sysbench to run various tests to measure the CPU, and Memory 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, r7g.xlarge performed much better as compared to r6g.xlarge.

r6g.xlarge

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

r7g.xlarge

CPU speed:
    events per second:  4429.50

General statistics:
    total time:                          10.0009s
    total number of events:              44305

Latency (ms):
         min:                                    0.89
         avg:                                    1.80
         max:                                   30.91
         95th percentile:                       10.84
         sum:                                79911.51

Threads fairness:
    events (avg/stddev):           5538.1250/45.34
    execution time (avg/stddev):   9.9889/0.01

Memory

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, r7g.xlarge performed better than the r6g.xlarge.

r6g.xlarge


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

r7g.xlarge



General statistics:
    total time:                          1.2499s
    total number of events:              102400

Latency (ms):
         min:                                    0.05
         avg:                                    0.09
         max:                                   30.06
         95th percentile:                        0.05
         sum:                                 9523.35

Threads fairness:
    events (avg/stddev):           12800.0000/0.00
    execution time (avg/stddev):   1.1904/0.06

Pricing

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 R7g instances. Price/core for Linux on-demand instances:

Instance Type Price / hour (linux)
r6g.xlarge 0.2016
r7g.xlarge 0.2142

Conclusion

The new R7g instances provide much better performance as compared to the R6g instances. They are more expensive than the R6g instances. However, their overall performance to price ratio is much better than the R6g instances.