温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

RDS Mysql Single-AZ和Multi-AZ性能差异

发布时间:2020-07-14 22:56:21 来源:网络 阅读:4579 作者:hsbxxl 栏目:MySQL数据库

高可用性,是很多数据库工程师/架构师最重视的系统架构环节。在AWS上,Multi-AZ是RDS很重要的一个HA方案。

但是启用Multi-AZ,对系统性能是否有影响,性能牺牲多少,是很多用户关系的点。

今天,我就针对Multi-AZ的性能进行测试。


1.  环境准备,

创建m4.xlarge(4CPU 16G)的EC2,和RDS Mysql在同一个AZ,这样能减少网络因素的影响

RDS Mysql Single-AZ和Multi-AZ性能差异



创建一个db.m4.xlarge(4CPU 16G)的RDS Mysql

RDS Mysql Single-AZ和Multi-AZ性能差异


2. 基于RDS AMI2安装sysbench的方法

https://github.com/akopytov/sysbench  这是sysbench在git上的地址,里面有安装教程,包括centos
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
sudo yum -y install sysbench

3. sysbench数据生成,在sbtest库下生成sbtest表,共100W记录。

# sysbench --test=oltp --oltp-table-size=1000000 --oltp-read-only=off --init-rng=on --num-threads=16 --max-requests=0 --oltp-dist-type=uniform --max-time=1800 --mysql-user=root --mysql-socket=/tmp/mysql.sock --mysql-password=123456 --db-driver=mysql --mysql-table-engine=innodb --oltp-test-mode=complex prepare

sysbench的更多用法,请参考另一篇blog,

https://blog.51cto.com/hsbxxl/2068181


4. EC2机器需要安装mysql client,用于准备连接数据库使用

RHEL7系列mysql5.7的下载地址:

 rpm -ivh http://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
yum install mysql-community-client -y

5. 连接数据库

mysql -hbjs.cbchwkqr6lfg.rds.cn-north-1.amazonaws.com.cn -uadmin -padmin123

6. 创建测试数据库:

mysql>create database dbtest;

7. 插入数据,

创建测试表20个

每个表100万行数据。

#time sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua \
--mysql-host=bjs.cbchwkqr6lfg.rds.cn-north-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

查询整个mysql数据库大小,准备了50G的数据,准备测试

mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data from  information_schema.tables;
+------------+
| data       |
+------------+
| 50100.26MB |
+------------+
1 row in set (0.03 sec)

实际上我是通过多次执行sysbench,创建多个库之后,才把数据堆积到50G,但是测试过程中,只有4.2G

mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data from  information_schema.tables where TABLE_SCHEMA='test';
+-----------+
| data      |
+-----------+
| 4267.05MB |
+-----------+
1 row in set (0.00 sec)

8. 准备测试,分别测试并发数为30,50,100,200,800,1000的情况

time sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua \
--mysql-host=bjs.cbchwkqr6lfg.rds.cn-north-1.amazonaws.com.cn --mysql-port=3306 --mysql-user=admin --mysql-password=admin123 \
--mysql-db=test --oltp-tables-count=20 --oltp-table-size=1000000 \
--report-interval=10 --rand-init=on --max-requests=0 \
--oltp-read-only=off --time=120 --threads=100 \
run

9. 测试结果如下


Single-AZ

Multi-AZ

30


[ 10s ] thds: 30 tps: 1032.91 qps: 20697.83 (r/w/o: 14495.96/4133.05/2068.82) lat (ms,95%): 48.34 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 30 tps: 1033.51 qps: 20673.35 (r/w/o: 14470.47/4135.85/2067.02) lat (ms,95%): 46.63 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 30 tps: 1085.89 qps: 21723.72 (r/w/o: 15204.28/4347.46/2171.98) lat (ms,95%): 44.17 err/s: 0.20 reconn/s: 0.00

