最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

mysql性能测试工具之sysbench

来源:动视网 责编:小采 时间:2020-11-09 12:40:24
文档

mysql性能测试工具之sysbench

mysql性能测试工具之sysbench:sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况,主要测试以下几种:(1).cpu性能(2).磁盘io性能(3). sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数
推荐度:
导读mysql性能测试工具之sysbench:sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况,主要测试以下几种:(1).cpu性能(2).磁盘io性能(3). sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数


sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况,主要测试以下几种:(1).cpu性能(2).磁盘io性能(3).

sysbench是一个模块化的、跨平台、多线程基准测试工具,,主要用于评估测试各种不同系统参数 下的数据库负载情况,主要测试以下几种:

(1).cpu性能

(2).磁盘io性能

(3).调度程序性能

(4).内存分配及传输速度

(5).POSIX线程性能

(6).数据库性能(OLTP基准测试)

1.下载和安装sysbench工具

[root@centos179min home]# wget

[root@centos179min home]# cd sysbench-0.4.10

[root@centos179min sysbench-0.4.10]# ./configure --help | grep mysql --自己仔细查看安装帮助
--with-mysql compile with MySQL support (default is enabled)
--with-mysql-includes path to MySQL header files
--with-mysql-libs path to MySQL libraries
Report bugs to alexeyk@mysql.com.

[root@centos179min sysbench-0.4.10]# ./configure --prefix=/usr/local/sysbench-0.4.10 --with-mysql --with-mysql-includes=/usr/local/mysql-5.7.4-m14-linux/include/ --with-mysql-libs=/usr/local/mysql-5.7.4-m14-linux/lib/

[root@centos179min sysbench-0.4.10]# make --这时如果以下错误

drv_mysql.c: In function 'mysql_drv_store_results':
drv_mysql.c:784: error: 'MYSQL' undeclared (first use in this function)
drv_mysql.c:784: error: 'con' undeclared (first use in this function)
drv_mysql.c:785: error: 'MYSQL_RES' undeclared (first use in this function)
drv_mysql.c:785: error: 'res' undeclared (first use in this function)
drv_mysql.c:786: error: 'MYSQL_ROW' undeclared (first use in this function)
drv_mysql.c:786: error: expected ';' before 'row'
drv_mysql.c:834: error: 'ER_LOCK_DEADLOCK' undeclared (first use in this function)
drv_mysql.c:834: error: 'ER_LOCK_WAIT_TIMEOUT' undeclared (first use in this function)
drv_mysql.c:850: error: 'row' undeclared (first use in this function)
drv_mysql.c: In function 'mysql_drv_free_results':
drv_mysql.c:874: error: 'MYSQL_RES' undeclared (first use in this function)
drv_mysql.c:874: error: expected expression before ')' token
make[3]: *** [libsbmysql_a-drv_mysql.o] Error 1
make[3]: Leaving directory `/home/sysbench-0.4.10/sysbench/drivers/mysql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sysbench-0.4.10/sysbench/drivers'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sysbench-0.4.10/sysbench'
make: *** [all-recursive] Error 1

[root@centos179min sysbench-0.4.10]# yum install mysql-devel --解决方法,安装mysql-devel开发包

[root@centos179min sysbench-0.4.10]# rpm -ql mysql-devel | grep include --查看开发包的路径

[root@centos179min sysbench-0.4.10]# ./configure --prefix=/usr/local/sysbench-0.4.10 --with-mysql --with-mysql-includes=/usr/include/mysql/ --with-mysql-libs=/usr/local/mysql-5.7.4-m14-linux/lib/mysql

[root@centos179min sysbench-0.4.10]# make --这时如果再有以下错误

../libtool: line 841: X--tag=CC: command not found
../libtool: line 874: libtool: ignoring unknown tag : command not found
../libtool: line 841: X--mode=link: command not found
../libtool: line 1007: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1008: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 2234: X-g: command not found
../libtool: line 2234: X-O2: command not found
../libtool: line 1954: X-L/usr/local/mysql-5.7.4-m14-linux/lib/mysql: No such file or directory
../libtool: line 2403: Xsysbench: command not found
../libtool: line 2408: X: command not found
../libtool: line 2415: Xsysbench: command not found
../libtool: line 2550: X-lmysqlclient_r: command not found
../libtool: line 2550: X-lrt: command not found
../libtool: line 2550: X-lm: command not found
../libtool: line 2632: X-L/home/sysbench-0.4.10/sysbench: No such file or directory
../libtool: line 2550: X-lmysqlclient_r: command not found
../libtool: line 2550: X-lrt: command not found
../libtool: line 2550: X-lm: command not found
../libtool: line 2632: X-L/home/sysbench-0.4.10/sysbench: No such file or directory

[root@centos179min sysbench-0.4.10]# vim libtool --解决方法(将libtool文件中的"ECHO="改为"echo=")

ECHO="echo" 修改为 echo="echo"

[root@centos179min sysbench-0.4.10]# make --此时不会再有错误了

[root@centos179min sysbench-0.4.10]# make install

[root@centos179min sysbench-0.4.10]# echo $? --检查是否安装成功
0

[root@centos179min sysbench-0.4.10]# ll /usr/local/sysbench-0.4.10/bin/
total 288
-rwxr-xr-x. 1 root root 2939 Oct 8 20:00 sysbench
[root@centos179min sysbench-0.4.10]#

2.测试CPU的性能

文档

mysql性能测试工具之sysbench

mysql性能测试工具之sysbench:sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况,主要测试以下几种:(1).cpu性能(2).磁盘io性能(3). sysbench是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数
推荐度:
标签: 工具 测试 mysql
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top