Sysbench testing mainly includes the following aspects:
1. Disk IO Performance
2. CPU Performance
3. Memory allocation and transmission speed
4. POSIX threading Performance
5. Scheduling Program Performance
6. Database performance (OLTP benchmark).
Sysbench Installation
Note: I choose the source package here to install the sysbench0.5 version
Download software
http://repo.percona.com/apt/pool/main/s/sysbench/
wget http://repo.percona.com/apt/pool/main/s/sysbench/sysbench_0.5.orig.tar.gz
Dependent Package Installation
Yum install M4 autoconf automake libtool mariadb-devel (CENTOS7)
cd/usr/local/src/
Tar XF sysbench_0.5.orig.tar.gz
MV sysbench-0.5/usr/local/
cd/usr/local/sysbench-0.5/
./autogen.sh
./configure--prefix=/usr/local/sysbench-0.5--with-mysql-includes=/usr/local/mysql/include--with-mysql-libs=/ Usr/local/mysql/lib
Make && make install
cp/usr/local/sysbench-0.5/bin/sysbench/usr/local/bin/
Test whether the installation was successful
Sysbench--version
Sysbench 0.5
Sysbench the process of stress testing a database:
This phase of the prepare phase is used to prepare, compare, and populate the table with the data.
The run phase is the SQL that runs the stress test.
Cleanup phase This phase is to clear the data, that is, the prepare phase of the initialization of the table to drop off
test for MySQL transactional OLTP (test read-write)
Sysbench--test=/usr/local/sysbench-0.5/sysbench/tests/db/oltp.lua \
--mysql-host=18.50.129.66 \
--mysql-port=3306 \
--mysql-user=root \
--mysql-password=123456 \
--mysql-db=test \ test used target database, this library name to be created in advance
--oltp-tables-count=10 \ Generate
--oltp-table-size=500000 \ Number of record rows generated per table
--REPORT-INTERVAL=10 \ Indicates a test progress report per 10s output
--rand-init=on \ Random Initialization of data
--max-requests=0 \ Stress Test total number of requests generated
--OLTP-TEST-MODE=NONTRX \ Select execution mode
--oltp-nontrx-mode=select \ Query type for non-transactional execution mode
--oltp-read-only=off \ read-only shutdown
--max-time=120 \ Duration of the stress test
--num-threads=128 \ Number of threads used
[Prepare|run|cleanup]
Sysbench Pressure measurement tool test MySQL