[ 40s ] thds: 30 tps: 1049.03 qps: 20974.76 (r/w/o: 14686.36/4190.33/2098.07) lat (ms,95%): 44.98 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 30 tps: 1107.37 qps: 22141.33 (r/w/o: 15494.93/4431.67/2214.73) lat (ms,95%): 42.61 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 30 tps: 1105.84 qps: 22121.03 (r/w/o: 15488.51/4420.85/2211.67) lat (ms,95%): 41.85 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 30 tps: 1097.57 qps: 21952.09 (r/w/o: 15364.17/4392.88/2195.04) lat (ms,95%): 42.61 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 30 tps: 1103.28 qps: 22064.42 (r/w/o: 15444.26/4413.40/2206.75) lat (ms,95%): 42.61 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 30 tps: 1092.20 qps: 21845.18 (r/w/o: 15293.98/4366.80/2184.40) lat (ms,95%): 43.39 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 30 tps: 1108.80 qps: 22184.35 (r/w/o: 15529.84/4436.81/2217.71) lat (ms,95%): 42.61 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 30 tps: 997.20 qps: 19949.65 (r/w/o: 13962.97/3992.29/1994.40) lat (ms,95%): 52.89 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 30 tps: 1110.47 qps: 22210.67 (r/w/o: 15544.46/4445.57/2220.64) lat (ms,95%): 41.85 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1809850

       write:                           517089

       other:                           258546

       total:                           2585485

   transactions:                        129271 (1077.14 per sec.)

   queries:                             2585485 (21543.33 per sec.)

   ignored errors:                      4      (0.03 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0116s

   total number of events:              129271


Latency (ms):

        min:                                    7.31

        avg:                                   27.85

        max:                                  284.50

        95th percentile:                       44.17

        sum:                              3599601.23


Threads fairness:

   events (avg/stddev):           4309.0333/116.51

   execution time (avg/stddev):   119.9867/0.00


[ 10s ] thds: 30 tps: 741.47 qps: 14871.18 (r/w/o: 10414.53/2970.70/1485.95) lat (ms,95%): 78.60 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 30 tps: 920.00 qps: 18399.66 (r/w/o: 12878.57/3681.09/1840.00) lat (ms,95%): 58.92 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 30 tps: 993.70 qps: 19875.43 (r/w/o: 13912.82/3975.21/1987.40) lat (ms,95%): 53.85 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 30 tps: 962.70 qps: 19256.83 (r/w/o: 13478.65/3852.99/1925.19) lat (ms,95%): 56.84 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 30 tps: 816.21 qps: 16326.51 (r/w/o: 11434.48/3259.42/1632.61) lat (ms,95%): 70.55 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 30 tps: 609.00 qps: 12173.01 (r/w/o: 8516.04/2438.98/1217.99) lat (ms,95%): 142.39 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 30 tps: 734.40 qps: 14702.05 (r/w/o: 10291.83/2941.31/1468.90) lat (ms,95%): 81.48 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 30 tps: 625.90 qps: 12513.25 (r/w/o: 8763.74/2497.71/1251.81) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 30 tps: 826.94 qps: 16525.74 (r/w/o: 11563.22/3308.75/1653.77) lat (ms,95%): 73.13 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 30 tps: 874.85 qps: 17508.17 (r/w/o: 12257.48/3500.89/1749.80) lat (ms,95%): 71.83 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 30 tps: 966.67 qps: 19337.83 (r/w/o: 13535.93/3868.57/1933.33) lat (ms,95%): 54.83 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 30 tps: 977.11 qps: 19538.22 (r/w/o: 13676.65/3907.34/1954.22) lat (ms,95%): 55.82 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1407308

       write:                           402084

       other:                           201043

       total:                           2010435

   transactions:                        100521 (837.49 per sec.)

   queries:                             2010435 (16750.02 per sec.)

   ignored errors:                      1      (0.01 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0242s

   total number of events:              100521


Latency (ms):

        min:                                   13.57

        avg:                                   35.81

        max:                                  763.31

        95th percentile:                       66.84

        sum:                              3599948.66


Threads fairness:

   events (avg/stddev):           3350.7000/34.93

   execution time (avg/stddev):   119.9983/0.01

50


[ 10s ] thds: 50 tps: 1137.08 qps: 22805.30 (r/w/o: 15977.15/4549.00/2279.15) lat (ms,95%): 99.33 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 50 tps: 1146.71 qps: 22938.37 (r/w/o: 16053.52/4591.23/2293.62) lat (ms,95%): 99.33 err/s: 0.20 reconn/s: 0.00

[ 30s ] thds: 50 tps: 1154.99 qps: 23107.28 (r/w/o: 16174.22/4623.18/2309.89) lat (ms,95%): 99.33 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 50 tps: 657.80 qps: 13150.37 (r/w/o: 9203.88/2630.79/1315.70) lat (ms,95%): 164.45 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 50 tps: 1113.10 qps: 22261.67 (r/w/o: 15588.68/4446.69/2226.30) lat (ms,95%): 104.84 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 50 tps: 1147.00 qps: 22921.44 (r/w/o: 16039.52/4587.91/2294.00) lat (ms,95%): 102.97 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 50 tps: 1157.30 qps: 23146.43 (r/w/o: 16198.85/4632.89/2314.69) lat (ms,95%): 102.97 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 50 tps: 1155.70 qps: 23134.14 (r/w/o: 16199.53/4623.21/2311.40) lat (ms,95%): 102.97 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 50 tps: 985.10 qps: 19722.64 (r/w/o: 13804.03/3948.41/1970.20) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 50 tps: 1111.42 qps: 22206.79 (r/w/o: 15549.14/4434.80/2222.85) lat (ms,95%): 104.84 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 50 tps: 1130.91 qps: 22630.72 (r/w/o: 15839.35/4529.44/2261.92) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 50 tps: 1137.51 qps: 22759.94 (r/w/o: 15932.27/4552.65/2275.02) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1825656

       write:                           521602

       other:                           260803

       total:                           2608061

   transactions:                        130399 (1086.47 per sec.)

   queries:                             2608061 (21730.15 per sec.)

   ignored errors:                      5      (0.04 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0187s

   total number of events:              130399


Latency (ms):

        min:                                    7.79

        avg:                                   46.01

        max:                                 3068.14

        95th percentile:                      104.84

        sum:                              5999824.14


Threads fairness:

   events (avg/stddev):           2607.9800/44.76

   execution time (avg/stddev):   119.9965/0.00

[ 10s ] thds: 50 tps: 1104.51 qps: 22152.75 (r/w/o: 15515.60/4423.13/2214.02) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 50 tps: 1085.65 qps: 21687.20 (r/w/o: 15175.97/4339.92/2171.31) lat (ms,95%): 97.55 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 50 tps: 1077.41 qps: 21578.35 (r/w/o: 15109.98/4313.55/2154.82) lat (ms,95%): 99.33 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 50 tps: 1086.50 qps: 21730.67 (r/w/o: 15210.98/4346.69/2173.00) lat (ms,95%): 97.55 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 50 tps: 1070.37 qps: 21421.94 (r/w/o: 14995.34/4285.77/2140.83) lat (ms,95%): 99.33 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 50 tps: 239.71 qps: 4795.87 (r/w/o: 3361.62/954.83/479.42) lat (ms,95%): 977.74 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 50 tps: 448.78 qps: 8984.91 (r/w/o: 6282.93/1804.42/897.56) lat (ms,95%): 475.79 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 50 tps: 812.47 qps: 16234.29 (r/w/o: 11367.37/3241.88/1625.04) lat (ms,95%): 161.51 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 50 tps: 1085.08 qps: 21682.19 (r/w/o: 15176.41/4335.62/2170.16) lat (ms,95%): 97.55 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 50 tps: 860.51 qps: 17236.42 (r/w/o: 12070.38/3445.02/1721.01) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 50 tps: 773.40 qps: 15459.21 (r/w/o: 10815.14/3097.28/1546.79) lat (ms,95%): 193.38 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 50 tps: 747.60 qps: 14970.13 (r/w/o: 10477.52/2997.41/1495.20) lat (ms,95%): 161.51 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1455650

       write:                           415892

       other:                           207948

       total:                           2079490

   transactions:                        103973 (866.29 per sec.)

   queries:                             2079490 (17326.02 per sec.)

   ignored errors:                      2      (0.02 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0196s

   total number of events:              103973


Latency (ms):

        min:                                   14.19

        avg:                                   57.71

        max:                                 1418.10

        95th percentile:                      127.81

        sum:                              59×××5.02


Threads fairness:

   events (avg/stddev):           2079.4600/31.43

   execution time (avg/stddev):   119.9985/0.00

200

[ 10s ] thds: 800 tps: 1063.47 qps: 22467.06 (r/w/o: 15884.30/4376.52/2206.23) lat (ms,95%): 2279.14 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 800 tps: 1209.51 qps: 23794.47 (r/w/o: 16553.90/4840.15/2400.43) lat (ms,95%): 1191.92 err/s: 0.50 reconn/s: 0.00

[ 30s ] thds: 800 tps: 1174.39 qps: 23782.60 (r/w/o: 16683.96/4729.86/2368.78) lat (ms,95%): 1352.03 err/s: 0.40 reconn/s: 0.00

[ 40s ] thds: 800 tps: 1186.26 qps: 23531.91 (r/w/o: 16549.15/4610.14/2372.62) lat (ms,95%): 1280.93 err/s: 0.70 reconn/s: 0.00

[ 50s ] thds: 800 tps: 1162.29 qps: 23559.83 (r/w/o: 16477.78/4756.57/2325.48) lat (ms,95%): 1304.21 err/s: 0.30 reconn/s: 0.00

[ 60s ] thds: 800 tps: 1194.38 qps: 23766.52 (r/w/o: 16700.46/4676.61/2389.45) lat (ms,95%): 1352.03 err/s: 0.90 reconn/s: 0.00

[ 70s ] thds: 800 tps: 1108.95 qps: 22610.92 (r/w/o: 15698.87/4693.43/2218.61) lat (ms,95%): 1191.92 err/s: 0.40 reconn/s: 0.00

[ 80s ] thds: 800 tps: 1119.46 qps: 21946.37 (r/w/o: 15428.88/4278.76/2238.73) lat (ms,95%): 1191.92 err/s: 0.20 reconn/s: 0.00

[ 90s ] thds: 800 tps: 1126.60 qps: 22334.43 (r/w/o: 15597.15/4483.59/2253.69) lat (ms,95%): 1109.09 err/s: 0.30 reconn/s: 0.00

[ 100s ] thds: 800 tps: 1067.54 qps: 21973.41 (r/w/o: 15374.77/4462.96/2135.68) lat (ms,95%): 1129.24 err/s: 0.40 reconn/s: 0.00

[ 110s ] thds: 800 tps: 1129.46 qps: 22201.94 (r/w/o: 15586.77/4356.05/2259.12) lat (ms,95%): 1170.65 err/s: 0.40 reconn/s: 0.00

[ 120s ] thds: 800 tps: 1140.79 qps: 22534.39 (r/w/o: 15771.72/4480.68/2281.99) lat (ms,95%): 1089.30 err/s: 0.70 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1927800

       write:                           550653

       other:                           275347

       total:                           2753800

   transactions:                        137647 (1141.45 per sec.)

   queries:                             2753800 (22836.15 per sec.)

   ignored errors:                      53     (0.44 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.5878s

   total number of events:              137647


Latency (ms):

        min:                                   11.84

        avg:                                  700.06

        max:                                13337.59

        95th percentile:                     1191.92

        sum:                             96361497.32


Threads fairness:

   events (avg/stddev):           172.0588/13.66

   execution time (avg/stddev):   120.4519/0.07

[ 10s ] thds: 800 tps: 1100.32 qps: 22507.97 (r/w/o: 15826.77/4434.67/2246.53) lat (ms,95%): 719.92 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 800 tps: 1086.05 qps: 22402.20 (r/w/o: 15672.30/4535.80/2194.10) lat (ms,95%): 960.30 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 800 tps: 1130.59 qps: 22803.59 (r/w/o: 16002.32/4527.58/2273.69) lat (ms,95%): 1327.91 err/s: 0.40 reconn/s: 0.00

[ 40s ] thds: 800 tps: 1180.40 qps: 23317.74 (r/w/o: 16336.33/4619.91/2361.50) lat (ms,95%): 1280.93 err/s: 0.80 reconn/s: 0.00

[ 50s ] thds: 800 tps: 1155.40 qps: 23013.64 (r/w/o: 16136.43/4566.11/2311.10) lat (ms,95%): 1280.93 err/s: 0.40 reconn/s: 0.00

[ 60s ] thds: 800 tps: 1134.00 qps: 22988.59 (r/w/o: 16075.89/4644.30/2268.40) lat (ms,95%): 1213.57 err/s: 0.30 reconn/s: 0.00

[ 70s ] thds: 800 tps: 1118.30 qps: 22453.46 (r/w/o: 15747.27/4469.09/2237.10) lat (ms,95%): 1213.57 err/s: 0.50 reconn/s: 0.00

[ 80s ] thds: 800 tps: 1171.49 qps: 23023.86 (r/w/o: 16111.60/4571.07/2341.19) lat (ms,95%): 1258.08 err/s: 0.60 reconn/s: 0.00

[ 90s ] thds: 800 tps: 776.81 qps: 15932.48 (r/w/o: 11202.93/3173.24/1556.32) lat (ms,95%): 1479.41 err/s: 0.20 reconn/s: 0.00

[ 100s ] thds: 800 tps: 240.90 qps: 4828.00 (r/w/o: 3375.40/970.60/482.00) lat (ms,95%): 8955.74 err/s: 0.20 reconn/s: 0.00

[ 110s ] thds: 800 tps: 73.70 qps: 1378.19 (r/w/o: 941.99/289.10/147.10) lat (ms,95%): 12609.11 err/s: 0.10 reconn/s: 0.00

[ 120s ] thds: 800 tps: 224.80 qps: 4457.62 (r/w/o: 3120.31/886.80/450.50) lat (ms,95%): 13797.01 err/s: 0.70 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1466836

       write:                           418969

       other:                           209504

       total:                           2095309

   transactions:                        104730 (857.66 per sec.)

   queries:                             2095309 (17158.99 per sec.)

   ignored errors:                      44     (0.36 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          122.1097s

   total number of events:              104730


Latency (ms):

        min:                                   15.85

        avg:                                  927.55

        max:                                22921.04

        95th percentile:                     2009.23

        sum:                             97142625.81


Threads fairness:

   events (avg/stddev):           130.9125/25.08

   execution time (avg/stddev):   121.4283/0.35

1000

[ 10s ] thds: 1000 tps: 891.39 qps: 19388.55 (r/w/o: 13779.33/3725.62/1883.60) lat (ms,95%): 3511.19 err/s: 1.30 reconn/s: 0.00

[ 20s ] thds: 1000 tps: 1119.00 qps: 21904.82 (r/w/o: 15346.84/4318.58/2239.40) lat (ms,95%): 2009.23 err/s: 1.30 reconn/s: 0.00

[ 30s ] thds: 1000 tps: 1100.69 qps: 22226.53 (r/w/o: 15506.38/4518.57/2201.58) lat (ms,95%): 1533.66 err/s: 0.40 reconn/s: 0.00

[ 40s ] thds: 1000 tps: 1125.50 qps: 22024.51 (r/w/o: 15316.51/4456.60/2251.40) lat (ms,95%): 1479.41 err/s: 0.70 reconn/s: 0.00

[ 50s ] thds: 1000 tps: 1099.00 qps: 22629.65 (r/w/o: 15922.37/4508.29/2199.00) lat (ms,95%): 1618.78 err/s: 0.70 reconn/s: 0.00

[ 60s ] thds: 1000 tps: 1136.32 qps: 22505.01 (r/w/o: 15790.08/4441.68/2273.24) lat (ms,95%): 1648.20 err/s: 0.60 reconn/s: 0.00

[ 70s ] thds: 1000 tps: 1091.80 qps: 22445.50 (r/w/o: 15652.63/4608.48/2184.39) lat (ms,95%): 1678.14 err/s: 0.50 reconn/s: 0.00

[ 80s ] thds: 1000 tps: 1180.77 qps: 23013.43 (r/w/o: 16082.90/4568.89/2361.64) lat (ms,95%): 1561.52 err/s: 0.70 reconn/s: 0.00

[ 90s ] thds: 1000 tps: 1130.25 qps: 23059.71 (r/w/o: 16238.81/4559.30/2261.60) lat (ms,95%): 1352.03 err/s: 0.50 reconn/s: 0.00

[ 100s ] thds: 1000 tps: 1189.76 qps: 23244.00 (r/w/o: 16301.31/4562.66/2380.03) lat (ms,95%): 1708.63 err/s: 0.60 reconn/s: 0.00

[ 110s ] thds: 1000 tps: 611.42 qps: 12876.74 (r/w/o: 9019.31/2634.19/1223.24) lat (ms,95%): 4855.31 err/s: 0.40 reconn/s: 0.00

[ 120s ] thds: 1000 tps: 741.35 qps: 14545.68 (r/w/o: 10140.56/2924.62/1480.51) lat (ms,95%): 4683.57 err/s: 1.80 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1753542

       write:                           500724

       other:                           250410

       total:                           2504676

   transactions:                        125157 (1030.73 per sec.)

   queries:                             2504676 (20627.31 per sec.)

   ignored errors:                      96     (0.79 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          121.4235s

   total number of events:              125157


Latency (ms):

        min:                                    8.94

        avg:                                  965.21

        max:                                11345.14

        95th percentile:                     1938.16

        sum:                            120803219.78


Threads fairness:

   events (avg/stddev):           125.1570/7.27

   execution time (avg/stddev):   120.8032/0.53

[ 10s ] thds: 1000 tps: 1129.94 qps: 23135.53 (r/w/o: 16280.62/4553.04/2301.87) lat (ms,95%): 601.29 err/s: 0.20 reconn/s: 0.00

[ 20s ] thds: 1000 tps: 1140.93 qps: 23010.78 (r/w/o: 16134.27/4536.03/2340.47) lat (ms,95%): 11732.86 err/s: 0.60 reconn/s: 0.00

[ 30s ] thds: 1000 tps: 1134.00 qps: 22820.04 (r/w/o: 15933.53/4617.71/2268.80) lat (ms,95%): 1401.61 err/s: 0.90 reconn/s: 0.00

[ 40s ] thds: 1000 tps: 1140.60 qps: 23106.22 (r/w/o: 16288.23/4536.09/2281.89) lat (ms,95%): 1648.20 err/s: 0.60 reconn/s: 0.00

[ 50s ] thds: 1000 tps: 1134.12 qps: 22744.62 (r/w/o: 15905.52/4570.56/2268.53) lat (ms,95%): 1678.14 err/s: 0.40 reconn/s: 0.00

[ 60s ] thds: 1000 tps: 1143.28 qps: 23087.18 (r/w/o: 16262.27/4537.94/2286.97) lat (ms,95%): 1561.52 err/s: 0.50 reconn/s: 0.00

[ 70s ] thds: 1000 tps: 1168.05 qps: 23113.24 (r/w/o: 16045.85/4730.39/2336.99) lat (ms,95%): 1453.01 err/s: 0.60 reconn/s: 0.00

[ 80s ] thds: 1000 tps: 1122.76 qps: 22873.54 (r/w/o: 16028.40/4599.03/2246.11) lat (ms,95%): 1648.20 err/s: 0.50 reconn/s: 0.00

[ 90s ] thds: 1000 tps: 1159.40 qps: 23234.23 (r/w/o: 16259.85/4655.08/2319.29) lat (ms,95%): 1479.41 err/s: 0.60 reconn/s: 0.00

[ 100s ] thds: 1000 tps: 396.94 qps: 7989.86 (r/w/o: 5714.24/1481.34/794.28) lat (ms,95%): 1561.52 err/s: 0.30 reconn/s: 0.00

[ 110s ] thds: 1000 tps: 73.40 qps: 1532.60 (r/w/o: 1031.80/353.70/147.10) lat (ms,95%): 17124.84 err/s: 0.30 reconn/s: 0.00

[ 120s ] thds: 1000 tps: 120.10 qps: 2403.50 (r/w/o: 1689.80/472.90/240.80) lat (ms,95%): 20876.04 err/s: 0.60 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            1535814

       write:                           438626

       other:                           219339

       total:                           2193779

   transactions:                        109638 (885.96 per sec.)

   queries:                             2193779 (17727.46 per sec.)

   ignored errors:                      63     (0.51 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          123.7486s

   total number of events:              109638


Latency (ms):

        min:                                   21.90

        avg:                                 1109.17

        max:                                30488.80

        95th percentile:                     1836.24

        sum:                            121607109.37


Threads fairness:

   events (avg/stddev):           109.6380/22.01

   execution time (avg/stddev):   121.6071/1.16


10. 通过AWS控制台,可以看到,测试过程中,RDS的session连接数


RDS Mysql Single-AZ和Multi-AZ性能差异

11. 修改为多区可用RDS,然后进行测试


RDS Mysql Single-AZ和Multi-AZ性能差异

12. 通过控制台,可以看到Multi-AZ的修改状态


RDS Mysql Single-AZ和Multi-AZ性能差异

13.  增加数据库测试负载,创建更多的表,和单表数据。

创建79个表,每个表1000W行数据。

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=bjs.cbchwkqr6lfg.rds.cn-north-1.amazonaws.com.cn --mysql-port=3306 --mysql-user=admin --mysql-password=admin123 --mysql-db=testdb2 --oltp-tables-count=79 --oltp-table-size=100000000 --report-interval=10 --rand-init=on --max-requests=0 --oltp-read-only=off --time=120 --threads=200 run


14. 测试结果


Single AZ

Multi-AZ

50

[ 10s ] thds: 50 tps: 1540.85 qps: 30875.71 (r/w/o: 21621.50/1654.90/7599.30) lat (ms,95%): 81.48 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 50 tps: 1554.53 qps: 31079.39 (r/w/o: 21756.11/1670.45/7652.83) lat (ms,95%): 81.48 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 50 tps: 1526.90 qps: 30542.91 (r/w/o: 21378.61/1641.30/7523.00) lat (ms,95%): 82.96 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 50 tps: 1527.80 qps: 30557.08 (r/w/o: 21389.45/1638.50/7529.12) lat (ms,95%): 86.00 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 50 tps: 1532.99 qps: 30653.60 (r/w/o: 21458.63/1643.29/7551.67) lat (ms,95%): 84.47 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 50 tps: 1523.50 qps: 30496.87 (r/w/o: 21347.75/1641.30/7507.82) lat (ms,95%): 87.56 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 50 tps: 1519.50 qps: 30376.99 (r/w/o: 21259.99/1629.20/7487.80) lat (ms,95%): 86.00 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 50 tps: 1525.46 qps: 30519.01 (r/w/o: 21369.97/1640.14/7508.89) lat (ms,95%): 86.00 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 50 tps: 1523.79 qps: 30470.11 (r/w/o: 21325.17/1636.99/7507.95) lat (ms,95%): 86.00 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 50 tps: 1513.82 qps: 30271.23 (r/w/o: 21191.90/1626.72/7452.60) lat (ms,95%): 86.00 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 50 tps: 1506.51 qps: 30139.70 (r/w/o: 21101.74/1619.51/7418.45) lat (ms,95%): 86.00 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 50 tps: 1495.22 qps: 29890.14 (r/w/o: 20920.04/1612.93/7357.18) lat (ms,95%): 87.56 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2561496

       write:                           196607

       other:                           901175

       total:                           3659278

   transactions:                        182963 (1524.33 per sec.)

   queries:                             3659278 (30486.75 per sec.)

   ignored errors:                      1      (0.01 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0268s

   total number of events:              182963


Latency (ms):

        min:                                    6.70

        avg:                                   32.79

        max:                                  204.90

        95th percentile:                       84.47

        sum:                              5999973.93


Threads fairness:

   events (avg/stddev):           3659.2600/80.74

   execution time (avg/stddev):   119.9995/0.00

[ 10s ] thds: 50 tps: 1263.61 qps: 25348.42 (r/w/o: 17750.59/1290.30/6307.54) lat (ms,95%): 66.84 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 50 tps: 1407.15 qps: 28115.78 (r/w/o: 19682.69/1434.85/6998.24) lat (ms,95%): 57.87 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 50 tps: 1295.70 qps: 25942.03 (r/w/o: 18155.25/1327.20/6459.58) lat (ms,95%): 68.05 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 50 tps: 1376.10 qps: 27512.77 (r/w/o: 19261.48/1402.50/6848.79) lat (ms,95%): 57.87 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 50 tps: 1332.81 qps: 26679.74 (r/w/o: 18673.60/1363.51/6642.63) lat (ms,95%): 59.99 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 50 tps: 1349.03 qps: 26967.78 (r/w/o: 18880.87/1376.73/6710.17) lat (ms,95%): 59.99 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 50 tps: 1372.52 qps: 27440.49 (r/w/o: 19205.08/1407.72/6827.70) lat (ms,95%): 58.92 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 50 tps: 1368.34 qps: 27367.41 (r/w/o: 19157.50/1400.04/6809.88) lat (ms,95%): 57.87 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 50 tps: 1355.17 qps: 27101.59 (r/w/o: 18971.94/1387.77/6741.87) lat (ms,95%): 59.99 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 50 tps: 1348.41 qps: 26959.30 (r/w/o: 18870.07/1383.41/6705.82) lat (ms,95%): 59.99 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 50 tps: 1327.86 qps: 26584.54 (r/w/o: 18610.87/1363.16/6610.51) lat (ms,95%): 61.08 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 50 tps: 1325.13 qps: 26510.70 (r/w/o: 18555.82/1355.53/6599.35) lat (ms,95%): 62.19 err/s: 0.10 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2257808

       write:                           164934

       other:                           802696

       total:                           3225438

   transactions:                        161271 (1343.39 per sec.)

   queries:                             3225438 (26867.91 per sec.)

   ignored errors:                      1      (0.01 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0463s

   total number of events:              161271


Latency (ms):

        min:                                   18.16

        avg:                                   37.21

        max:                                  297.41

        95th percentile:                       59.99

        sum:                              6001143.16


Threads fairness:

   events (avg/stddev):           3225.4200/16.17

   execution time (avg/stddev):   120.0229/0.00

200

[ 10s ] thds: 200 tps: 1601.51 qps: 32216.89 (r/w/o: 22582.67/1681.46/7952.76) lat (ms,95%): 282.25 err/s: 0.10 reconn/s: 0.00

[ 20s ] thds: 200 tps: 1465.94 qps: 29317.03 (r/w/o: 20507.28/1541.04/7268.70) lat (ms,95%): 320.17 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 200 tps: 1612.80 qps: 32289.36 (r/w/o: 22629.74/1689.00/7970.61) lat (ms,95%): 272.27 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 200 tps: 1587.50 qps: 31723.89 (r/w/o: 22198.89/1669.20/7855.80) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 200 tps: 1562.41 qps: 31355.32 (r/w/o: 21949.19/1651.30/7754.84) lat (ms,95%): 287.38 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 200 tps: 1615.56 qps: 32234.14 (r/w/o: 22567.80/1694.95/7971.39) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 200 tps: 1576.34 qps: 31614.02 (r/w/o: 22132.77/1665.54/7815.70) lat (ms,95%): 297.92 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 200 tps: 1583.20 qps: 31560.02 (r/w/o: 22068.04/1664.30/7827.68) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 200 tps: 1615.40 qps: 32433.12 (r/w/o: 22710.24/1713.59/8009.29) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 200 tps: 1578.01 qps: 31514.80 (r/w/o: 22072.97/1654.51/7787.32) lat (ms,95%): 287.38 err/s: 0.00 reconn/s: 0.00

[ 110s ] thds: 200 tps: 1561.40 qps: 31223.82 (r/w/o: 21863.72/1647.80/7712.31) lat (ms,95%): 308.84 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 200 tps: 1608.37 qps: 32104.09 (r/w/o: 22464.97/1694.57/7944.55) lat (ms,95%): 267.41 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2658502

       write:                           199880

       other:                           939474

       total:                           3797856

   transactions:                        189891 (1581.09 per sec.)

   queries:                             3797856 (31622.16 per sec.)

   ignored errors:                      2      (0.02 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.0994s

   total number of events:              189891


Latency (ms):

        min:                                    7.13

        avg:                                  126.45

        max:                                  892.23

        95th percentile:                      287.38

        sum:                             24011105.70


Threads fairness:

   events (avg/stddev):           949.4550/42.99

   execution time (avg/stddev):   120.0555/0.02

[ 10s ] thds: 200 tps: 1431.89 qps: 29346.64 (r/w/o: 20610.27/1460.68/7275.70) lat (ms,95%): 308.84 err/s: 24.38 reconn/s: 0.00

[ 20s ] thds: 200 tps: 1524.35 qps: 30482.11 (r/w/o: 21333.24/1548.44/7600.43) lat (ms,95%): 267.41 err/s: 1.70 reconn/s: 0.00

[ 30s ] thds: 200 tps: 1395.15 qps: 27909.95 (r/w/o: 19532.63/1418.05/6959.26) lat (ms,95%): 314.45 err/s: 0.40 reconn/s: 0.00

[ 40s ] thds: 200 tps: 1512.74 qps: 30181.06 (r/w/o: 21117.80/1530.85/7532.41) lat (ms,95%): 267.41 err/s: 0.80 reconn/s: 0.00

[ 50s ] thds: 200 tps: 1501.80 qps: 30159.96 (r/w/o: 21135.84/1526.70/7497.42) lat (ms,95%): 267.41 err/s: 0.20 reconn/s: 0.00

[ 60s ] thds: 200 tps: 1491.58 qps: 29782.21 (r/w/o: 20842.36/1519.47/7420.38) lat (ms,95%): 282.25 err/s: 0.60 reconn/s: 0.00

[ 70s ] thds: 200 tps: 1499.33 qps: 30072.38 (r/w/o: 21053.51/1532.13/7486.74) lat (ms,95%): 267.41 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 200 tps: 1439.60 qps: 28764.08 (r/w/o: 20137.29/1464.60/7162.20) lat (ms,95%): 277.21 err/s: 0.30 reconn/s: 0.00

[ 90s ] thds: 200 tps: 1500.80 qps: 30070.31 (r/w/o: 21044.01/1531.00/7495.30) lat (ms,95%): 262.64 err/s: 0.30 reconn/s: 0.00

[ 100s ] thds: 200 tps: 1503.88 qps: 30132.16 (r/w/o: 21079.40/1542.88/7509.89) lat (ms,95%): 257.95 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 200 tps: 1517.92 qps: 30257.87 (r/w/o: 21192.66/1535.02/7530.19) lat (ms,95%): 272.27 err/s: 0.20 reconn/s: 0.00

[ 120s ] thds: 200 tps: 1484.81 qps: 29818.13 (r/w/o: 20864.49/1525.11/7428.53) lat (ms,95%): 267.41 err/s: 0.30 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2499574

       write:                           181385

       other:                           889273

       total:                           3570232

   transactions:                        178247 (1483.35 per sec.)

   queries:                             3570232 (29710.98 per sec.)

   ignored errors:                      294    (2.45 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.1637s

   total number of events:              178247


Latency (ms):

        min:                                   21.32

        avg:                                  134.78

        max:                                 1049.36

        95th percentile:                      277.21

        sum:                             24024895.81


Threads fairness:

   events (avg/stddev):           891.2350/25.13

   execution time (avg/stddev):   120.1245/0.02

400


[ 10s ] thds: 400 tps: 1577.46 qps: 32006.99 (r/w/o: 22489.46/1665.93/7851.60) lat (ms,95%): 530.08 err/s: 0.10 reconn/s: 0.00

[ 20s ] thds: 400 tps: 1573.42 qps: 31745.80 (r/w/o: 22172.37/1699.24/7874.19) lat (ms,95%): 511.33 err/s: 0.10 reconn/s: 0.00

[ 30s ] thds: 400 tps: 1615.79 qps: 31912.59 (r/w/o: 22336.83/1675.69/7900.07) lat (ms,95%): 502.20 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 400 tps: 1566.40 qps: 31395.98 (r/w/o: 22014.26/1651.20/7730.52) lat (ms,95%): 569.67 err/s: 0.10 reconn/s: 0.00

[ 50s ] thds: 400 tps: 1520.60 qps: 30344.87 (r/w/o: 21221.38/1599.20/7524.29) lat (ms,95%): 539.71 err/s: 0.20 reconn/s: 0.00

[ 60s ] thds: 400 tps: 1441.50 qps: 29022.95 (r/w/o: 20359.73/1528.40/7134.81) lat (ms,95%): 590.56 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 400 tps: 1538.50 qps: 30569.61 (r/w/o: 21354.14/1621.10/7594.38) lat (ms,95%): 530.08 err/s: 0.10 reconn/s: 0.00

[ 80s ] thds: 400 tps: 1488.70 qps: 29987.04 (r/w/o: 20996.63/1584.60/7405.81) lat (ms,95%): 569.67 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 400 tps: 1552.50 qps: 30948.97 (r/w/o: 21673.98/1629.90/7645.09) lat (ms,95%): 569.67 err/s: 0.20 reconn/s: 0.00

[ 100s ] thds: 400 tps: 1553.20 qps: 30974.58 (r/w/o: 21667.19/1642.10/7665.30) lat (ms,95%): 530.08 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 400 tps: 1511.90 qps: 30069.27 (r/w/o: 21006.18/1600.90/7462.19) lat (ms,95%): 520.62 err/s: 0.10 reconn/s: 0.00

[ 120s ] thds: 400 tps: 1536.80 qps: 31042.17 (r/w/o: 21746.25/1651.00/7644.92) lat (ms,95%): 511.33 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2592534

       write:                           195730

       other:                           915336

       total:                           3703600

   transactions:                        185171 (1540.77 per sec.)

   queries:                             3703600 (30816.89 per sec.)

   ignored errors:                      10     (0.08 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.1792s

   total number of events:              185171


Latency (ms):

        min:                                    7.93

        avg:                                  259.47

        max:                                 2402.09

        95th percentile:                      539.71

        sum:                             48046834.13


Threads fairness:

   events (avg/stddev):           462.9275/23.83

   execution time (avg/stddev):   120.1171/0.02


[ 10s ] thds: 400 tps: 1530.10 qps: 31179.00 (r/w/o: 21862.12/1589.05/7727.83) lat (ms,95%): 484.44 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 400 tps: 1563.21 qps: 31299.57 (r/w/o: 21934.42/1600.11/7765.05) lat (ms,95%): 511.33 err/s: 0.20 reconn/s: 0.00

[ 30s ] thds: 400 tps: 1505.94 qps: 30091.28 (r/w/o: 21059.24/1547.34/7484.69) lat (ms,95%): 549.52 err/s: 0.20 reconn/s: 0.00

[ 40s ] thds: 400 tps: 1473.70 qps: 29374.66 (r/w/o: 20539.58/1512.90/7322.19) lat (ms,95%): 511.33 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 400 tps: 1506.90 qps: 29847.43 (r/w/o: 20874.85/1528.60/7443.98) lat (ms,95%): 549.52 err/s: 0.20 reconn/s: 0.00

[ 60s ] thds: 400 tps: 1459.91 qps: 29550.62 (r/w/o: 20723.28/1511.11/7316.23) lat (ms,95%): 569.67 err/s: 0.30 reconn/s: 0.00

[ 70s ] thds: 400 tps: 1464.00 qps: 29286.06 (r/w/o: 20522.77/1494.80/7268.49) lat (ms,95%): 559.50 err/s: 0.30 reconn/s: 0.00

[ 80s ] thds: 400 tps: 1498.50 qps: 29796.48 (r/w/o: 20792.69/1546.50/7457.30) lat (ms,95%): 569.67 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 400 tps: 1445.00 qps: 29106.07 (r/w/o: 20447.05/1478.00/7181.02) lat (ms,95%): 549.52 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 400 tps: 1393.97 qps: 28035.99 (r/w/o: 19578.91/1462.56/6994.53) lat (ms,95%): 539.71 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 400 tps: 1487.53 qps: 29453.71 (r/w/o: 20620.83/1510.13/7322.75) lat (ms,95%): 559.50 err/s: 0.40 reconn/s: 0.00

[ 120s ] thds: 400 tps: 1476.50 qps: 29760.91 (r/w/o: 20854.58/1525.51/7380.82) lat (ms,95%): 569.67 err/s: 0.00 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2498776

       write:                           183301

       other:                           887567

       total:                           3569644

   transactions:                        178466 (1485.56 per sec.)

   queries:                             3569644 (29713.90 per sec.)

   ignored errors:                      18     (0.15 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.1321s

   total number of events:              178466


Latency (ms):

        min:                                   22.05

        avg:                                  269.10

        max:                                 4475.84

        95th percentile:                      539.71

        sum:                             48025613.30


Threads fairness:

   events (avg/stddev):           446.1650/22.59

   execution time (avg/stddev):   120.0640/0.03

800


[ 10s ] thds: 800 tps: 1457.03 qps: 30251.14 (r/w/o: 21335.69/1553.49/7361.96) lat (ms,95%): 1376.60 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 800 tps: 1543.51 qps: 30196.51 (r/w/o: 20996.79/1634.32/7565.41) lat (ms,95%): 1149.76 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 800 tps: 1530.83 qps: 30386.42 (r/w/o: 21234.54/1619.02/7532.86) lat (ms,95%): 1069.86 err/s: 0.10 reconn/s: 0.00

[ 40s ] thds: 800 tps: 1383.06 qps: 28581.75 (r/w/o: 20167.81/1497.06/6916.88) lat (ms,95%): 1013.60 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 800 tps: 1390.79 qps: 27932.03 (r/w/o: 19530.31/1490.49/6911.23) lat (ms,95%): 943.16 err/s: 0.00 reconn/s: 0.00

[ 60s ] thds: 800 tps: 1440.82 qps: 28410.31 (r/w/o: 19935.82/1489.42/6985.08) lat (ms,95%): 977.74 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 800 tps: 1417.76 qps: 28091.51 (r/w/o: 19497.85/1531.86/7061.80) lat (ms,95%): 995.51 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 800 tps: 1335.31 qps: 26883.16 (r/w/o: 18958.41/1398.81/6525.94) lat (ms,95%): 977.74 err/s: 0.20 reconn/s: 0.00

[ 90s ] thds: 800 tps: 1373.78 qps: 27758.52 (r/w/o: 19477.33/1464.48/6816.71) lat (ms,95%): 1032.01 err/s: 0.10 reconn/s: 0.00

[ 100s ] thds: 800 tps: 1336.15 qps: 26879.94 (r/w/o: 18796.86/1431.66/6651.43) lat (ms,95%): 995.51 err/s: 0.20 reconn/s: 0.00

[ 110s ] thds: 800 tps: 1396.80 qps: 27505.62 (r/w/o: 19219.91/1470.80/6814.90) lat (ms,95%): 943.16 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 800 tps: 1241.78 qps: 24801.85 (r/w/o: 17351.56/1320.07/6130.22) lat (ms,95%): 1129.24 err/s: 0.10 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2369920

       write:                           179842

       other:                           835824

       total:                           3385586

   transactions:                        169273 (1404.98 per sec.)

   queries:                             3385586 (28100.68 per sec.)

   ignored errors:                      7      (0.06 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.4788s

   total number of events:              169273


Latency (ms):

        min:                                    7.16

        avg:                                  568.54

        max:                                 9093.79

        95th percentile:                     1013.60

        sum:                             96237863.81


Threads fairness:

   events (avg/stddev):           211.5913/17.12

   execution time (avg/stddev):   120.2973/0.11

[ 10s ] thds: 800 tps: 1326.19 qps: 27325.58 (r/w/o: 19266.10/1365.63/6693.85) lat (ms,95%): 1235.62 err/s: 0.50 reconn/s: 0.00

[ 20s ] thds: 800 tps: 1492.42 qps: 29860.26 (r/w/o: 20815.56/1564.11/7480.59) lat (ms,95%): 995.51 err/s: 0.60 reconn/s: 0.00

[ 30s ] thds: 800 tps: 1364.22 qps: 27374.01 (r/w/o: 19216.87/1396.53/6760.61) lat (ms,95%): 1170.65 err/s: 0.50 reconn/s: 0.00

[ 40s ] thds: 800 tps: 1497.69 qps: 30016.55 (r/w/o: 21081.32/1528.39/7406.84) lat (ms,95%): 1089.30 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 800 tps: 1449.13 qps: 28801.26 (r/w/o: 20133.29/1492.03/7175.94) lat (ms,95%): 1032.01 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 800 tps: 1415.49 qps: 29079.35 (r/w/o: 20265.69/1545.40/7268.26) lat (ms,95%): 1069.86 err/s: 0.30 reconn/s: 0.00

[ 70s ] thds: 800 tps: 1463.59 qps: 28912.83 (r/w/o: 20315.18/1452.79/7144.86) lat (ms,95%): 1013.60 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 800 tps: 1508.50 qps: 29490.74 (r/w/o: 20565.06/1532.30/7393.39) lat (ms,95%): 995.51 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 800 tps: 1433.90 qps: 29256.83 (r/w/o: 20521.42/1514.40/7221.01) lat (ms,95%): 1089.30 err/s: 0.30 reconn/s: 0.00

[ 100s ] thds: 800 tps: 1429.80 qps: 28151.87 (r/w/o: 19685.28/1446.70/7019.89) lat (ms,95%): 977.74 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 800 tps: 1415.26 qps: 28517.55 (r/w/o: 19984.50/1474.65/7058.39) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00

[ 120s ] thds: 800 tps: 1374.57 qps: 27488.48 (r/w/o: 19283.54/1409.38/6795.56) lat (ms,95%): 995.51 err/s: 0.40 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2415784

       write:                           178032

       other:                           857246

       total:                           3451062

   transactions:                        172527 (1432.08 per sec.)

   queries:                             3451062 (28645.86 per sec.)

   ignored errors:                      29     (0.24 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.4716s

   total number of events:              172527


Latency (ms):

        min:                                   23.52

        avg:                                  557.59

        max:                                 2988.25

        95th percentile:                     1069.86

        sum:                             96198514.24


Threads fairness:

   events (avg/stddev):           215.6587/13.16

   execution time (avg/stddev):   120.2481/0.12

1000

[ 10s ] thds: 1000 tps: 1491.04 qps: 30497.62 (r/w/o: 21424.54/1622.40/7450.68) lat (ms,95%): 549.52 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 1000 tps: 1436.22 qps: 29798.67 (r/w/o: 20868.96/1618.32/7311.39) lat (ms,95%): 1938.16 err/s: 0.10 reconn/s: 0.00

[ 30s ] thds: 1000 tps: 1500.84 qps: 29742.53 (r/w/o: 20901.29/1562.95/7278.29) lat (ms,95%): 1235.62 err/s: 0.00 reconn/s: 0.00

[ 40s ] thds: 1000 tps: 1482.90 qps: 29566.14 (r/w/o: 20747.83/1571.20/7247.11) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00

[ 50s ] thds: 1000 tps: 1472.30 qps: 29610.90 (r/w/o: 20653.10/1628.70/7329.10) lat (ms,95%): 1376.60 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 1000 tps: 1531.80 qps: 29970.77 (r/w/o: 20993.88/1598.60/7378.29) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00

[ 70s ] thds: 1000 tps: 1398.00 qps: 28686.43 (r/w/o: 20058.62/1550.39/7077.41) lat (ms,95%): 1191.92 err/s: 0.00 reconn/s: 0.00

[ 80s ] thds: 1000 tps: 1481.82 qps: 29422.54 (r/w/o: 20645.80/1554.52/7222.22) lat (ms,95%): 1427.08 err/s: 0.10 reconn/s: 0.00

[ 90s ] thds: 1000 tps: 1437.03 qps: 29082.23 (r/w/o: 20292.24/1620.45/7169.55) lat (ms,95%): 1191.92 err/s: 0.00 reconn/s: 0.00

[ 100s ] thds: 1000 tps: 1473.14 qps: 29304.42 (r/w/o: 20587.77/1555.74/7160.91) lat (ms,95%): 1304.21 err/s: 0.10 reconn/s: 0.00

[ 110s ] thds: 1000 tps: 1314.08 qps: 26548.11 (r/w/o: 18471.03/1480.38/6596.70) lat (ms,95%): 1427.08 err/s: 0.40 reconn/s: 0.00

[ 120s ] thds: 1000 tps: 1467.20 qps: 29227.03 (r/w/o: 20484.42/1562.50/7180.11) lat (ms,95%): 1258.08 err/s: 0.20 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2462292

       write:                           189558

       other:                           865690

       total:                           3517540

   transactions:                        175868 (1462.45 per sec.)

   queries:                             3517540 (29250.47 per sec.)

   ignored errors:                      10     (0.08 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.2541s

   total number of events:              175868


Latency (ms):

        min:                                    6.64

        avg:                                  682.79

        max:                                20105.63

        95th percentile:                     1280.93

        sum:                            120081430.86


Threads fairness:

   events (avg/stddev):           175.8680/29.35

   execution time (avg/stddev):   120.0814/0.05

[ 10s ] thds: 1000 tps: 1434.24 qps: 29867.63 (r/w/o: 21009.44/1527.62/7330.57) lat (ms,95%): 995.51 err/s: 0.00 reconn/s: 0.00

[ 20s ] thds: 1000 tps: 1446.34 qps: 28968.48 (r/w/o: 20208.24/1524.94/7235.29) lat (ms,95%): 1376.60 err/s: 0.00 reconn/s: 0.00

[ 30s ] thds: 1000 tps: 1431.91 qps: 29082.72 (r/w/o: 20446.09/1489.81/7146.83) lat (ms,95%): 1352.03 err/s: 0.40 reconn/s: 0.00

[ 40s ] thds: 1000 tps: 1462.60 qps: 28918.88 (r/w/o: 20289.35/1460.90/7168.62) lat (ms,95%): 1069.86 err/s: 0.40 reconn/s: 0.00

[ 50s ] thds: 1000 tps: 1476.37 qps: 29268.18 (r/w/o: 20517.94/1519.07/7231.18) lat (ms,95%): 1280.93 err/s: 0.10 reconn/s: 0.00

[ 60s ] thds: 1000 tps: 1379.99 qps: 28016.72 (r/w/o: 19597.00/1434.79/6984.93) lat (ms,95%): 1129.24 err/s: 0.60 reconn/s: 0.00

[ 70s ] thds: 1000 tps: 1306.34 qps: 26260.07 (r/w/o: 18351.61/1407.05/6501.42) lat (ms,95%): 1304.21 err/s: 0.20 reconn/s: 0.00

[ 80s ] thds: 1000 tps: 1446.27 qps: 28746.56 (r/w/o: 20068.85/1501.87/7175.84) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00

[ 90s ] thds: 1000 tps: 1446.38 qps: 28312.79 (r/w/o: 19790.51/1464.88/7057.40) lat (ms,95%): 1280.93 err/s: 0.20 reconn/s: 0.00

[ 100s ] thds: 1000 tps: 1417.44 qps: 28998.53 (r/w/o: 20456.77/1460.75/7081.02) lat (ms,95%): 1149.76 err/s: 0.20 reconn/s: 0.00

[ 110s ] thds: 1000 tps: 1382.30 qps: 27535.11 (r/w/o: 19283.61/1438.40/6813.10) lat (ms,95%): 1235.62 err/s: 0.30 reconn/s: 0.00

[ 120s ] thds: 1000 tps: 1289.90 qps: 26372.00 (r/w/o: 18298.07/1436.11/6637.82) lat (ms,95%): 1506.29 err/s: 0.20 reconn/s: 0.00

SQL statistics:

   queries performed:

       read:                            2383220

       write:                           176669

       other:                           844659

       total:                           3404548

   transactions:                        170204 (1414.74 per sec.)

   queries:                             3404548 (28298.62 per sec.)

   ignored errors:                      26     (0.22 per sec.)

   reconnects:                          0      (0.00 per sec.)


General statistics:

   total time:                          120.3062s

   total number of events:              170204


Latency (ms):

        min:                                   24.68

        avg:                                  705.94

        max:                                12128.26

        95th percentile:                     1280.93

        sum:                            120153905.97


Threads fairness:

   events (avg/stddev):           170.2040/19.11

   execution time (avg/stddev):   120.1539/0.04



经过测试,可以看到,Multi-AZ整体性能,较单节点的Mysql性能损耗,在10%左右。为了安全,这点性能损耗,还是值得的。




向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI