WeSQL Outperforms AWS RDS MySQL Single AZ -- 4-6x the Speed, 1/2 the cost
When people hear "S3" and "OLTP database" in the same sentence, skepticism is a common reaction. S3 is known for its low cost, but its performance and latency are often seen as unsuitable for the demands of OLTP workloads.
At WeSQL, we’ve previously explained our approach in articles like Why S3 and Persistent Cache. We use S3 for its low cost, reliability, and scalability as durable storage, while addressing performance and latency challenges with efficient write and read caching mechanisms.
Still, questions remain: Can an S3-based OLTP database perform well in practical use cases?
In this blog, we’ll show how WeSQL achieves significant storage cost savings while delivering several times the computational efficiency of AWS RDS. By combining low cost with strong performance, WeSQL challenges the traditional expectations of OLTP databases with S3-based storage.
Test Explanations
Sysbench is a widely used tool for testing OLTP performance, but its final metrics can vary greatly depending on factors like instance specifications, data volume, concurrency levels, and access patterns.
In the following Sysbench tests, we have designed the testing scenarios to closely resemble real-world business use scenarios.
Instance size
We chose the 4-core 16GB specification because This specification is widely used for small to medium-sized database instances in production, making the test results more relevant to typical workloads. And the 4-core 16GB setup provides a well-balanced combination of CPU and memory, making it suitable for handling most OLTP workloads efficiently without over-provisioning resources.
Data volume and Random type
In typical online database environments, the total data scale usually ranges from 200GB to 300GB,but only a portion of this data is actively accessed. Following the "80/20 rule," the actively accessed data typically amounts to 40GB to 60GB. To simulate real-world business scenarios, we chose a test data volume of 48GB (100 tables with 2 million rows each), which falls within this active data range. The data is accessed using a uniform pattern to ensure all parts of the dataset are evenly accessed, reflecting common usage patterns. This setup creates a realistic test environment for accurate performance evaluation.
With 16GB of memory available, the 48GB data volume exceeds the memory capacity by a large margin. This forces the system to rely on disk-based operations, effectively testing the storage engine’s performance in areas such as I/O efficiency and caching strategies.
Test Environment
-
Compute Instances:
- AWS RDS Single-AZ:
- Instance type:
db.m5d.xlarge
(4vCPU, 16GB RAM) - Equipped with a 150GB local NVMe SSD for temporary storage. Persistent storage relies on EBS volumes.
- Instance type:
- WeSQL EC2:
- Instance type:
m5d.xlarge
(4vCPU, 16GB RAM) - Also equipped with a 150GB local NVMe SSD, which WeSQL uses for caching to optimize read & update performance.
- Instance type:
- AWS RDS Single-AZ:
-
Storage Backend:
- AWS RDS:
- EBS gp3 volumes (200GB, 125MB/s, 3000 IOPS) for persistent storage.
- WeSQL:
- EBS gp3 volumes (100GB, 125MB/s, 3000 IOPS) for logs and metadata.
- Primary data storage is offloaded to S3.
- AWS RDS:
WeSQL is designed to minimize dependency on expensive EBS storage by leveraging S3 for data storage, so it uses a small EBS volume to store logs and metadata.
-
Client:
- Sysbench 1.0.20
- EC2:
t3a.2xlarge
(8vCPU, 32GB RAM)
-
Server:
- Database Version:
- AWS RDS: 8.0.35
- WeSQL: Built on MySQL 8.0.35
- Deployment:
- Both systems were deployed as single-node instances for a direct performance comparison.
- Database Version:
-
Network Configuration:
- Availability Zone: All components—including AWS RDS, WeSQL EC2 instances, and the Sysbench client—were deployed within the same AWS availability zone to reduce network latency and ensure consistent test conditions.
Test Method
We used the Sysbench oltp_read_write workload to evaluate performance. The test configuration was as follows:
- DataSet: Prepared 100 tables, each containing 2 million rows of data.
- Concurrency: Tests were conducted with concurrency levels of 2, 4, 8, 16, 32, 64, 96, and 128.
- Duration: Each concurrency level ran for 300 seconds.
- Interval: A 60-second interval was applied before starting the next concurrency level.
Results
We tested both AWS RDS and WeSQL under the oltp_read_write workload using varying levels of concurrency.