Cloud MySQL Performance Benchmark
Posts of Cloud MySQL Performance Benchmark
-
本文是一个系列文章的一部分,该系列较为完整的对各个云厂商的RDS MySQL进行了测试,包括了阿里云、腾讯云、华为云、百度云、AWS、Azure、GCP、Oracle Cloud等,最新的测试:云数据库RDS MySQL的性能。
Sysbench QPS 详细数据
data aliyun aws azure baidu google huawei oracle tencent 4 6934 3365 1615 2164 1449 2351 3701 6439 8 9842 6685 3018 4079 2832 4284 6387 11999 16 15597 13028 5511 7360 4767 7626 10120 19864 32 23331 22766 9761 12633 7333 13282 11355 29928 48 26740 26362 12245 16442 9780 17030 11601 32940 64 29284 28181 13261 19505 11144 19441 12557 34154 96 31033 30829 14418 22066 11166 19805 12282 33711 128 31450 32467 15066 22912 11191 19826 13030 32735 192 32287 32558 15314 23386 11244 20453 12677 35476 256 31571 31954 15470 23291 10963 21489 12910 36917 384 31419 32047 15892 23045 11212 22894 13242 37473 512 31382 32221 15978 22987 11399 22750 12643 37992 Latency (Event) 详细数据
如下表格分别为:平均延迟 和 95%延迟数据。单位为:毫秒/ms。
data aliyun aws azure baidu google huawei oracle tencent 4 10.38 21.39 44.56 33.26 49.68 30.62 19.49 11.18 8 14.63 21.54 47.71 35.30 50.83 33.61 22.54 12.00 16 18.46 22.10 52.25 39.13 60.41 37.76 28.46 14.50 32 24.69 25.30 59.00 45.59 78.53 43.36 50.72 19.24 48 32.31 32.77 70.55 52.54 88.32 50.73 74.46 26.23 64 39.34 40.87 86.86 59.05 103.34 59.25 91.73 33.73 96 55.68 56.04 119.82 78.30 154.70 87.24 140.65 51.24 128 73.25 70.95 152.89 100.54 205.82 116.19 176.76 70.37 192 107.02 106.13 225.58 147.74 307.27 168.93 272.55 97.40 256 145.92 144.17 297.73 197.78 420.05 214.36 356.72 124.79 384 219.91 215.58 434.67 299.81 615.95 301.73 521.43 184.41 512 293.55 285.85 576.35 400.66 807.65 404.86 727.98 242.43 data aliyun aws azure baidu google huawei oracle tencent 4 12.30 22.28 51.94 42.61 75.82 37.56 28.67 12.75 8 19.29 22.28 56.84 45.79 82.96 40.37 36.24 13.46 16 24.83 24.83 63.32 51.02 104.84 45.79 48.34 16.71 32 35.59 31.94 71.83 62.19 132.49 52.89 94.10 23.95 48 48.34 44.17 89.16 73.13 144.97 62.19 130.13 33.72 64 61.08 53.85 116.80 86.00 161.51 74.46 155.80 44.17 96 84.47 74.46 173.58 116.80 215.44 134.90 235.74 82.96 128 106.75 108.68 235.74 147.61 277.21 155.80 267.41 153.02 192 144.97 164.45 369.77 207.82 411.96 253.35 404.61 173.58 256 189.93 219.36 511.33 267.41 569.67 356.70 502.20 186.54 384 292.60 314.45 787.74 390.30 802.05 511.33 694.45 257.95 512 390.30 411.96 1050.76 511.33 1050.76 569.67 960.30 331.91 MySQL 参数对比表格
data aliyun aws azure baidu google huawei oracle tencent have_ssl DISABLED YES YES DISABLED YES DISABLED YES DISABLED innodb_buffer_pool_size 9.75GB 11GB 12GB 12GB 11GB 9GB 17GB 12GB innodb_doublewrite ON OFF OFF ON ON ON ON ON innodb_flush_log_at_trx_commit 1 1 1 1 1 1 1 1 innodb_flush_method O_DIRECT O_DIRECT fsync fsync O_DIRECT O_DIRECT O_DIRECT O_DIRECT innodb_io_capacity 20000 200 200 2000 5000 12000 1250 20000 innodb_read_io_threads 4 4 NA 8 4 4 2 4 innodb_write_io_threads 4 4 NA 8 4 4 4 4 log_bin ON OFF ON ON ON ON ON ON performance_schema OFF OFF ON OFF ON OFF ON OFF rpl_semi_sync_master_enabled ON NA NA ON NA ON NA ON rpl_semi_sync_master_timeout 1000 NA NA 10000 NA 10000 NA 10000 sync_binlog 1 1 1 1000 1 1 1 1 thread_pool_size 8 NA 4 NA 4 NA 16 4 version 8.0.36 8.0.41 8.0.41-azure 8.0.32-4.0.0.5 8.0.41-google 8.0.28-231003 8.0.40-u6-cloud 8.0.30-txsql instance_type mysql.x4.large.2c db.m7i.xlarge GP_Standard_D4ads_v5 4 db-custom-4-16384 rds.mysql.x1.xlarge.4.ha MySQL.4 4c storage_type cloud_essd io1 NA cloud_enha NA CLOUDSSD NA EXCLUSIVE storage_size 100 100 100 100 100 100 100 100 storage_iops NA 3000 3000 NA NA NA NA NA cpu_capacity 97 146.6 73.6 74.5 53.8 154.8 118.8 107.3 补充测试
在最近的两次 MySQL 测试中,都补充进行了数据量更大的测试。在原测试的基础上,修改了sysbench的数据准备参数,补充测试参数:
# cpu-io mixed benchmark tables=16 run_time=300 table_size=5000000# cpu intensive benchmark tables=10 run_time=300 table_size=1000000根据之前的计算,在该“cpu-io mixed benchmark”下,数据总量约
18.4 GB,即,该压力测试则会成为一个读IO密集型的测试。各个云厂商在该模型下的性能表现如下图:Sysbench QPS 详细数据
data aliyun aws azure baidu google huawei oracle tencent 4 4027 1499 946 1800 1449 2004 754 5689 8 4717 2980 1798 3288 2702 3749 3570 10257 16 5642 3588 2810 5722 4275 6848 7127 17248 32 6464 3689 2987 8380 5729 12139 7482 24535 48 6854 3733 3007 8789 6651 14857 7716 26788 64 7052 3724 3065 8982 6990 15630 8067 27617 96 7292 3722 3076 9204 7259 15960 8293 26969 128 7421 3861 3065 9324 7598 16162 8380 26215 192 7556 4030 3090 9675 7474 16291 8528 27930 256 7588 4017 3080 9545 7603 16336 8676 28165 384 7635 4159 3100 10147 7641 10285 8723 28725 512 7693 4363 3113 10602 7802 5391 8809 28922 Latency (Event) 详细数据
如下表格分别为:平均延迟 和 95%延迟数据。单位为:毫秒/ms。
data aliyun aws azure baidu google huawei oracle tencent 4 17.88 48.04 76.05 40.00 49.68 35.93 95.62 12.66 8 30.52 48.32 80.09 43.79 53.29 38.41 40.33 14.04 16 51.04 80.29 102.49 50.32 67.36 42.05 40.44 16.70 32 89.10 156.14 192.80 68.73 100.53 47.44 77.06 23.47 48 126.02 231.39 287.27 98.29 129.86 58.15 111.94 32.25 64 163.32 309.23 375.70 128.24 164.75 73.71 142.76 41.71 96 236.90 463.84 561.46 187.66 237.92 108.25 208.32 64.07 128 310.35 596.25 751.37 247.10 302.96 142.51 275.00 87.88 192 457.04 856.60 1117.62 356.97 462.11 212.04 405.03 123.71 256 606.96 1145.53 1494.61 482.24 605.40 281.92 531.03 163.56 384 904.34 1659.37 2226.85 680.65 903.58 671.53 792.11 240.53 512 1196.51 2109.12 2954.89 867.32 1179.10 1705.20 1044.82 318.47 data aliyun aws azure baidu google huawei oracle tencent 4 20.74 55.82 104.84 58.92 78.60 43.39 787.74 14.73 8 33.72 53.85 102.97 73.13 99.33 47.47 45.79 16.71 16 150.29 227.40 142.39 97.55 170.48 52.89 102.97 21.89 32 297.92 325.98 262.64 139.85 240.02 63.32 344.08 33.12 48 350.33 397.39 397.39 193.38 287.38 81.48 450.77 48.34 64 390.30 467.30 520.62 235.74 303.33 215.44 484.44 62.19 96 458.96 612.21 802.05 325.98 363.18 331.91 559.50 137.35 128 530.08 759.88 1109.09 411.96 427.07 376.49 612.21 167.44 192 669.89 1352.03 1678.14 569.67 634.66 467.30 707.07 196.89 256 831.46 1973.38 2238.47 787.74 816.63 539.71 802.05 235.74 384 1191.92 3095.38 3326.55 1050.76 1191.92 1836.24 1013.60 320.17 512 1589.90 3911.79 4437.27 1327.91 1561.52 2082.91 1376.60 411.96 MySQL 参数对比表格
data aliyun aws azure baidu google huawei oracle tencent have_ssl DISABLED YES YES DISABLED YES DISABLED YES DISABLED innodb_buffer_pool_size 9.75GB 11GB 12GB 12GB 11GB 9GB 17GB 12GB innodb_doublewrite ON OFF OFF ON ON ON ON ON innodb_flush_log_at_trx_commit 1 1 1 1 1 1 1 1 innodb_flush_method O_DIRECT O_DIRECT fsync fsync O_DIRECT O_DIRECT O_DIRECT O_DIRECT innodb_io_capacity 20000 200 200 2000 5000 12000 1250 20000 innodb_read_io_threads 4 4 NA 8 4 4 2 4 innodb_write_io_threads 4 4 NA 8 4 4 4 4 log_bin ON OFF ON ON ON ON ON ON performance_schema OFF OFF ON OFF ON OFF ON OFF rpl_semi_sync_master_enabled ON NA NA ON NA ON NA ON rpl_semi_sync_master_timeout 1000 NA NA 10000 NA 10000 NA 10000 sync_binlog 1 1 1 1000 1 1 1 1 thread_pool_size 8 NA 4 NA 4 NA 16 4 version 8.0.36 8.0.41 8.0.41-azure 8.0.32-4.0.0.5 8.0.41-google 8.0.28-231003 8.0.40-u6-cloud 8.0.30-txsql instance_type mysql.x4.large.2c db.m7i.xlarge GP_Standard_D4ads_v5 4 db-custom-4-16384 rds.mysql.x1.xlarge.4.ha MySQL.4 4c storage_type cloud_essd io1 NA cloud_enha NA CLOUDSSD NA EXCLUSIVE storage_size 100 100 100 100 100 100 100 100 storage_iops NA 3000 3000 NA NA NA NA NA cpu_capacity 96.6 152.1 73.2 72.8 49.3 163.4 119.9 108 -
本文是一个系列文章的一部分,该系列较为完整的对各个云厂商的RDS MySQL进行了测试,包括了阿里云、腾讯云、华为云、百度云、AWS、Azure、GCP、Oracle Cloud等,最新的测试:云数据库RDS MySQL的性能。
Sysbench QPS 详细数据
data aliyun aws azure baidu google huawei oracle tencent 4 6749 1657 1417 1776 1655 2753 2987 6118 8 9483 3304 2820 3260 2895 4989 5004 11196 16 14533 6395 5418 6094 5206 9263 7343 19249 32 22082 12295 9646 10483 7427 15601 7881 30337 48 27974 16295 12511 13599 8482 19787 7583 34849 64 33061 17704 15137 16364 9209 21697 7626 35951 96 35588 20843 18669 19334 9659 22855 8257 34147 128 38226 22311 20964 20061 9704 22303 8046 34271 192 40135 22530 23274 20960 10456 23323 7806 37142 256 40190 22369 24643 21412 10638 23572 7853 38175 384 41914 22097 25153 21104 10506 23785 8009 39298 512 41596 21793 25700 21279 10768 23910 8381 38840 Latency (Event) 详细数据
如下表格分别为:平均延迟 和 95%延迟数据。单位为:毫秒/ms。
data aliyun aws azure baidu google huawei oracle tencent 4 10.67 43.44 50.82 40.54 43.50 26.15 24.10 11.77 8 15.18 43.57 51.06 44.17 49.73 28.86 28.77 12.86 16 19.82 45.03 53.15 47.25 55.32 31.09 39.22 14.96 32 26.08 46.85 59.70 54.94 77.54 36.92 73.08 18.99 48 30.88 53.02 69.05 63.53 101.84 43.66 113.93 24.79 64 34.84 65.06 76.10 70.40 125.07 53.09 151.03 32.04 96 48.55 82.90 92.54 89.37 178.88 75.60 209.25 50.60 128 60.27 103.25 109.87 114.84 237.39 103.29 286.29 67.22 192 86.10 153.37 148.44 164.86 330.38 148.15 442.49 93.04 256 114.65 205.96 186.90 215.17 433.06 195.43 586.49 120.68 384 164.88 312.70 274.71 327.48 657.65 290.43 862.47 175.84 512 221.51 422.68 358.43 432.99 855.41 385.23 1098.68 237.15 data aliyun aws azure baidu google huawei oracle tencent 4 13.46 46.63 58.92 56.84 57.87 31.37 36.24 13.46 8 16.41 46.63 61.08 61.08 75.82 34.95 41.85 15.00 16 20.00 51.02 64.47 66.84 90.78 37.56 69.29 18.28 32 28.16 53.85 77.19 80.03 144.97 44.98 116.80 25.28 48 62.19 64.47 104.84 94.10 189.93 53.85 176.73 33.72 64 108.68 78.60 130.13 102.97 223.34 70.55 262.64 45.79 96 155.80 99.33 167.44 132.49 277.21 121.08 325.98 134.90 128 183.21 132.49 193.38 170.48 350.33 144.97 427.07 150.29 192 227.40 219.36 240.02 240.02 475.79 215.44 623.33 170.48 256 325.98 287.38 297.92 303.33 623.33 308.84 1050.76 196.89 384 411.96 434.83 458.96 442.73 926.33 539.71 2539.17 248.83 512 539.71 569.67 580.02 580.02 1191.92 559.50 2880.27 320.17 MySQL 参数对比表格
data aliyun aws azure baidu google huawei oracle tencent have_ssl DISABLED YES YES DISABLED YES DISABLED YES DISABLED innodb_buffer_pool_size 9.75GB 11GB 24GB 12GB 11GB 9GB 17GB 12GB innodb_doublewrite ON OFF OFF ON ON ON ON ON innodb_flush_log_at_trx_commit 1 1 1 1 1 1 1 1 innodb_flush_method O_DIRECT O_DIRECT fsync fsync O_DIRECT O_DIRECT O_DIRECT O_DIRECT innodb_io_capacity 20000 200 200 2000 5000 12000 1250 20000 innodb_read_io_threads 4 4 NA 8 4 4 2 4 innodb_write_io_threads 4 4 NA 8 4 4 4 4 log_bin ON OFF ON ON ON ON ON ON performance_schema OFF OFF ON OFF ON OFF ON OFF rpl_semi_sync_master_enabled ON NA NA ON NA ON NA ON rpl_semi_sync_master_timeout 1000 NA NA 10000 NA 10000 NA 10000 sync_binlog 1 1 1 1000 1 1 1 1 thread_pool_size 8 NA 8 NA NA NA 16 4 version 8.0.36 8.0.40 8.0.40-azure 8.0.32-2.0.0.2 8.0.37-google 8.0.28-231003 8.0.40-u3-cloud 8.0.30-txsql instance_type mysql.x4.large.2c db.m6i.xlarge GP_Standard_D8ads_v5 4 db-custom-4-16384 rds.mysql.x1.xlarge.4.ha MySQL.4 4c storage_type cloud_essd io1 NA cloud_enha NA CLOUDSSD NA EXCLUSIVE storage_size 100 100 100 100 100 100 100 100 storage_iops NA 3000 3000 NA NA NA NA NA cpu_capacity 172.3 110.9 139.8 73.8 46.4 162.6 86.8 128.5 -
本文是一个系列文章的一部分,该系列较为完整的对各个云厂商的RDS MySQL进行了测试,包括了阿里云、腾讯云、华为云、百度云、AWS、Azure、GCP、Oracle Cloud等,最新的测试:云数据库RDS MySQL的性能。
在不同的云厂商,购买相同规格的MySQL实例(如4vCPU-16GB),获得的性能相同吗?
本次测试中,极限性能(512并发下的QPS)表现如上图:腾讯云性能最好,达3.6万;其次是阿里云2.7万,相比于上一次测试的4.0万性能下降比较明显;其次是华为、AWS、百度,再次是Azure、Google云和Oracle云。更多详细数据参考如下。
Sysbench QPS 详细数据
data aliyun aws azure baidu google huawei oracle tencent 4 5789 2183 1517 2017 1915 2476 3032 5868 8 8716 4335 2964 3822 3415 4546 5046 10518 16 14373 8272 5489 6975 6071 8472 7839 16903 32 20132 15377 9111 11910 8582 14384 7717 23484 48 23026 17862 11439 15330 9641 18667 7747 26802 64 24990 19947 12623 18316 9877 21269 7889 30054 96 26954 22461 13578 20535 10423 22137 8529 35131 128 26924 23200 14057 21481 10682 21394 8230 36199 192 26586 23309 14484 21427 11203 22040 7958 36259 256 25933 23396 14640 21827 11413 22847 7438 35743 384 27209 22924 14638 21452 11552 24148 7690 35747 512 27662 22778 14674 21405 11350 24079 7196 36052 Latency (Event) 详细数据
如下表格分别为:平均延迟 和 95%延迟数据。单位为:毫秒/ms。
data aliyun aws azure baidu google huawei oracle tencent 4 12.44 32.98 47.45 35.70 37.60 29.08 23.74 12.27 8 16.52 33.22 48.58 37.68 42.16 31.67 28.54 13.69 16 20.04 34.81 52.46 41.29 47.43 33.99 36.74 17.04 32 28.61 37.45 63.21 48.36 67.11 40.04 74.63 24.53 48 37.52 48.37 75.52 56.35 89.61 46.28 111.52 32.23 64 46.10 57.75 91.25 62.89 116.61 54.16 146.00 38.33 96 64.11 76.92 127.25 84.14 165.76 78.04 202.56 49.18 128 85.57 99.30 163.88 107.25 215.61 107.68 279.90 63.64 192 129.99 148.24 238.56 161.27 308.43 156.77 434.12 95.30 256 177.67 196.91 314.68 211.08 403.63 201.61 619.30 128.89 384 254.00 301.39 472.05 322.16 598.09 286.09 898.19 193.28 512 333.11 404.42 627.82 430.45 811.55 382.50 1279.61 255.51 data aliyun aws azure baidu google huawei oracle tencent 4 18.95 36.24 55.82 41.10 47.47 37.56 36.89 14.73 8 25.74 36.24 57.87 44.98 61.08 39.65 46.63 17.01 16 29.19 41.10 62.19 50.11 87.56 41.85 66.84 21.89 32 44.17 45.79 78.60 62.19 147.61 49.21 121.08 31.94 48 66.84 59.99 95.81 77.19 204.11 56.84 200.47 41.85 64 86.00 71.83 121.08 90.78 219.36 68.05 267.41 49.21 96 116.80 101.13 183.21 125.52 272.27 123.28 325.98 62.19 128 147.61 142.39 248.83 164.45 331.91 150.29 442.73 77.19 192 219.36 211.60 376.49 227.40 450.77 231.53 634.66 116.80 256 282.25 272.27 511.33 292.60 569.67 320.17 1376.60 158.63 384 376.49 411.96 802.05 427.07 831.46 539.71 2449.36 253.35 512 484.44 549.52 1109.09 559.50 1129.24 549.52 3982.86 369.77 MySQL 参数对比表格
data aliyun aws azure baidu google huawei oracle tencent have_ssl DISABLED YES YES DISABLED YES DISABLED YES DISABLED innodb_buffer_pool_size 9.75GB 11GB 12GB 12GB 11GB 9GB 17GB 12GB innodb_doublewrite ON OFF OFF ON ON ON ON ON innodb_flush_log_at_trx_commit 1 1 1 1 1 1 1 1 innodb_flush_method O_DIRECT O_DIRECT fsync fsync O_DIRECT O_DIRECT O_DIRECT O_DIRECT innodb_io_capacity 20000 200 200 2000 5000 12000 1250 20000 innodb_read_io_threads 4 4 NA 8 4 4 2 4 innodb_write_io_threads 4 4 NA 8 4 4 4 4 log_bin ON OFF ON ON ON ON ON ON performance_schema OFF OFF ON OFF ON OFF ON OFF rpl_semi_sync_master_enabled ON NA NA ON NA ON NA ON rpl_semi_sync_master_timeout 1000 NA NA 10000 NA 10000 NA 10000 sync_binlog 1 1 1 1000 1 1 1 1 thread_pool_size 8 NA 4 NA NA NA 16 4 version 8.0.36 8.0.39 8.0.39-azure 8.0.32-2.0.0.2 8.0.31-google 8.0.28-231003 8.0.40-u3-cloud 8.0.30-txsql instance_type db.m6i.xlarge GP_Standard_D4ads_v5 db-custom-4-16384 m storage_type cloud_essd io1 NA NA m storage_size 100 100 100 m 100 storage_iops 3000 3000 NA m cpu_capacity 100.9 106.9 72.7 73.4 49.4 163.1 101.1 118.4 云数据库的 MySQL 8.4 版本
目前,主流版本依旧还是8.0。在2024年04月,最新发布了 8.4 版本,该版本将是下一个稳定版(LTS版),所以也有部分云厂商开始这次该版本。目前,发布了 MySQL 8.4的云厂商有Amazon、Google云和Oracle云。这里也对8.4版本的性能做了测试,并对比如下:
各云厂商详细测试数据
关于各个云厂商更多的详细测试数据可以参考如下专题页面:








更多参考