美文网首页
Mysql性能优化-12.mysqlslap压力测试工具

Mysql性能优化-12.mysqlslap压力测试工具

作者: 笨鸡 | 来源:发表于2019-06-03 22:38 被阅读0次

服务器的测试工具
直接在CMD运行即可:
基础语法就是:mysqlslap选项
典型的测试选项如下:

C:\Users\Jay>mysqlslap --help
mysqlslap  Ver 1.0 Distrib 5.7.21, for Win64 (x86_64)
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Run a query multiple times against the server.

Usage: mysqlslap [OPTIONS]

1.自动生成SQL测试

C:\Users\Jay>mysqlslap --auto-generate-sql -u root -p
Enter password: **********
Benchmark
        Average number of seconds to run all queries: 0.016 seconds
        Minimum number of seconds to run all queries: 0.016 seconds
        Maximum number of seconds to run all queries: 0.016 seconds
        Number of clients running queries: 1
        Average number of queries per client: 0

2.并发测试

C:\Users\Jay>mysqlslap --auto-generate-sql --concurrency=100 -u root -p
Enter password: **********
Benchmark
        Average number of seconds to run all queries: 0.265 seconds
        Minimum number of seconds to run all queries: 0.265 seconds
        Maximum number of seconds to run all queries: 0.265 seconds
        Number of clients running queries: 100
        Average number of queries per client: 0

3.多轮测试

C:\Users\Jay>mysqlslap --auto-generate-sql --concurrency=400 --iterations=10 -u root -p
Enter password: **********
Benchmark
        Average number of seconds to run all queries: 2.793 seconds
        Minimum number of seconds to run all queries: 2.375 seconds
        Maximum number of seconds to run all queries: 3.438 seconds
        Number of clients running queries: 400
        Average number of queries per client: 0

4.存储引擎测试

C:\Users\Jay>mysqlslap --auto-generate-sql --concurrency=400 --iterations=3 --engine=myisam -u root -p
Enter password: **********
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 2.135 seconds
        Minimum number of seconds to run all queries: 2.094 seconds
        Maximum number of seconds to run all queries: 2.172 seconds
        Number of clients running queries: 400
        Average number of queries per client: 0

C:\Users\Jay>mysqlslap --auto-generate-sql --concurrency=400 --iterations=3 --engine=innodb -u root -p
Enter password: **********
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 3.120 seconds
        Minimum number of seconds to run all queries: 2.328 seconds
        Maximum number of seconds to run all queries: 3.610 seconds
        Number of clients running queries: 400
        Average number of queries per client: 0

相关文章

  • Mysql性能优化-12.mysqlslap压力测试工具

    服务器的测试工具直接在CMD运行即可:基础语法就是:mysqlslap选项典型的测试选项如下: 1.自动生成SQL...

  • Nginx-性能优化-ab压力测试工具

    章节目录 nginx 性能优化的点 当前系统性能的评估 ab 压力测试工具使用 1.nginx 性能优化的点 当前...

  • Mysql之MySQLlap性能测试工具

    MySQL基准性能压力测试工具之MySQLlap(MySQL自带) - 小张个人博客不忘初心-分享Web技术的个人...

  • 基准测试(一)

    mysql性能测试。 一、mysqlslap mysqlslap是mysql自带的性能测试工具。 mysqlsla...

  • Spark 性能优化方案

    Spark 性能优化方案(转自李智慧的Spark性能优化方案): Spark性能测试工具 •Spark性能测试基准...

  • 压力测试工具 Mysqlslap

    一、MySQL自带的压力测试工具 Mysqlslap mysqlslap是mysql自带的基准测试工具,该工具查询...

  • Redis_测试性能

    redis-benchmark是一个压力测试工具,官方自带的性能测试工具!redis性能测试工具可选参数如下所示:...

  • apache压力测试

    ab压力测试工具 ab命令详解 ab压力测试 一、ab命令 ab工具 Apache服务器的性能测试工具,它可以测试...

  • 10 MySQL 参数优化

    MySQL 性能优化 [TOC] MySQL 工作原理 MySQL 体系结构 管理工具 MySQL服务软件安装后提...

  • MySQL相关文章索引(2)

    1.MySQL性能优化 对MySQL语句的性能分析与优化 Mysql 监控 Innodb 阻塞状况 MySQL索引...

网友评论

      本文标题:Mysql性能优化-12.mysqlslap压力测试工具

      本文链接:https://www.haomeiwen.com/subject/nfwhxctx.html