• 欢迎访问VPS岛网站,国外VPS,国内VPS,国外服务器,国内服务器,服务器主机,测评及优惠码,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群

mysqlslap压力测试mysql

mysql技术 juggles 88次浏览 已收录 0个评论

简介

mysqlslap是mysql官方的压力测试工具
无需另外安装,mysql自带

官方参考文档:https://dev.mysql.com/doc/refman/5.7/en/mysqlslap.html#option_mysqlslap_debug-info

Create schema, table, and optionally any stored programs or data to use for the test. This stage uses a single client connection.
Run the load test. This stage can use many client connections.
Clean up (disconnect, drop table if specified). This stage uses a single client connection.

测试

示例1

查询300次,并发数50
mysqlslap -a -concurrency=50 –number-of-queries 300 -hlocalhost -uroot -proot

Benchmark
    Average number of seconds to run all queries: 19.286 seconds
    Minimum number of seconds to run all queries: 19.286 seconds
    Maximum number of seconds to run all queries: 19.286 seconds
    Number of clients running queries: 1
    Average number of queries per client: 300

Benchmark
    Average number of seconds to run all queries: 16.868 seconds
    Minimum number of seconds to run all queries: 16.868 seconds
    Maximum number of seconds to run all queries: 16.868 seconds
    Number of clients running queries: 2
    Average number of queries per client: 150

Benchmark
    Average number of seconds to run all queries: 13.614 seconds
    Minimum number of seconds to run all queries: 13.614 seconds
    Maximum number of seconds to run all queries: 13.614 seconds
    Number of clients running queries: 3
    Average number of queries per client: 100

VPS岛 的文章和资源来自互联网,仅作为参考资料,如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。丨 转载请注明mysqlslap压力测试mysql
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址