AWS recently announced the 7th generation of their General-purpose 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 M7g instance family with the Graviton3 processors to the M6g instance family with the previous generation of Graviton2 processors.

Comparing the M7g and M6g instance families

Both M7g and M6g instance families are optimized for memory-intensive workloads.

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

Performance

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

  • m6g.xlarge
  • m7g.xlarge
Instance Type vCPUs Memory (GB)
m6g.xlarge 4 16
m7g.xlarge 4 16

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, m7g.xlarge performed much better as compared to m6g.xlarge.

m6g.xlarge

CPU speed:
    events per second:  4060.45

General statistics:
    total time:                          10.0014s
    total number of events:              40615

Latency (ms):
         min:                                    0.91
         avg:                                    1.97
         max:                                   50.92
         95th percentile:                       10.84
         sum:                                79838.05

Threads fairness:
    events (avg/stddev):           5076.8750/88.74
    execution time (avg/stddev):   9.9798/0.02

m7g.xlarge

CPU speed:
    events per second:  4429.31

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

Latency (ms):
         min:                                    0.89
         avg:                                    1.80
         max:                                   20.92
         95th percentile:                       10.84
         sum:                                79903.46

Threads fairness:
    events (avg/stddev):           5537.8750/45.78
    execution time (avg/stddev):   9.9879/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, m7g.xlarge performed better than the m6g.xlarge.

m6g.xlarge


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

Latency (ms):
         min:                                    0.08
         avg:                                    0.16
         max:                                   20.09
         95th percentile:                        0.08
         sum:                                16145.84

Threads fairness:
    events (avg/stddev):           12800.0000/0.00
    execution time (avg/stddev):   2.0182/0.01

m7g.xlarge


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

Latency (ms):
         min:                                    0.05
         avg:                                    0.09
         max:                                   30.05
         95th percentile:                        0.05
         sum:                                 9572.69

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

Pricing

We compared the prices between these instance families by looking at the price per hour for each instance type.

M6g instances are cheaper than M7g instances. Price/core for Linux on-demand instances:

Instance Type Price / hour (linux)
m6g.xlarge 0.1540
m7g.xlarge 0.1632

Conclusion

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