Sysbench测试指南 V1 测试步骤 1. 使用sysbench命令压入测试数据到数据库中。 plaintext sysbench mysqlhost mysqlport mysqluser mysqlpassword mysqldb mysqltableengineinnodb mysqlignoreerrors1062,1213,1205,1020 oltptablescount10 oltptablesize5000000 dbdrivermysql time120 reportinterval10 oltpcreatesecondary'off' oltpautoinc'on' oltptestmodecomplex randiniton randtypeuniform insert.lua threads64 prepare 说明: 需要注释掉common.lua脚本中的dbquery(query)这一行。 2. 使用sysbench命令执行压测。 plaintext sysbench mysqlhost mysqlport mysqluser mysqlpassword mysqldb mysqltableengineinnodb mysqlignoreerrors1062,1213,1205,1020 oltptablescount10 oltptablesize5000000 dbdrivermysql time120 reportinterval10 oltpcreatesecondary'off' oltpautoinc'on' oltptestmodecomplex randiniton randtypeuniform insert.lua threads64 run 3. 使用sysbench命令清理数据。 plaintext sysbench mysqlhost mysqlport mysqluser mysqlpassword mysqldb mysqltableengineinnodb mysqlignoreerrors1062,1213,1205,1020 oltptablescount10 oltptablesize5000000 dbdrivermysql time120 reportinterval10 oltpcreatesecondary'off' oltpautoinc'on' oltptestmodecomplex randiniton randtypeuniform insert.lua threads64 cleanup 测试结果 测试规格 并发数 TPS QPS 基础版12C24G 64 2239 44798 基础版12C24G 1024 3289 65785 中级版24C48G 64 2754 55093 中级版24C48G 1024 3438 68762 高级版48C96G 64 3186 63739 高级版48C96G 1024 4615 92318 注意 DRDS的内核有一定的过载保护能力,发生过载保护时压测结果可能会出现抖动,此时系统性能已经达到瓶颈,继续加压测试结果也无法得到明显提升。建议尝试降低压力,来获得更高的性能测试结果。