Sysbench Pressure measurement tool test MySQL

Source: Internet
Author: User
Tags prepare

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

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)

Tar XF sysbench_0.5.orig.tar.gz-c/usr/local

cd/usr/local/sysbench-0.5/
./autogen.sh
./configure--prefix=/usr/local/sysbench-0.5

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

testing for MySQL transaction-based OLTP(Test read/write)
Sysbench--test=/usr/local/sysbench-0.5/sysbench/tests/db/oltp.lua \
--mysql-host=127.0.0.1 \
--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(three of the following)
[Prepare|run|cleanup]

Prepare to run cleanup

Sysbench Pressure measurement tool test MySQL

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.