• 欢迎访问VPS岛网站,国外VPS,国内VPS,国外服务器,国内服务器,服务器主机,测评及优惠码,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群

Aurora ~VS~ Mysql 性能测试

mysql技术 hsbxxl 131次浏览 已收录 0个评论

AWS基于Mysql/postgres开发的Aurora,是个很热门的OLTP数据库产品。目前很多用户很关心Aurora。

更多关于Aurora的介绍,请参考官方文档:

https://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html

各种官方的性能测试,也充分展示了Aurora的强劲实力。

闲来无事,通过sybench,测试一下Aurora Mysql和RDS原生Mysql之间性能差异。测试结果仅供参考。

网络上比较流行的一张性能对比图,越大的机型,性能aurora的性能优势体现的越好。

222.png

试环境准备,由于Aurora目前只有中国宁夏区有提供服务,所以测试环境都是基于宁夏Region测试的。

<1.  EC2   m4.xlarge   (4CPU 16G)

<2.  RDS  db.r4.xlarge    (4 vCPU  30.5 GiB ) Mysql版本5.7.12

<3.  Aurora  db.r4.xlarge (4 vCPU  30.5 GiB ) Mysql版本5.7.12

<4.  为了减少网络因素的影响,将这些机器,都放置在同一个AZ。

<5. EC2 选择 Amazon AMI2,并安装sysbench 1.0.17

<6. Mysql创建20个表,每个表1000W行数据,数据量在40G左右(避免数据全部cache到内存中,而测试不到IO的性能影响)。

<7. 还另外插入20表,100W行/表,做插入时间比对。

1. 数据库中插入20个表,每个表100W行数据,看插入时间比较。Mysql 耗时 5m32.238s,Aurora耗时7m28.073s。

Mysql

Aurora

mysql -hmysql-rds.cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn \

-uadmin -padmin123 -e “create database dbtest;”

mysql -hmyaurora.cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn \

-uadmin -padmin123  -e “create database dbtest1;”

time sysbench /root/sysbench-1.0/tests/include/oltp_legacy/oltp.lua \

–mysql-host=mysql-rds.cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn \

–mysql-port=3306 –mysql-user=admin –mysql-password=admin123 \

–mysql-db=dbtest –oltp-tables-count=20 –oltp-table-size=1000000 \

–report-interval=10 –rand-init=on –max-requests=0 \

–oltp-read-only=off –time=120 –threads=30 \

prepare  

time sysbench /root/sysbench-1.0/tests/include/oltp_legacy/oltp.lua \

–mysql-host=myaurora.cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn \

–mysql-port=3306 –mysql-user=admin –mysql-password=admin123 \

–mysql-db=dbtest –oltp-tables-count=20 –oltp-table-size=1000000 \

–report-interval=10 –rand-init=on –max-requests=0 \

–oltp-read-only=off –time=120 –threads=30 \

prepare  

sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2)

Creating table ‘sbtest1’…

Inserting 1000000 records into ‘sbtest1’

Creating secondary indexes on ‘sbtest1’…

…….

Creating table ‘sbtest20’…

Inserting 1000000 records into ‘sbtest20’

Creating secondary indexes on ‘sbtest20’…

real    5m32.238s

user    1m25.953s

sys     0m2.070s

sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2)

Creating table ‘sbtest1’…

Inserting 1000000 records into ‘sbtest1’

Creating secondary indexes on ‘sbtest1’…

……

Creating table ‘sbtest20’…

Inserting 1000000 records into ‘sbtest20’

Creating secondary indexes on ‘sbtest20’…

real    7m28.073s

user    1m26.931s

sys     0m2.020s

2. Aurora的链接方式,以及replica的的只读访问的连接分配

Aurora直接连接点个数据库节点的Endpoint方式

mysql -hmyaurora.cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn \
-uadmin -padmin123  -e "create database dbtest1;"

Aurora通过Cluster Endpoint进行连接

连接到主库,进行写入和读取操作

cluster-aurora.cluster-cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn

连接到replica 数据库,进行只读操作,会自动分配连接到不同的可用slave上

