下载DBT2 Benchmark,编译安装,按照README-MYSQL中的步骤来操作。报告的时间是客户端的经过时间,不是在服务器端的CPU时间。执行BENCHMARK()若干次可能是明智的,并且注意服务器机器的负载有多重来解释结果。需要由aclocal、autoheader、autoconf、automake,以及mysql、mysql-libs、mysql-devel。

$ ./congigure --with-mysql

$ make

$ sudo make install

安装好datagen,然后生成数据,需要先创建对应的目录如/tmp/dbt2-w3。

$ datagen -w 3 -d /tmp/dbt2-w3 --mysql

warehouses = 3

first warehouse = 1

districts = 10

customers = 3000

items = 100000

orders = 3000

stock = 100000

new_orders = 900

生成完数据后就可以执行scripts/mysql/mysql_load_db.sh脚本将数据导入到数据库中。

benchmark 使用方法:

这里还有一种方法能够获取到 mysql 执行一个sql 语句或sql 表达式的 时间,并且可以由用户指定执行次数。通过执行大规模次数, 才能够获得比较稳定的 sql 执行时间。

select benchmark(num, exp) ; 其中 num 为执行次数,exp 为希望获得执行时间的表达式 ,不包括 sql 语句

select benchmark(1, to_days(2011-04-07) - to_days(now()) <1 ); 执行时间大概是 0.0011秒 ,可以计算表达式时间

select benchmark(1, select * from MYTABLE limit 0,40 ); Mysql 报错,说明EXP 不能为sql 语句,只能为表达式或函数

下面是对num 赋予不同的数值,查看执行不同次数所耗费的时间

select benchmark(100, to_days(2011-04-07) - to_days(now()) <1 ); 执行时间大概也是 0.0012秒

select benchmark(10000, to_days(2011-04-07) - to_days(now()) <1 ); 执行时间大概也是 0.0056秒

select benchmark(1000000, to_days(2011-04-07) - to_days(now()) <1 ); 执行时间大概也是 0.4454秒

为什么执行100次和执行 1次的时间耗费差不多呢? 这是因为可能被注入了缓存的缘故,因此benchmark 不能用来完成一种实际的 基准测试。

英文介绍:

The DBT2 Benchmark Tool can be used to run automated benchmarks for MySQL and MySQL Cluster. It supports three types of benchmarks:

DBT2

SysBench

flexAsynch

