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 -- ...
随机推荐
- python27期day06:小数据池、深浅拷贝、集合、作业题。
0.pycharm是代码块.黑窗口是小数据池.如下图: 1.驻留机制(长得像的共用一个内存地址)分小数据池缓存机制:后期开发时能明确知道.为什么不能正常使用.把经常用的东西放入规则(黑窗口)里. 数字 ...
- 【Spring IoC】依赖注入DI(四)
平常的Java开发中,程序员在某个类中需要依赖其它类的方法.通常是new一个依赖类再调用类实例的方法,这种开发存在的问题是new的类实例不好统一管理. Spring提出了依赖注入的思想,即依赖类不由程 ...
- JDOJ 1770 埃及分数
JDOJ 1770: 埃及分数 https://neooj.com/oldoj/problem.php?id=1770 Description 分子均为1的分数叫做埃及分数,因为古代埃及人在进行分数运 ...
- NOIP 2003 神经网络
洛谷 P1038 神经网络 https://www.luogu.org/problemnew/show/P1038 JDOJ 1278: [NOIP2003]神经网络 T1 https://neooj ...
- Linux学习笔记-第7天 - 编程还是要多写多练
编程思路很重要,多写是要熟悉命令用法,多练不只是要熟悉语句常用在什么环境,更要在其基础上,尝试更多的写法.
- SAP_B1系统对象说明 SBO SAP Business One
- Nginx主配置文件说明
#运行用户 user nobody; #启动进程,通常设置成和cpu的数量相等 worker_processes ; #全局错误日志及PID文件 #error_log logs/error.log; ...
- Newcoder 小白月赛20 H 好点
Newcoder 小白月赛20 H 好点 自我感觉不错然后就拿出来了. 读读题之后我们会发现这是让我们求一堆数,然后这些数一定是递减的. 就像这样我们选的就是框起来的,然后我们可以看出来这一定是一个单 ...
- Git分支的介绍及Gitlab的部署
Git分支介绍几乎所有的版本控制系统都以某种形式支持分支. 使用分支意味着你可以把你的工作从开发主线上分离开来,以免影响开发主线.Git 处理分支的方式可谓是难以置信的轻量,创建新分支这一操作几乎能在 ...
- vue中子组件的methods中获取到props中的值
这个官网很清楚,也很简单,父组件中使用v-bind绑定传送,子组件使用props接收即可 例如: 父组件中 <template> <div> <head-top>& ...