对Mysql和应用微服务做TPS压力测试

1.对Mysql

使用工具:mysqlslap工具

使用命令:

mysqlslap -uroot pGG8697000!@#--auto generate sql -auto generate sql-load typemixed-concurrency=100,200 - number of queries=1000-iterations=10 - number-int-cols=7 - number-charcols=13auto generate sql add autoincrement

对命令行的诠释:

  • 连接MySQL的用户名为root
  • 生成自动SQL语句
  • 使用混合类型的负载进行测试
  • 设定并发数为100到200
  • 每次执行1000个查询
  • 迭代10次
  • 整数列的数量为7
  • 字符列的数量为13
  • 使用自增字段

执行结果如下:

对Mysql和应用微服务做TPS压力测试_第1张图片

对结果的诠释:

  • 所有查询平均运行时间为0.387秒
  • 最短的运行时间为0.078秒
  • 最长的运行时间为1.110秒
  • 客户端数量为100
  • 平均每个客户端运行10次查询

2.对应用微服务

使用工具:Apache JMeter

你可能感兴趣的:(mysql,压力测试,数据库)