达梦sysbench OLTP测试及数据库运维Linux常用指令汇总

学习内容关键字:

达梦sysbench OLTP测试,Linux常用指令,总结3-4月踩的坑

1.达梦sysbench OLTP测试
测试环境的软硬件规格

1.1 达梦数据库版本

实例初始化参数./dminit PAGE_CHECK=0 PAGE_SIZE=8 EXTEND_SIZE=16 LOG_SIZE=10240 CASE_SENSITIVE=0 CHARSET=1;

1.2 测试机器

OS

Linux

x86_64

cpus

disks

NVME磁盘

1.3 Sysbench

1.3.1使用版本

sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

1.3.2 使用脚本

sysbench0.5之后通过一系列lua脚本替换之前的oltp,以模拟更接近真实的基准测试环境,本次测试脚本包含read_write.lua 、read_only.lua、write_only.lua

oltp_read_write:测试读写场景性能,SQL事物包括点查、范围查询、聚合函数查询、排序查询、distinct查询、更新索引列、更新非索引列、插入、删除;

oltp_wite_only:测试只写场景性能,SQL事物有更新索引列、更新非索引列、插入、删除

1.4 nmon

1.4.1使用版本

使用nmon_linux_x86_64版本,监控并采集机器CPU、内存、磁盘IO和网络等指标

1.4.2数据采集方式

数据采集指令./nmon_linux_x86_64 -c 60 -s 10 –f,间隔10秒采集60次数据,总用时10分钟,导出到Excel表格

压力测试模型

数据模型

数据源

测试项目

table数量

行数(row)

总用时(s)

随机生成

只写

250

25000

600

随机生成

读写

25

250000

600

压力测试

插入数据

./sysbench oltp_read_write.lua --tables=250 --table-size=25000 --db-driver=dm --dm-db=192.168.100. --dm-user=SYSDBA --dm-password=SYSDBA --auto-inc=1 --threads=256 --time=600 --report-interval=10 prepare

oltp_read_write

./sysbench oltp_read_write.lua --tables=25 --table-size=250000 --db-driver=dm --dm-db=192.168.100. --dm-user=SYSDBA --dm-password=SYSDBA --auto-inc=1 --threads=256 --time=600 --report-interval=10 run

oltp_write_only

./sysbench oltp_write_only.lua --tables=250 --table-size=25000 --db-driver=dm --dm-db=192.168.100. --dm-user=SYSDBA --dm-password=SYSDBA --auto-inc=1 --threads=256 --time=600 --report-interval=10 run

清理数据

./sysbench oltp_read_write.lua --tables=250 --table-size=25000 --db-driver=dm --dm-db=192.168.100. --dm-user=SYSDBA --dm-password=SYSDBA --auto-inc=1 --threads=256 --time=600 --report-interval=10 cleanup

测试结果

为了更全面的体现服务器在不同连接数下的表现,逐步增加客户端并发量,分别设置为64、256、512,对比较重要的信息包括tps(每秒事务处理数)、qps(每秒查询数)、Latency-95th percentile(95%sql执行的平均响应时间)、cpu使用率、磁盘读写速率及IO情况等进行记录

并发参数设置 --threads = 64  测试时间 --time=600

sysbench输出结果

thds:64

queries performed:

tps

qps

err/s

reconn/s

95th percentile

read

write

other

read_write

101976521

25030514

142016885

44816.86

896337.13

0

0

1.86

write_only

0

120084392

487968118

168894.91

1013369.46

0

0

0.54

nmon抓取CPU占用率(Avg)

User%

Sys%

Wait%

Idle%

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值