It has been primarily used on Linux x86_64 platforms, but occasional benchmarks have also been run on Solaris and Windows. It can be used to test MySQL based on MySQL 5.6 and MySQL 5.7 Releases (older versions might work as well but isn't maintained any more).

DBT2 is an open source benchmark that mimics an OLTP application for a company owning large amounts of warehouses. It contains transactions to handle New Orders, Order Entry, Order Status, Payment and Stock handling. The transactions are a mix of read and write transactions. Using MySQL the benchmark tests a single MySQL Server instance. Using MySQL Cluster the benchmark tool can drive large distributed tests with many MySQL Cluster Data nodes and MySQL Server instances. The DBT2 Benchmark Tool provides scripts to automate execution of these benchmarks.

The DBT2 tarball also contains a benchmark tool using PowerShell on Windows to run sysbench on Windows. There is also scripts mimicing top on Windows. Finally there is also a set of simple scripts to use the perf tool on Linux.

FlexAsynch is a benchmark specifically developed to test scalability of MySQL Cluster. It is found in any MySQL Cluster source tarball under storage/ndb/test/ndbapi. The features required to run it in this parallel manner requires a MySQL Cluster 7.x version released after the 15th of October 2011. The DBT2 Benchmark Tool can be used to run distributed tests with many MySQL Cluster Data nodes and many flexAsynch benchmark programs in a completely automated fashion. The latest version of flexAsynch mainly exists in the source tree for the 2 most recent versions.

MySQL Server Version: 5.6 and later

MySQL Cluster Version: MySQL Cluster 7.3 and later

dbt2 mysql_DBT2 Benchmark Tool (mysql压力测试工具) V0.37.50.14相关推荐

  1. linux mysql 测试工具_LINUX系统下MySQL 压力测试工具super smack

    LINUX系统下MySQL 压力测试工具super smack 发布时间:2008-09-08 17:03:39   作者:佚名   我要评论 1. 源文件下载地址:http://vegan.net/ ...

  2. mysql压力测试教程_Mysqlslap MySQL压力测试工具 简单教程

    MySQL从5.1.4版开始带有一个压力测试工具mysqlslap,通过模拟多个并发客户端访问mysql来执行测试,使用起来非常的简单.通过mysqlslap –help可以获得可用的选项,这里列一些 ...

  3. mysql压力测试工具Mysqlslap

    mysql 性能测试工具:The MySQL Benchmark Suite(不支持多CPU而且不是压力工具) 压力测试工具: MySQL super-smack:需要找能连接外网的机器,能连接外网的 ...

  4. MYSQL压力测试工具

    一.官方自带mysqlslap MySQL从5.1.4版开始带有一个压力测试工具mysqlslap,通过模拟多个并发客户端访问mysql来执行测试.      常用参数说明:   --auto-gen ...

  5. (转)MySQL自带的性能压力测试工具mysqlslap详解

    mysqlslap 是 Mysql 自带的压力测试工具,可以模拟出大量客户端同时操作数据库的情况,通过结果信息来了解数据库的性能状况 mysqlslap 的一个主要工作场景就是对数据库服务器做基准测试 ...

  6. php mysql 性能测试工具下载_MySQL压力测试工具_MySQL

    bitsCN.com MySQL压力测试工具 mysqlslap --create-schema=example --query="SELECT * FROM group_message f ...

  7. mysql 压力测试知乎_MySQL查看SQL语句执行效率和mysql几种性能测试的工具

    网络中整理,记录下,朋友们应该用得到! Explain命令在解决数据库性能上是第一推荐使用命令,大部分的性能问题可以通过此命令来简单的解决,Explain可以用来查看 SQL 语句的执行效 果,可以帮 ...

  8. MySQL数据库自带基准压力测试工具MySQLSlap使用探索

    一.介绍 mysqlslap是MySQL5.1.4之后自带的benchmark基准测试工具,可以生成schema,装载数据,执行benckmark和查询数据,语法简单,灵活,容易使用. 该工具可以模拟 ...

  9. mysql 工具_MySQL压力测试工具,值得收藏

    一.MySQL自带的压力测试工具--Mysqlslap mysqlslap是mysql自带的基准测试工具,该工具查询数据,语法简单,灵活容易使用.该工具可以模拟多个客户端同时并发的向服务器发出查询更新 ...

  10. mysql压力写入测试_mysql压力测试工具

    相关推荐:测试工具 测试工具 测试管理工具                          Quality Center 基于WEB的测试管理工具 Test  Director 功能测试工具     ...

最新文章

  1. Solr部署如何启动
  2. 连接函数vc++笔记---CDatabase类
  3. 基于element-ui实现table可配置化
  4. glue与clue的意思
  5. jsf 开发_JSF开发人员应该知道的5种有用方法
  6. CentOS查看每个进程的网络流量
  7. C和指针---第八章:数组
  8. (90)AXI突发式读写时序和过程
  9. bz2解压命令_tar 命令
  10. HDU2072 单词数(解法二)【废除!!!】
  11. 北京住房仰视链,你在第几层?
  12. 深入浅出MVC框架模式
  13. AIML应答机器人(二)java实现
  14. Flash CS3无法导出测试影片问题解决
  15. 内蒙古自治区呼伦贝尔市谷歌高清卫星地图下载
  16. 什么是爬虫-Java网络爬虫系统性学习与实战(2)
  17. 浅析WIN8打开图片或PDF时提示在禁用UAC的问题
  18. pyqt 取鼠标处文字_侧裙可拆按键随心装,黑爵GTi模块化游戏鼠标评测
  19. 基于stm32单片机的台历日历计时器万年历Proteus仿真(源码+仿真+全套资料)
  20. 新手小白,做这几个短视频自媒体平台,有播放量就有收益

热门文章

  1. 多测师_swipe 滑动操作
  2. 百度脑图打开本地xmind文件的方式
  3. linux中竖线'|',双竖线‘||’,和的意思
  4. 2021-12-21 理解JS中的shim / polyfill / 垫片概念
  5. 曾经的这家煎饼是怎么走红的?
  6. 微信跳跳代码php执行,微信跳一跳,能够直接运行的脚本
  7. 第一(关于list及dict)
  8. 信息系统项目管理师(2022年) —— 第 3 章 项目立项管理
  9. 新手建网站的步骤及注意事项
  10. python招聘杭州拉勾网_Python3获取拉勾网招聘信息