CloudFormation template for benchmarking Amazon RDS instance classes using Sysbench OLTP workloads. Deploy, run, compare - no manual setup required.
| Family | Processor | Generations | Status |
|---|---|---|---|
| M*g | AWS Graviton (Arm) | M6g, M7g, M8g, M9g | Active |
This template benchmarks Amazon RDS on AWS Graviton (Arm) instances.
- Boosting Amazon RDS with AWS Graviton5: Benchmarks (2026)
- Leveling up Amazon RDS with AWS Graviton4: Benchmarks (2025)
The template deploys an Amazon EC2 instance running Sysbench connected to an Amazon RDS instance in the same Availability Zone within a private VPC. All connectivity uses VPC endpoints - no public IPs are required.
1. Deploy the stack
aws cloudformation create-stack \
--stack-name rds-bench-m9g \
--template-body file://rds-benchmark.yaml \
--parameters ParameterKey=InstanceClass,ParameterValue=db.m9g.xlarge \
ParameterKey=DatabaseEngine,ParameterValue=postgres \
--capabilities CAPABILITY_NAMED_IAM \
--region us-east-12. Wait for deployment (~15 minutes)
aws cloudformation wait stack-create-complete --stack-name rds-bench-m9g --region us-east-13. Connect to the EC2 instance
Get the Session Manager URL from the stack outputs:
aws cloudformation describe-stacks --stack-name rds-bench-m9g --region us-east-1 \
--query "Stacks[0].Outputs[?OutputKey=='SessionManagerURL'].OutputValue" --output textOpen the URL in your browser, or connect via CLI:
aws ssm start-session --target <instance-id> --region us-east-14. Run the benchmark
/opt/run-benchmark.shThe script runs the full benchmark automatically (approximately 35 minutes). Results are saved to /opt/results/.
5. Cleanup
aws cloudformation delete-stack --stack-name rds-bench-m9g --region us-east-1| Resource | Description |
|---|---|
| VPC | Private VPC with a subnet in a single Availability Zone |
| Amazon RDS DB instance | Running the selected engine and instance class (Single-AZ) |
| Amazon EC2 instance | m7g.4xlarge with Sysbench pre-installed and benchmark script |
| VPC endpoints | AWS Systems Manager Session Manager (private connectivity) |
| AWS Secrets Manager secret | Database credentials (auto-generated, no hardcoded passwords) |
| IAM roles | Least-privilege roles for Session Manager access |
| Parameter group | Enforces TLS connections |
| Amazon EBS io2 volume | 200 GiB with 10,000 provisioned IOPS attached to the RDS instance |
| Parameter | Description | Default | Allowed Values |
|---|---|---|---|
DatabaseEngine |
Database engine to benchmark | postgres |
postgres, mysql, mariadb |
InstanceClass |
RDS instance class | db.m9g.xlarge |
See template for full list |
SysbenchTables |
Number of tables | 2 |
1-64 |
SysbenchTableSize |
Rows per table | 2000000 |
10000+ |
SysbenchThreads |
Concurrent threads | 100 |
1-512 |
SysbenchDuration |
Duration in seconds | 1800 |
60+ |
The /opt/run-benchmark.sh script automates the full Sysbench workflow:
- Prepare - Creates tables with the configured row count
- Run - Executes the
oltp_read_writeworkload, reporting metrics every 10 seconds - Cleanup - Drops the test tables after the run completes
- Save results - Writes the full Sysbench output to
/opt/results/with a timestamped filename
The script retrieves database credentials from Secrets Manager automatically and connects over TLS. No manual configuration is needed.
| Parameter | Value |
|---|---|
| Workload | oltp_read_write |
| Tables | 2 (default) |
| Rows per table | 2,000,000 (default) |
| Threads | 100 (default) |
| Duration | 1,800s / 30 min (default) |
| Reporting | Every 10 seconds |
| TLS | Enforced (all engines) |
When a new Graviton generation becomes available on RDS:
- Add the instance class to
AllowedValuesin the template - Deploy a new stack with the new instance class
- Compare results
No template restructuring needed.
- No public IPs on any resource
- All connectivity via VPC endpoints
- TLS enforced on all database connections
- Credentials stored in Secrets Manager (never hardcoded)
- Least-privilege IAM roles
Warning: This stack costs approximately $2.51/hour (~$60/day) while running. Delete the stack immediately after collecting benchmark results.
| Resource | Hourly Cost (us-east-1) |
|---|---|
| RDS instance (db.m9g.xlarge, Single-AZ, PostgreSQL) | $0.366 |
| RDS io2 storage (200 GiB) | $0.034 |
| RDS io2 provisioned IOPS (10,000) | $1.370 |
| EC2 client (m7g.4xlarge, Linux) | $0.653 |
| NAT Gateway (hourly) | $0.045 |
| VPC endpoints (x4 interface) | $0.040 |
| Total | ~$2.51/hour |
Prices are On-Demand list pricing in us-east-1 as of August 2026 and exclude usage-based data-processing (NAT/endpoint/RDS) charges. The 10,000 provisioned io2 IOPS is the largest single line item. Costs vary by instance class and Region. Run aws cloudformation delete-stack as soon as you have your results.
This library is licensed under the MIT-0 License. See the LICENSE file.
