Sysbench for mysql Performance Testing Tool

Source: Internet
Author: User
Sysbench is a modular, cross-platform, multi-thread benchmark testing tool. It is mainly used to evaluate the database load of different system parameters. It mainly tests the following types: (1 ). cpu performance (2 ). disk I/O performance (3 ).

Sysbench is a modular, cross-platform, multi-thread benchmark testing tool. It is mainly used to evaluate the database load of different system parameters. It mainly tests the following types: (1 ). cpu performance (2 ). disk I/O performance (3 ).

Sysbench is a modular, cross-platform, multi-thread benchmark testing tool. It is mainly used to evaluate the database load of different system parameters. It mainly tests the following types:

(1). cpu Performance

(2). Disk io Performance

(3). scheduler Performance

(4). Memory Allocation and transmission speed

(5). POSIX thread Performance

(6). database performance (OLTP benchmark test)

1. download and install the sysbench Tool

[Root @ centos179min home] # wget

[Root @ centos179min home] # cd sysbench-0.4.10

[Root @ centos179min sysbench-0.4.10] #./configure -- help | grep mysql -- carefully check the installation help
-- With-mysql compile with MySQL support (default is enabled)
-- With-mysql-connector des 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-related des =/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 -- if the following error occurs

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 -- Solution to install mysql-devel

[Root @ centos179min sysbench-0.4.10] # rpm-ql mysql-devel | grep include -- view the path to the Development Kit

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

[Root @ centos179min sysbench-0.4.10] # make -- if the following error occurs again

../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 -- solution (Change "ECHO =" in the libtool file to "echo = ")

ECHO = "echo" to echo = "echo"

[Root @ centos179min sysbench-0.4.10] # make -- no more errors at this time

[Root @ centos179min sysbench-0.4.10] # make install

[Root @ centos179min sysbench-0.4.10] # echo $? -- Check whether the installation is successful
0

[Root @ centos179min sysbench-0.4.10] # ll/usr/local/sysbench-0.4.10/bin/
Total 288
-Rwxr-xr-x. 1 root 293649 Oct 8 20:00 sysbench
[Root @ centos179min sysbench-0.4.10] #

2. Test CPU Performance

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.