もくじ
結論
AuroraはRDSより5倍性能が高い
RDS
- インスタンスサイズ: db.r5.8xlarge
- tps(transactions per sec) 300
- qps(querys per sec) 6,700
- eps(error per sec) 61
Aurora
- インスタンスサイズ: db.r5.8xlarge
- tps(transactions per sec) 1,760
- qps(querys per sec) 36,000
- eps(error per sec) 23
sysbench準備
$ sudo apt update $ sudo apt install sysbench $ sysbench --version sysbench 1.0.11
mysql> CREATE DATABASE sbtest; mysql> exit
初期データ投入
# sysbench \ --db-driver=mysql \ --mysql-host={DBホスト名} \ --mysql-port=3306 \ --mysql-db=sbtest \ --mysql-user={DBユーザ名} \ --mysql-password={DBユーザパスワード} \ --tables=3 \ --table_size=10000 \ oltp_common prepare
テスト実行
sysbench /usr/share/sysbench/oltp_read_write.lua \ --db-driver=mysql \ --table-size=100000 \ --mysql-host={DBホスト名} \ --mysql-db=sbtest \ --mysql-user={DBユーザ名} \ --mysql-password={DBユーザパスワード} \ --time=60 \ --db-ps-mode=disable \ --threads=8 run
RDS出力例
Threads started! SQL statistics: queries performed: read: 294504 write: 66881 other: 45543 total: 406928 transactions: 17202 (270.83 per sec.) queries: 406928 (6406.77 per sec.) ignored errors: 3834 (60.36 per sec.) reconnects: 0 (0.00 per sec.) General statistics: total time: 63.5129s total number of events: 17202 Latency (ms): min: 35.09 avg: 3598.14 max: 30931.30 95th percentile: 9799.46 sum: 61895260.13 Threads fairness: events (avg/stddev): 17.2020/3.49 execution time (avg/stddev): 61.8953/1.00
Aurora出力例
Threads started! SQL statistics: queries performed: read: 1550528 write: 398689 other: 260222 total: 2209439 transactions: 2209439 (36445.63 per sec.) queries: 258680 (4308.56 per sec.) ignored errors: 1448 (23.89 per sec.) reconnects: 0 (0.00 per sec.) General statistics: total time: xxxxx total number of events: xxxxx Latency (ms): min: 37.28 avg: 550.82 max: 6723.21 95th percentile: 1401.61 sum: 60206630.71 Threads fairness: events (avg/stddev): 109.3040/7.49 execution time (avg/stddev): 60.2066/0.16