polarDB和DRDS压力测试

测试工具:

Sysbench

 

测试对象:

阿里云DRDS816G)和PolarDB24G

 

测试方法:

Sysbench脚本压力测试。

数据规模为10个表,每个表1000万行数据。

 

数据:

256线程1小时压测

 

DRDS

PolarDB

CPU

1c

12c

1c-公网

12c-公网

时长()

3600

3600

3600

3600

读次数

17697400

17520090

4996670

5362448

写次数

5056400

5005740

1427620

1532128

其他次数

2528200

2502870

713810

766064

总次数

25282000

25028700

7138100

7660640

事务数

1264100

1251435

356905

383032

TPS

351.07

347.57

99.09

106.34

最大延迟(毫秒)

1889.96

1898.58

19711.29

12999.64

最小延迟

251.02

204.39

759.54

678.3

平均延迟

729.12

736.51

2582.79

2406.57

95%百分比取值

943.16

960.30

3773.42

3386.99

 

 

 

 

 

 

 

256线程2小时压测

 

DRDS

PolarDB

CPU

1c

12c

1c-公网

12c-公网

时长()

7200

7200

7200

7200

读次数

34661564

35602952

9333590

10897208

写次数

9903304

10172272

2666740

3113488

其他次数

4951652

5086136

1333370

1556744

总次数

49516520

50861360

13333700

15567440

事务数

2475826

2543068

666685

778372

TPS

343.84

353.18

92.57

108.08

最大延迟

5311.81

2217.48

33797.58

13401.63

最小延迟

119.50

238.49

698.30

811.58

平均延迟

744.51

724.83

2765.13

2368.29

95%百分比取值

960.30

943.16

4128.91

3326.55

 

 

 

 

 

 

 



 


 

考虑到网络环境的延迟,修改网络环境同为华北2后进行压测:

256线程1小时压测

 

DRDS

PolarDB

CPU

1c

12c

12c-公网

12c-内网

时长()

3600

3600

3600

3600

读次数

17697400

17520090

5362448

11726722

写次数

5056400

5005740

1532128

3350492

其他次数

2528200

2502870

766064

1675246

总次数

25282000

25028700

7660640

16752460

事务数

1264100

1251435

383032

837623

TPS

351.07

347.57

106.34

232.61

最大延迟(毫秒)

1889.96

1898.58

12999.64

28001.15

最小延迟

251.02

204.39

678.3

24.33

平均延迟

729.12

736.51

2406.57

1100.39

95%百分比取值

943.16

960.30

3386.99

3095.38

 

 

 

 

 

 

 

256线程2小时压测

 

DRDS

PolarDB

CPU

1c

12c

12c-公网

12c-内网

时长()

7200

7200

7200

7200

读次数

34661564

35602952

10897208

24875368

写次数

9903304

10172272

3113488

7107248

其他次数

4951652

5086136

1556744

3553624

总次数

49516520

50861360

15567440

35536240

事务数

2475826

2543068

778372

1776812

TPS

343.84

353.18

108.08

246.75

最大延迟

5311.81

2217.48

13401.63

17399.29

最小延迟

119.50

238.49

811.58

23.46

平均延迟

744.51

724.83

2368.29

1037.43

95%百分比取值

960.30

943.16

3326.55

2985.89

 

 

 

 

 

 




 

结论:

数据显示两个实例的DRDS的效果优于一主一从polarDB。通过内网访问可以大幅度提高polarDB的表现,但是在多项观测值上表现仍然不及DRDS

 

不足

没有观测CPU性能。

没有考虑join操作。

实验样本较少。

没有考虑低数据量下的表现。

配置上DRDS优于PolarDB

 

参考:

https://yq.aliyun.com/articles/27835?spm=5176.10695662.1996646101.searchclickresult.570016a36w3zBS

 

https://blog.csdn.net/oahz4699092zhao/article/details/53332105

 

 

脚本:

 

#/bin/sh
#/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua
path=/opt/dev/sysbench
post_fix=`date +"%Y%m%d%H%M"`
threads=256
core=12c
total_time=120
db=polardb
db_host=polardb.rds.aliyuncs.com
db_port=3306
db_usr=sbtest
db_password=password
tb_size=10000000

log_name=${path}/log/sysbench_${core}_${db}_${threads}_${total_time}_${post_fix}.log

echo ${log_name} START `date +"%Y-%m-%d %H:%M:%S"`

#prepare
#sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --db-driver=mysql --mysql-host=${db_host} --mysql-port=${db_port} --mysql-user=${db_usr} --mysql-password=${db_password} --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=${tb_size} --threads=${threads} --time=120 --report-interval=10 prepare

#process
sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --db-driver=mysql --mysql-host=${db_host} --mysql-port=${db_port} --mysql-user=${db_usr} --mysql-password=${db_password} --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=${tb_size} --threads=${threads} --time=${total_time} --report-interval=60 run > ${log_name}

#cleanup
#sysbench  /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --db-driver=mysql --mysql-host=${db_host} --mysql-port=${db_port} --mysql-user=${db_usr} --mysql-password=${db_password} --oltp-tables-count=10  cleanup


echo ${log_name} END `date +"%Y-%m-%d %H:%M:%S"`

  

 

猜你喜欢

转载自aeolus1983.iteye.com/blog/2426170