cluster-aurora.cluster-ro-cq7qaukj3smd.rds.cn-northwest-1.amazonaws.com.cn

多次并行发起查询测试,可以看到,连接会到不同的slave节点上,这点也是Aurora的优点,大并发的读操作,会比传统的Mysql更有优势。

3. Aurora和Mysql的性能比较

并发连接数

Mysql

Aurora

50

[ 10s ] thds: 50 tps: 1849.09 qps: 29630.08 (r/w/o: 25927.11/0.00/3702.97) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 50 tps: 1874.96 qps: 29997.87 (r/w/o: 26248.25/0.00/3749.62) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 50 tps: 1874.99 qps: 29997.87 (r/w/o: 26247.70/0.00/3750.17) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 50 tps: 1874.87 qps: 30000.64 (r/w/o: 26250.71/0.00/3749.93) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 50 tps: 1875.21 qps: 29997.98 (r/w/o: 26247.77/0.00/3750.21) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 50 tps: 1874.80 qps: 29999.94 (r/w/o: 26250.55/0.00/3749.39) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 50 tps: 1874.80 qps: 29993.58 (r/w/o: 26243.67/0.00/3749.91) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 50 tps: 1874.60 qps: 29997.26 (r/w/o: 26248.06/0.00/3749.19) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 50 tps: 1875.10 qps: 30002.85 (r/w/o: 26252.74/0.00/3750.11) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 50 tps: 1874.90 qps: 29991.28 (r/w/o: 26241.49/0.00/3749.80) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 50 tps: 1874.80 qps: 29995.09 (r/w/o: 26245.49/0.00/3749.60) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 50 tps: 1874.60 qps: 30001.10 (r/w/o: 26251.60/0.00/3749.50) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3146934

       write:                           0

       other:                           449562

       total:                           3596496

   transactions:                        224781 (1872.71 per sec.)

   queries:                             3596496 (29963.32 per sec.)

   ignored errors:                      0      (0.00 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.0281s

   total number of events:              224781

Latency (ms):

        min:                                   14.61

        avg:                                   26.69

        max:                                  232.74

        95th percentile:                       33.72

        sum:                              5999324.56

Threads fairness:

   events (avg/stddev):           4495.6200/80.91

   execution time (avg/stddev):   119.9865/0.01

[ 10s ] thds: 50 tps: 1477.63 qps: 29616.44 (r/w/o: 20740.64/5915.43/2960.36) lat (ms,95%): 39.65 err/s: 0.10 reconn/s: 0.00

[ 20s ] thds: 50 tps: 1513.95 qps: 30280.99 (r/w/o: 21196.66/6056.52/3027.81) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 50 tps: 1525.30 qps: 30506.87 (r/w/o: 21351.98/6104.49/3050.40) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 50 tps: 1489.00 qps: 29790.93 (r/w/o: 20855.52/5957.11/2978.30) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 50 tps: 1525.90 qps: 30495.97 (r/w/o: 21344.68/6099.49/3051.80) lat (ms,95%): 38.94 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 50 tps: 1525.20 qps: 30500.57 (r/w/o: 21352.28/6097.79/3050.50) lat (ms,95%): 38.94 err/s: 0.20 reconn/s: 0.00

[ 70s ] thds: 50 tps: 1519.76 qps: 30418.62 (r/w/o: 21295.75/6083.14/3039.72) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 50 tps: 1514.44 qps: 30290.88 (r/w/o: 21201.44/6060.46/3028.98) lat (ms,95%): 39.65 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 50 tps: 1528.50 qps: 30541.43 (r/w/o: 21378.25/6107.09/3056.09) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 50 tps: 1525.60 qps: 30525.45 (r/w/o: 21371.84/6101.61/3052.01) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 50 tps: 1531.60 qps: 30649.13 (r/w/o: 21451.42/6134.41/3063.30) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 50 tps: 1530.98 qps: 30599.71 (r/w/o: 21421.06/6116.70/3061.95) lat (ms,95%): 38.94 err/s: 0.20 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2549946

       write:                           728532

       other:                           364271

       total:                           3642749

   transactions:                        182132 (1517.33 per sec.)

   queries:                             3642749 (30347.45 per sec.)

   ignored errors:                      7      (0.06 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.0329s

   total number of events:              182132

Latency (ms):

        min:                                   23.77

        avg:                                   32.94

        max:                                  242.92

        95th percentile:                       38.94

        sum:                              5999931.34

Threads fairness:

   events (avg/stddev):           3642.6400/60.99

   execution time (avg/stddev):   119.9986/0.01

200

[ 10s ] thds: 200 tps: 1806.49 qps: 29082.59 (r/w/o: 25450.42/0.00/3632.17) lat (ms,95%): 287.38 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 200 tps: 1872.27 qps: 29938.76 (r/w/o: 26194.32/0.00/3744.43) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 200 tps: 1870.84 qps: 29939.76 (r/w/o: 26198.29/0.00/3741.47) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 200 tps: 1871.85 qps: 29936.38 (r/w/o: 26192.89/0.00/3743.50) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 200 tps: 1868.90 qps: 29910.80 (r/w/o: 26172.90/0.00/3737.90) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 200 tps: 1870.90 qps: 29932.17 (r/w/o: 26190.28/0.00/3741.90) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 200 tps: 1870.00 qps: 29912.47 (r/w/o: 26173.56/0.00/3738.91) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 200 tps: 1868.70 qps: 29910.59 (r/w/o: 26172.10/0.00/3738.50) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 200 tps: 1869.80 qps: 29905.41 (r/w/o: 26166.00/0.00/3739.40) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 200 tps: 1869.10 qps: 29914.46 (r/w/o: 26175.96/0.00/3738.49) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 200 tps: 1868.84 qps: 29904.69 (r/w/o: 26167.01/0.00/3737.69) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 200 tps: 1869.16 qps: 29903.95 (r/w/o: 26165.73/0.00/3738.22) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3135608

       write:                           0

       other:                           447944

       total:                           3583552

   transactions:                        223972 (1863.11 per sec.)

   queries:                             3583552 (29809.72 per sec.)

   ignored errors:                      0      (0.00 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.2124s

   total number of events:              223972

Latency (ms):

        min:                                   16.44

        avg:                                  107.20

        max:                                 1902.74

        95th percentile:                      282.25

        sum:                             24009065.40

Threads fairness:

   events (avg/stddev):           1119.8600/46.71

   execution time (avg/stddev):   120.0453/0.05

[ 10s ] thds: 200 tps: 1960.15 qps: 39454.72 (r/w/o: 27662.63/7851.70/3940.39) lat (ms,95%): 158.63 err/s: 0.10 reconn/s: 0.00

[ 20s ] thds: 200 tps: 2081.52 qps: 41639.62 (r/w/o: 29153.63/8323.26/4162.73) lat (ms,95%): 147.61 err/s: 0.20 reconn/s: 0.00

[ 30s ] thds: 200 tps: 2073.24 qps: 41453.60 (r/w/o: 29015.76/8291.66/4146.18) lat (ms,95%): 147.61 err/s: 0.20 reconn/s: 0.00

[ 40s ] thds: 200 tps: 2083.85 qps: 41681.48 (r/w/o: 29178.18/8334.90/4168.40) lat (ms,95%): 147.61 err/s: 0.20 reconn/s: 0.00

[ 50s ] thds: 200 tps: 2082.82 qps: 41672.60 (r/w/o: 29168.08/8339.78/4164.74) lat (ms,95%): 142.39 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 200 tps: 2085.22 qps: 41689.36 (r/w/o: 29185.75/8332.57/4171.04) lat (ms,95%): 147.61 err/s: 0.10 reconn/s: 0.00

[ 70s ] thds: 200 tps: 2076.47 qps: 41565.44 (r/w/o: 29094.41/8317.09/4153.94) lat (ms,95%): 144.97 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 200 tps: 2079.72 qps: 41561.98 (r/w/o: 29091.96/8310.78/4159.24) lat (ms,95%): 147.61 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 200 tps: 2077.21 qps: 41548.95 (r/w/o: 29088.41/8305.73/4154.82) lat (ms,95%): 147.61 err/s: 0.10 reconn/s: 0.00

[ 100s ] thds: 200 tps: 2073.17 qps: 41492.22 (r/w/o: 29045.12/8300.76/4146.33) lat (ms,95%): 144.97 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 200 tps: 2071.53 qps: 41420.77 (r/w/o: 28992.27/8285.33/4143.17) lat (ms,95%): 147.61 err/s: 0.10 reconn/s: 0.00

[ 120s ] thds: 200 tps: 2083.84 qps: 41665.27 (r/w/o: 29163.81/8333.77/4167.69) lat (ms,95%): 142.39 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3479070

       write:                           993990

       other:                           496998

       total:                           4970058

   transactions:                        248493 (2069.16 per sec.)

   queries:                             4970058 (41384.83 per sec.)

   ignored errors:                      12     (0.10 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.0918s

   total number of events:              248493

Latency (ms):

        min:                                   26.14

        avg:                                   96.61

        max:                                  671.69

        95th percentile:                      147.61

        sum:                             24005672.73

Threads fairness:

   events (avg/stddev):           1242.4650/27.91

   execution time (avg/stddev):   120.0284/0.02

400

[ 10s ] thds: 400 tps: 1708.49 qps: 27644.70 (r/w/o: 24189.80/0.00/3454.90) lat (ms,95%): 759.88 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 400 tps: 1864.73 qps: 29854.98 (r/w/o: 26124.72/0.00/3730.26) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 400 tps: 1861.30 qps: 29785.11 (r/w/o: 26062.91/0.00/3722.20) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 400 tps: 1862.40 qps: 29800.42 (r/w/o: 26076.32/0.00/3724.10) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 400 tps: 1862.70 qps: 29787.67 (r/w/o: 26062.57/0.00/3725.10) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 400 tps: 1861.70 qps: 29793.17 (r/w/o: 26068.96/0.00/3724.21) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 400 tps: 1860.95 qps: 29795.76 (r/w/o: 26073.35/0.00/3722.41) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 400 tps: 1862.53 qps: 29780.26 (r/w/o: 26057.09/0.00/3723.17) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 400 tps: 1862.59 qps: 29801.95 (r/w/o: 26075.27/0.00/3726.68) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 400 tps: 1862.49 qps: 29782.71 (r/w/o: 26058.62/0.00/3724.09) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 400 tps: 1860.73 qps: 29800.90 (r/w/o: 26079.55/0.00/3721.35) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 400 tps: 1861.85 qps: 29789.60 (r/w/o: 26064.80/0.00/3724.80) lat (ms,95%): 682.06 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3112564

       write:                           0

       other:                           444652

       total:                           3557216

   transactions:                        222326 (1839.03 per sec.)

   queries:                             3557216 (29424.51 per sec.)

   ignored errors:                      0      (0.00 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.8911s

   total number of events:              222326

Latency (ms):

        min:                                   17.64

        avg:                                  216.09

        max:                                 6575.08

        95th percentile:                      694.45

        sum:                             48043259.68

Threads fairness:

   events (avg/stddev):           555.8150/34.28

   execution time (avg/stddev):   120.1081/0.10

[ 10s ] thds: 400 tps: 1436.60 qps: 29126.77 (r/w/o: 20462.54/5760.62/2903.60) lat (ms,95%): 331.91 err/s: 0.16 reconn/s: 0.00

[ 20s ] thds: 400 tps: 2835.57 qps: 56687.28 (r/w/o: 39685.07/11328.99/5673.23) lat (ms,95%): 282.25 err/s: 0.98 reconn/s: 0.00

[ 30s ] thds: 400 tps: 2031.40 qps: 40646.92 (r/w/o: 28455.91/8127.80/4063.20) lat (ms,95%): 277.21 err/s: 0.30 reconn/s: 0.00

[ 40s ] thds: 400 tps: 2046.70 qps: 40951.31 (r/w/o: 28660.10/8197.70/4093.50) lat (ms,95%): 277.21 err/s: 0.30 reconn/s: 0.00

[ 50s ] thds: 400 tps: 2042.50 qps: 40850.18 (r/w/o: 28601.99/8162.90/4085.30) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 400 tps: 2041.60 qps: 40852.91 (r/w/o: 28601.01/8168.50/4083.40) lat (ms,95%): 277.21 err/s: 0.10 reconn/s: 0.00

[ 70s ] thds: 400 tps: 2049.80 qps: 40976.34 (r/w/o: 28682.93/8194.81/4098.60) lat (ms,95%): 277.21 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 400 tps: 2045.70 qps: 40892.45 (r/w/o: 28621.36/8181.19/4089.89) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 400 tps: 2048.50 qps: 40959.30 (r/w/o: 28666.20/8194.40/4098.70) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 400 tps: 2042.50 qps: 40883.32 (r/w/o: 28627.91/8169.90/4085.50) lat (ms,95%): 277.21 err/s: 0.20 reconn/s: 0.00

[ 110s ] thds: 400 tps: 2044.40 qps: 40907.80 (r/w/o: 28636.20/8181.90/4089.70) lat (ms,95%): 277.21 err/s: 0.30 reconn/s: 0.00

[ 120s ] thds: 400 tps: 2040.30 qps: 40786.06 (r/w/o: 28548.37/8157.89/4079.80) lat (ms,95%): 277.21 err/s: 0.20 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3409112

       write:                           973956

       other:                           486992

       total:                           4870060

   transactions:                        243484 (2025.82 per sec.)

   queries:                             4870060 (40519.49 per sec.)

   ignored errors:                      24     (0.20 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.1887s

   total number of events:              243484

Latency (ms):

        min:                                   27.83

        avg:                                  197.26

        max:                                 1384.29

        95th percentile:                      282.25

        sum:                             48029766.12

Threads fairness:

   events (avg/stddev):           608.7100/17.12

   execution time (avg/stddev):   120.0744/0.05

500

[ 10s ] thds: 500 tps: 1682.10 qps: 27339.35 (r/w/o: 23928.16/0.00/3411.18) lat (ms,95%): 1069.86 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 500 tps: 1859.51 qps: 29763.11 (r/w/o: 26043.38/0.00/3719.73) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 500 tps: 1862.16 qps: 29757.08 (r/w/o: 26034.07/0.00/3723.01) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 500 tps: 1860.50 qps: 29769.67 (r/w/o: 26047.77/0.00/3721.90) lat (ms,95%): 877.61 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 500 tps: 1858.20 qps: 29744.31 (r/w/o: 26027.41/0.00/3716.90) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 500 tps: 1859.05 qps: 29751.23 (r/w/o: 26032.84/0.00/3718.39) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 500 tps: 1857.00 qps: 29709.55 (r/w/o: 25996.05/0.00/3713.51) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 500 tps: 1855.85 qps: 29692.62 (r/w/o: 25981.22/0.00/3711.40) lat (ms,95%): 877.61 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 500 tps: 1856.50 qps: 29701.50 (r/w/o: 25987.90/0.00/3713.60) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 500 tps: 1856.40 qps: 29698.68 (r/w/o: 25985.79/0.00/3712.90) lat (ms,95%): 877.61 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 500 tps: 1855.70 qps: 29694.47 (r/w/o: 25984.17/0.00/3710.30) lat (ms,95%): 877.61 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 500 tps: 1855.77 qps: 29677.97 (r/w/o: 25966.63/0.00/3711.35) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3103646

       write:                           0

       other:                           443378

       total:                           3547024

   transactions:                        221689 (1826.44 per sec.)

   queries:                             3547024 (29223.11 per sec.)

   ignored errors:                      0      (0.00 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          121.3755s

   total number of events:              221689

Latency (ms):

        min:                                   15.33

        avg:                                  271.03

        max:                                14421.92

        95th percentile:                      893.56

        sum:                             60084600.60

Threads fairness:

   events (avg/stddev):           443.3780/41.56

   execution time (avg/stddev):   120.1692/0.17

[ 10s ] thds: 500 tps: 1756.86 qps: 35777.43 (r/w/o: 25168.49/7045.13/3563.81) lat (ms,95%): 450.77 err/s: 0.70 reconn/s: 0.00

[ 20s ] thds: 500 tps: 2022.60 qps: 40455.28 (r/w/o: 28320.46/8088.72/4046.11) lat (ms,95%): 350.33 err/s: 0.60 reconn/s: 0.00

[ 30s ] thds: 500 tps: 2005.60 qps: 40100.25 (r/w/o: 28070.44/8019.21/4010.61) lat (ms,95%): 356.70 err/s: 0.30 reconn/s: 0.00

[ 40s ] thds: 500 tps: 1996.50 qps: 39933.57 (r/w/o: 27949.78/7989.79/3994.00) lat (ms,95%): 363.18 err/s: 0.70 reconn/s: 0.00

[ 50s ] thds: 500 tps: 2003.70 qps: 40091.81 (r/w/o: 28065.94/8017.48/4008.39) lat (ms,95%): 356.70 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 500 tps: 2017.40 qps: 40370.37 (r/w/o: 28265.05/8071.21/4034.11) lat (ms,95%): 356.70 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 500 tps: 2001.90 qps: 40010.43 (r/w/o: 28004.82/8001.51/4004.10) lat (ms,95%): 363.18 err/s: 0.20 reconn/s: 0.00

[ 80s ] thds: 500 tps: 2020.20 qps: 40416.12 (r/w/o: 28293.61/8081.50/4041.00) lat (ms,95%): 356.70 err/s: 0.30 reconn/s: 0.00

[ 90s ] thds: 500 tps: 2038.00 qps: 40780.69 (r/w/o: 28543.99/8159.90/4076.80) lat (ms,95%): 350.33 err/s: 0.60 reconn/s: 0.00

[ 100s ] thds: 500 tps: 2044.50 qps: 40891.41 (r/w/o: 28630.80/8171.40/4089.20) lat (ms,95%): 350.33 err/s: 0.20 reconn/s: 0.00

[ 110s ] thds: 500 tps: 2043.20 qps: 40906.68 (r/w/o: 28634.19/8185.60/4086.90) lat (ms,95%): 350.33 err/s: 0.40 reconn/s: 0.00

[ 120s ] thds: 500 tps: 2039.60 qps: 40741.57 (r/w/o: 28521.48/8141.39/4078.70) lat (ms,95%): 350.33 err/s: 0.30 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3366272

       write:                           961658

       other:                           480852

       total:                           4808782

   transactions:                        240404 (1999.47 per sec.)

   queries:                             4808782 (39995.15 per sec.)

   ignored errors:                      44     (0.37 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.2323s

   total number of events:              240404

Latency (ms):

        min:                                   27.67

        avg:                                  249.78

        max:                                 2979.37

        95th percentile:                      356.70

        sum:                             60047338.15

Threads fairness:

   events (avg/stddev):           480.8080/13.27

   execution time (avg/stddev):   120.0947/0.06

800

[ 10s ] thds: 800 tps: 1779.10 qps: 29156.96 (r/w/o: 25523.06/0.00/3633.90) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 800 tps: 1859.36 qps: 29741.61 (r/w/o: 26022.38/0.00/3719.23) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 800 tps: 1864.54 qps: 29763.68 (r/w/o: 26036.30/0.00/3727.38) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 800 tps: 1857.70 qps: 29790.88 (r/w/o: 26075.08/0.00/3715.80) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 800 tps: 1859.97 qps: 29814.49 (r/w/o: 26092.34/0.00/3722.15) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 800 tps: 1866.26 qps: 29782.61 (r/w/o: 26050.79/0.00/3731.83) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 800 tps: 1862.42 qps: 29773.50 (r/w/o: 26048.87/0.00/3724.64) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 800 tps: 1860.50 qps: 29758.94 (r/w/o: 26039.24/0.00/3719.71) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 800 tps: 1860.91 qps: 29751.72 (r/w/o: 26030.71/0.00/3721.02) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 800 tps: 1857.49 qps: 29799.90 (r/w/o: 26083.01/0.00/3716.89) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 800 tps: 1861.00 qps: 29811.66 (r/w/o: 26088.26/0.00/3723.39) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 800 tps: 1865.69 qps: 29777.93 (r/w/o: 26047.55/0.00/3730.38) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3126956

       write:                           0

       other:                           446708

       total:                           3573664

   transactions:                        223354 (1849.87 per sec.)

   queries:                             3573664 (29597.91 per sec.)

   ignored errors:                      0      (0.00 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.7387s

   total number of events:              223354

Latency (ms):

        min:                                  304.23

        avg:                                  430.57

        max:                                 2410.01

        95th percentile:                      669.89

        sum:                             96168909.94

Threads fairness:

   events (avg/stddev):           279.1925/6.35

   execution time (avg/stddev):   120.2111/0.13

[ 10s ] thds: 800 tps: 1518.66 qps: 24886.45 (r/w/o: 21773.07/0.00/3113.38) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 800 tps: 1857.90 qps: 29815.64 (r/w/o: 26099.14/0.00/3716.50) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 800 tps: 1859.14 qps: 29709.10 (r/w/o: 25992.82/0.00/3716.29) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 800 tps: 1864.14 qps: 29854.60 (r/w/o: 26123.51/0.00/3731.09) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 800 tps: 1860.33 qps: 29726.22 (r/w/o: 26008.86/0.00/3717.35) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 800 tps: 1859.50 qps: 29826.21 (r/w/o: 26104.61/0.00/3721.60) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 800 tps: 1866.49 qps: 29764.49 (r/w/o: 26032.10/0.00/3732.38) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 800 tps: 1853.53 qps: 29750.01 (r/w/o: 26044.44/0.00/3705.56) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 800 tps: 1866.05 qps: 29837.62 (r/w/o: 26102.02/0.00/3735.60) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 800 tps: 1858.43 qps: 29716.02 (r/w/o: 26003.56/0.00/3712.47) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 800 tps: 1859.81 qps: 29819.31 (r/w/o: 26097.09/0.00/3722.23) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 800 tps: 1861.39 qps: 29769.77 (r/w/o: 26047.58/0.00/3722.18) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            3089212

       write:                           0

       other:                           441316

       total:                           3530528

   transactions:                        220658 (1823.64 per sec.)

   queries:                             3530528 (29178.29 per sec.)

   ignored errors:                      0      (0.00 per sec.)

   reconnects:                          0      (0.00 per sec.)

General statistics:

   total time:                          120.9967s

   total number of events:              220658

Latency (ms):

        min:                                  307.80

        avg:                                  435.76

        max:                                 1975.11

        95th percentile:                      682.06

        sum:                             96154020.08

Threads fairness:

   events (avg/stddev):           275.8225/6.05

   execution time (avg/stddev):   120.1925/0.13

4. AWS官方blog也有测试输出,Aurora的性能比Mysql好不少。具体可以参考。

https://amazonaws-china.com/cn/blogs/china/aurora-test/?nc1=b_rp

我的测试环境,相对来说,单表更多的行数,也是有一些区别的。

个人感觉,由于Aurora不直接写datafile,只写binlog的方式,势必比Mysql要写datafile快很多。而且在越大数据库,和硬件配置的情况下。IO这部分的影响会越明显。

另外Aurora的多slave读取共享数据文件的情况,也会让slave的数据同步,比传统Mysql slave要更实时。

并且replica slave的cluster域名访问,自动分配查询到不同的slave,也节省从应用层面做load balance更简易。

而且aurora可以结合AWS auto-scaling,做到弹性伸缩。才能真正体会“云”的优势。

当然,以上测试,纯是一个技术吊丝无聊举动,仅供参考。实际情况,可以根据我的方法,调整表的数量,和单表的行数。会更接近实际生产情况。


VPS岛 的文章和资源来自互联网,仅作为参考资料,如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。丨 转载请注明Aurora ~VS~ Mysql 性能测试
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址