MySQL Benchmark tool sysbench installation

Source: Internet
Author: User
Tags benchmark lua prepare

Sysbench Introduction

The tool currently has three versions of 0.4, 0.5 and 1.0, and there are some differences between versions of syntax and parameters. This article is the latest version of 1.0.9, which is based on the Luajit Multi-threaded benchmarking tool, commonly used in database benchmarking; In addition, the key subsystems of the operating system can be tested. In addition to the built-in tests, you can also write Lua scripts to implement specific business tests.


Sysbench Download

Links, Https://github.com/akopytov/sysbench


Install dependent environments

1. Yum-y install make Automake libtool pkgconfig libaio-devel Vim-common


2. Set the client library files from where the MySQL database is loaded.

[Email protected] ~]# cat/etc/ld.so.conf.d/mysql.conf

/opt/mysql/lib


[Email protected] ~]# Ldconfig

[Email protected] ~]# Ldconfig--print-cache | grep ' MySQL '

libmysqlclient.so.18 (libc6,x86-64) =/opt/mysql/lib/libmysqlclient.so.18


Installation

1. [[email protected] sysbench-1.0.9]#./autogen.sh


[Email protected] sysbench-1.0.9]#/configure--prefix=/usr/local/sysbench-1.0.9

[Email protected] sysbench-1.0.9]# Make-j 4

[[email protected] sysbench-1.0.9]# make install


2. Write the path of the command Sysbench to the environment variable path.

[[email protected] ~]# grep ' PATH '. Bash_profile

Path=/usr/local/sysbench-1.0.9/bin:/opt/mysql/bin: $PATH: $HOME/bin

Export PATH


[[email protected] ~]# source. bash_profile


3. View the client library files for the MySQL database used by the command sysbench.

[Email protected] ~]# Ldd/usr/local/sysbench-1.0.9/bin/sysbench | grep ' MySQL '

libmysqlclient.so.18 =/opt/mysql/lib/libmysqlclient.so.18 (0x00007f4376099000)


The following are the test instances for FileIO and OLTP, respectively.

1. [[email protected] sysbench_test]# sysbench fileio--file-num=4--file-block-size=16384--file-total-size=100G- -FILE-TEST-MODE=RNDRD--file-extra-flags=direct--threads=16--events=0--time=14400--report-interval=4--verbosity =3 [Prepare | run | cleanup]


2. [Email protected] sysbench_test]# Sysbench/usr/local/sysbench-1.0.9/share/sysbench/oltp_insert.lua--auto_inc= On--tables=10--mysql_storage_engine=innodb--table_size=5000000--threads=16--events=0--time=14400-- report-interval=4--verbosity=3--mysql-host=localhost--mysql-port=3306--mysql-socket=/data/3306/mysql.sock-- Mysql-user=root--mysql-password=123456--mysql-db=sbtest [Prepare | run | cleanup]


if interested, you can follow the subscription number "database Best practices" (dbbestpractice). 650) this.width=650; "title=" qrcode_for_gh_54ffa7e55478_258.jpg "src=" https://s5.51cto.com/wyfs02/M00/A6/1A/ Wkiol1njekkigfpeaabth5u4v_0148.jpg-wh_500x0-wm_3-wmp_4-s_3325867289.jpg "alt=" wKioL1nJEKKigfpEAABth5U4v_0148. Jpg-wh_50 "/>

This article is from the "Move Yourself" blog, please be sure to keep this source http://coveringindex.blog.51cto.com/12533373/1968630

MySQL Benchmark tool sysbench installation

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.