MYSQL性能测试工具SYSBENCH
[root@localhost ~]$ wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"
--2019-04-25 15:49:16-- https://github.com/akopytov/sysbench/archive/1.0.zip
Resolving github.com (github.com)... 13.229.188.59, 52.74.223.119, 13.250.177.223
Connecting to github.com (github.com)|13.229.188.59|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/akopytov/sysbench/zip/1.0 [following]
--2019-04-25 15:49:17-- https://codeload.github.com/akopytov/sysbench/zip/1.0
Resolving codeload.github.com (codeload.github.com)... 54.251.140.56, 13.250.162.133, 13.229.189.0
Connecting to codeload.github.com (codeload.github.com)|54.251.140.56|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘sysbench-1.0.zip’ [ <=> ] 2,291,660 149KB/s in 13s 2019-04-25 15:49:31 (171 KB/s) - ‘sysbench-1.0.zip’ saved [2291660] [root@localhost ~]$ unzip -q sysbench-1.0.zip
[root@localhost ~]$ cd sysbench-1.0
[root@localhost ~/sysbench-1.0]$ yum install automake libtool –y
( many more lines suppressed ) [root@localhost ~/sysbench-1.0]$ ./autogen.sh
./autogen.sh: running `libtoolize --copy --force'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'. ( many more lines suppressed ) src/Makefile.am: installing 'config/depcomp'
parallel-tests: installing 'config/test-driver'
./autogen.sh: running `autoconf'
Libtoolized with: libtoolize (GNU libtool) 2.4.6
Automade with: automake (GNU automake) 1.13.4
Configured with: autoconf (GNU Autoconf) 2.69
[root@localhost ~/sysbench-1.0]$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu ( many more lines suppressed ) Concurrency Kit : bundled
CK_CFLAGS : -I$(abs_top_builddir)/third_party/concurrency_kit/include
CK_LIBS : $(abs_top_builddir)/third_party/concurrency_kit/lib/libck.a
configure flags :
=============================================================================== [root@localhost ~/sysbench-1.0]$ make
Making all in doc
make[1]: Entering directory `/root/sysbench-1.0/doc'
Making all in xsl
make[2]: Entering directory `/root/sysbench-1.0/doc/xsl' ( many more lines suppressed ) make[1]: Entering directory `/root/sysbench-1.0'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/root/sysbench-1.0'
[root@localhost ~/sysbench-1.0]$ make install
Making install in doc
make[1]: Entering directory `/root/sysbench-1.0/doc'
Making install in xsl
make[2]: Entering directory `/root/sysbench-1.0/doc/xsl'
make[3]: Entering directory `/root/sysbench-1.0/doc/xsl' ( many more lines suppressed ) make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/sysbench-1.0'
make[1]: Leaving directory `/root/sysbench-1.0'
[root@localhost ~/sysbench-1.0]$ sysbench --version
sysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory
[root@localhost /usr/local/mysql/lib]$ export LD_LIBRARY_PATH=/usr/local/mysql/lib
[root@localhost /usr/local/mysql/lib]$ sysbench --version
sysbench 1.0.17
[root@localhost /usr/local/mysql/lib]$ cd
[root@localhost ~]$ ls
dbdump.db sysbench-1.0 sysbench-1.0.zip
[root@localhost ~]$ cd sysbench-1.0/
[root@localhost ~/sysbench-1.0]$ mysqladmin create sbtest -uroot -p
Enter password:
[root@localhost ~/sysbench-1.0]$ sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=localhost --mysql-port=3306 --mysql-user=root --mysql-password=mysql --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=100000 --threads=10 --time=120 --report-interval=10 prepare
sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2) Creating table 'sbtest1'...
Inserting 100000 records into 'sbtest1'
Creating secondary indexes on 'sbtest1'...
Creating table 'sbtest2'...
Inserting 100000 records into 'sbtest2'
Creating secondary indexes on 'sbtest2'...
Creating table 'sbtest3'...
Inserting 100000 records into 'sbtest3'
Creating secondary indexes on 'sbtest3'...
Creating table 'sbtest4'...
Inserting 100000 records into 'sbtest4'
Creating secondary indexes on 'sbtest4'...
Creating table 'sbtest5'...
Inserting 100000 records into 'sbtest5'
Creating secondary indexes on 'sbtest5'...
Creating table 'sbtest6'...
Inserting 100000 records into 'sbtest6'
Creating secondary indexes on 'sbtest6'...
Creating table 'sbtest7'...
Inserting 100000 records into 'sbtest7'
Creating secondary indexes on 'sbtest7'...
Creating table 'sbtest8'...
Inserting 100000 records into 'sbtest8'
Creating secondary indexes on 'sbtest8'...
Creating table 'sbtest9'...
Inserting 100000 records into 'sbtest9'
Creating secondary indexes on 'sbtest9'...
Creating table 'sbtest10'...
Inserting 100000 records into 'sbtest10'
Creating secondary indexes on 'sbtest10'...
[root@localhost ~/sysbench-1.0]$ cd
[root@localhost ~]$ touch tmp.log.sysbench
[root@localhost ~]$ ls
dbdump.db sysbench-1.0 sysbench-1.0.zip tmp.log.sysbench
[root@localhost ~]$ cd sysbench-1.0/
[root@localhost ~/sysbench-1.0]$ sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=localhost --mysql-port=3306 --mysql-user=root --mysql-password=mysql --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=100000 --threads=10 --time=120 --report-interval=10 run >> /root/tmp.log.sysbench
[root@localhost ~/sysbench-1.0]$ sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=localhost --mysql-port=3306 --mysql-user=root --mysql-password=mysql cleanup
sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2) Dropping table 'sbtest1'...
[root@localhost ~/sysbench-1.0]$ cd
[root@localhost ~]$ cat tmp.log.sysbench
WARNING: --num-threads is deprecated, use --threads instead
WARNING: --max-time is deprecated, use --time instead
sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2) FATAL: Cannot find benchmark 'oltp': no such built-in test, file or module
sysbench 1.0.17 (using bundled LuaJIT 2.1.0-beta2) Running the test with following options:
Number of threads: 10
Report intermediate results every 10 second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: 10 tps: 601.84 qps: 12049.64 (r/w/o: 8436.69/2408.27/1204.68) lat (ms,95%): 29.72 err/s: 0.10 reconn/s: 0.00
[ 20s ] thds: 10 tps: 710.18 qps: 14200.78 (r/w/o: 9939.40/2841.02/1420.36) lat (ms,95%): 22.69 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 10 tps: 716.51 qps: 14335.45 (r/w/o: 10035.90/2866.53/1433.02) lat (ms,95%): 21.50 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 10 tps: 754.00 qps: 15077.41 (r/w/o: 10554.31/3015.10/1508.00) lat (ms,95%): 20.37 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 10 tps: 700.58 qps: 14010.19 (r/w/o: 9807.18/2801.84/1401.17) lat (ms,95%): 22.69 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 10 tps: 719.10 qps: 14388.35 (r/w/o: 10073.03/2876.91/1438.40) lat (ms,95%): 21.89 err/s: 0.10 reconn/s: 0.00
[ 70s ] thds: 10 tps: 678.72 qps: 13573.33 (r/w/o: 9500.63/2715.27/1357.43) lat (ms,95%): 23.95 err/s: 0.10 reconn/s: 0.00
[ 80s ] thds: 10 tps: 657.61 qps: 13152.83 (r/w/o: 9206.76/2630.75/1315.32) lat (ms,95%): 25.28 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: 10 tps: 664.21 qps: 13289.77 (r/w/o: 9302.32/2659.03/1328.42) lat (ms,95%): 24.83 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: 10 tps: 732.88 qps: 14654.96 (r/w/o: 10259.69/2929.21/1466.06) lat (ms,95%): 20.74 err/s: 0.30 reconn/s: 0.00
[ 110s ] thds: 10 tps: 740.67 qps: 14814.08 (r/w/o: 10370.03/2962.60/1481.45) lat (ms,95%): 20.74 err/s: 0.10 reconn/s: 0.00
[ 120s ] thds: 10 tps: 649.06 qps: 12982.91 (r/w/o: 9088.55/2596.54/1297.82) lat (ms,95%): 26.20 err/s: 0.10 reconn/s: 0.00
SQL statistics:
queries performed:
read: 1165836
write: 333068
other: 166540
total: 1665444
transactions: 83266 (693.79 per sec.)
queries: 1665444 (13876.86 per sec.)
ignored errors: 8 (0.07 per sec.)
reconnects: 0 (0.00 per sec.) General statistics:
total time: 120.0144s
total number of events: 83266 Latency (ms):
min: 3.66
avg: 14.41
max: 118.63
95th percentile: 23.52
sum: 1199489.04 Threads fairness:
events (avg/stddev): 8326.6000/59.57
execution time (avg/stddev): 119.9489/0.01
MYSQL性能测试工具SYSBENCH的更多相关文章
- MySQL性能测试工具sysbench的安装和使用
sysbench是一个开源的.模块化的.跨平台的多线程性能测试工具,可以用来进行CPU.内存.磁盘I/O.线程.数据库的性能测试.目前支持的数据库有MySQL.Oracle和PostgreSQL.当前 ...
- Linux 性能测试工具 sysbench 的安装与简单使用
文章目录 Linux 性能测试工具 sysbench 的安装与简单使用 一 背景 二 实验环境 2.1 操作系统 2.2 其他配 ...
- MySQL性能测试工具之mysqlslap
MySQL性能测试工具之mysqlslap [日期:2014-10-05] 来源:Linux社区 作者:tongcheng [字体:大 中 小] --转自Linux社区:http://www.l ...
- Mysql多线程性能测试工具sysbench 安装、使用和测试
From:http://www.cnblogs.com/zhoujinyi/archive/2013/04/19/3029134.html 摘要: sysbench是一个开源的.模块化的.跨 ...
- 开源多线程性能测试工具-sysbench
导读 sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能测试.数据库目前支持MySQL/Oracle/PostgreSQL.本文主要演示Mysql测试 ...
- MySQL 常用工具sysbench/fio/tpcc等测试
为什么要压力测试采购新设备,评估新设备性能开发新项目,评估数据库容量新系统上线前,预估/模拟数据库负载更换数据库版本,评估性能变化 关注指标 CPU %wait,%user,%sys 内存 只内存读 ...
- MySQL基准测试工具--sysbench
我们需要知道的是sysbench并不是一个压力测试工具,是一个基准测试工具.linux自带的版本比较低,我们需要自己安装sysbench. [root@test2 ~]# sysbench --ver ...
- 安装性能测试工具:sysbench和使用apache的ab
一.软件的用途,它主要包括以下几种方式的测试:1.cpu性能2.磁盘io性能3.调度程序性能4.内存分配及传输速度5.POSIX线程性能6.数据库性能(OLTP基准测试) 这个软件为什么找不到官网呢? ...
- Linux系统性能测试工具sysbench
1.CPU性能测试 sysbench --test=cpu --cpu-max-prime= --num-threads= run 2.内存性能测试 sysbench --test=memory -- ...
随机推荐
- ActionResult源码分析笔记
ActionResult是一个抽象类: public abstract class ActionResult { public abstract void ExecuteResult(Controll ...
- 洛谷 P1919 A*B Problem升级版
妈妈我终于会\(A*B\ problem\)啦~~ 题目大意: 给你两个正整数 \(a,b\),求\(a*b\) 其中\(a,b\le 10^{1000000}\) 我们只要把多项式\(A(x)=\s ...
- 洛谷 P5461 赦免战俘
洛谷 P5461 赦免战俘 传送门 思路 洛谷7月月赛第一题 着实是一道大水题,然后我月赛的时候没做出来...... 就是一道大模拟题呀,直接dfs就好了,我是反着处理的,所以最后要输出\(1-a[i ...
- MySQL实战45讲学习笔记:第二十四讲
一.引子 在前面的文章中,我不止一次地和你提到了 binlog,大家知道 binlog 可以用来归档,也可以用来做主备同步,但它的内容是什么样的呢?为什么备库执行了 binlog 就可以跟主库保持一致 ...
- Sentinel Client: 整合Apollo规则持久化
在前面的学习过程中,Sentinel 的规则,也就是我们之前定义的限流规则,是通过代码的方式定义好的.这是初始化时需要做的事情,Sentinel 提供了基于API的方式修改规则: FlowRuleMa ...
- 公司ES升级带来的坑怎么填?
前言 公司的ES最近需要全部进行升级,目的是方便维护和统一管理.以前的版本不统一,这次准备统一升级到一个固定的版本. 同时还会给ES加上权限控制,虽然都是部署在内网,为了防止误操作,加上权限还是有必要 ...
- java常量池-字符串常量池、class常量池和运行时常量池
原文链接:http://tangxman.github.io/2015/07/27/the-difference-of-java-string-pool/ 在java的内存分配中,经常听到很多关于常量 ...
- SpringCloud Feign 参数问题
今天遇到使用Feign调用微服务,传递参数时遇到几个问题 1.无参数 以GET方式请求 服务提供者 @RequestMapping("/hello") public String ...
- 修咻咻对追光的人、云打印团队的Beta产品测试报告
修咻咻对追光的人.云打印团队的Beta产品测试报告 作业描述 课程 软件工程1916|W(福州大学) 团队名称 修!咻咻! 作业要求 项目Beta冲刺(团队) 团队目标 切实可行的计算机协会维修预约平 ...
- 【C++】如何使用GCC生成动态库和静态库
一.静态库和动态库的定义及区别 程序编译的四个过程: 1.预处理 展开头文件/宏替换/去掉注释/条件编译(.i后缀) 2.编译 检查语法,生成汇编(.s后缀) 3.汇编 汇编代码转换成机 ...