AWS Database Blog

How Amazon DocumentDB on AWS Graviton4 R8g instances delivers 63% better Sysbench benchmark results

This post demonstrates how in our testing upgrading to Graviton4-based R8g instances on Amazon DocumentDB (with MongoDB compatibility) version 5.0 and 8.0 delivers up to 63% better performance compared to Graviton2-based R6g instances on the Sysbench benchmark. This improvement comes at only a 5% cost increase.

Graviton4-based R8g instances offer improved performance, scalability, and better price-performance for memory-intensive workloads. R8g instances provide up to 192 vCPUs — three times more vCPUs than Graviton2-based R6g instances, and up to 1.5 TB of memory, also up to three times more memory than R6g instances. They feature an 8:1 memory-to-vCPU ratio and support larger instance sizes up to 48xlarge, making them ideal for large-scale database deployments. Built on the AWS Nitro System, Graviton4-based R8g instances provide up to 50 Gbps of network bandwidth, providing high throughput and low latency. Additionally, the R8g instances include the latest DDR5-5600 memory to optimize performance for databases, in-memory caching, and real-time analytics. Amazon DocumentDB is currently available on R8g instances up to 16xlarge.

Performance benchmark using Sysbench

The Sysbench benchmark simulates a mixed read/write workload that many applications exhibit. The schema is straightforward with a single secondary index and a handful of fields. Sysbench first executes a data loading phase where a user-provided number of collections are each populated with a given number of documents. After data loading completes, the benchmark begins the execution phase. A single Sysbench “transaction” is composed of the following operations (note that the range queries include 100 documents):

  • 10 point queries
  • 1 unordered range query
  • 1 ordered range query (unindexed)
  • 1 aggregation (sum)
  • 1 distinct range operation
  • 1 indexed update
  • 1 unindexed update
  • 1 delete/insert (same _id for both)

Because the delete and insert operations use the same value for _id, the size of the dataset is constant. Sysbench was executed on two instance types, xlarge and 4xlarge, to show how additional vCPU, RAM, and network bandwidth scale. The working set ratio for both instance types was kept constant at 2x the size of the buffercache. The deployments were single instance (primary only) with standard storage. Other Sysbench parameters included 4 collections for xlarge instances, 16 collections for 4xlarge instances, 2 million documents per collection, and each document padded with 860 characters.

Results – Sysbench data loading

In Sysbench data loading, the R8g.xlarge instance shows a 45.1% improvement over R6g.xlarge (37,645 inserts per second versus 25,950) and the R8g.4xlarge instance a 120.2% improvement over R6g.4xlarge (97,293 inserts per second versus 44,176).

Results – Sysbench execution

In Sysbench execution, the R8g.xlarge instance shows a 63.1% improvement over R6g.xlarge (305 Sysbench transactions per second versus 187) and the R8g.4xlarge instance a 48.7% improvement over R6g.4xlarge (1,023 transactions per second versus 688).

Cost and price-performance

As shown in the preceding results, R8g instances provide up to 63% better performance than R6g instances on Sysbench at only a 5% cost increase, providing exceptional price-performance value. You can switch from R6g to R8g to either handle more workload on the same instance size or reduce your instance size while maintaining performance. Additionally, AWS Database Savings Plans further increase the R8g price-performance advantage because they reduce the cost of an R8g instance by 20%.

Summary

This post demonstrates that AWS Graviton4 instances provide better performance and price-performance than older generations of hardware. You can now provision new AWS Graviton4 instances or migrate existing instances to AWS Graviton4 instances for Amazon DocumentDB version 5.0 and 8.0.


About the authors

Tim Callaghan

Tim Callaghan

Tim is a Principal DocumentDB Specialist Solutions Architect at AWS. He enjoys working with customers looking to modernize existing data-driven applications and build new ones. Prior to joining AWS he has been both a producer and consumer of Relational and NoSQL databases for over 30 years.

Vin Yu

Vin Yu

Vin is a Principal Product Manager on the Amazon DocumentDB team at AWS. He is passionate about building products and working with developers to solve complex problems.