Centos7 MySQL self-contained pressure measurement tool Mysqlslap use

Source: Internet
Author: User

Mysqlslap--help


1.1.1 Remote Connection Test

Mysqlslap-a-H "10.10.10.92"-p3306


1.1.2 50 and 100 respectively, the total query 1000 times, iteration 5 times, the local account password connection test, output CPU information

Mysqlslap-a--concurrency=50,100--number-of-queries--iterations=5--debug-info-uroot-p110120


1.1.3 Self-monitoring effect

Mysqlslap-a--concurrency=50,100--number-of-queries 100000--iterations=5--debug-info-uroot-p110120


1.3mysqlslap explanation (some important parameters)

–auto-generate-sql,-A

Automatically generate test tables and data

–auto-generate-sql-load-type=type

The type of the test statement. The values are: Read,key,write,update and mixed (default).

–number-char-cols=n,-X N

How many character types of columns are included in the automatically generated test table, default 1

–number-int-cols=n, Y-N

How many number types of columns are included in the automatically generated test table, default 1

–number-of-queries=n

Total number of test queries (number of concurrent customers × number of queries per customer)

–query=name,-q

Use a custom script to perform tests, such as a custom stored procedure or SQL statement that can be called to perform the test.

–create-schema

The Schema,mysql schema in the test is the database

–commint=n

How many DML submits once

–compress,-C

If both server and client support are compressed, the compression information is passed

–concurrency=n,-C N

concurrency, which is how many clients execute a select at the same time. Multiple values can be specified, with a comma or the value specified by the –delimiter parameter as a delimiter

–engine=engine_name,-e engine_name

The storage engine used to create the test table, which can specify multiple

–iterations=n,-I. N

Number of iterations of the test execution

–detach=n

Break a heavy connection after executing n statements

–debug-info,-t

Print memory and CPU information

–only-print

Only test statements are printed and not actually executed


1.4 Common parameters (options) detailed description:

--concurrency represents the number of concurrent, and multiple can be separated by commas. Example:--concurrency=50,200,500

--engines represents the engine to be tested, can have multiple, separated by delimiters. Example:--engines=myisam,innodb,memory

--iterations represents how many times to run tests in different concurrency environments

--auto-generate-sql represents a SQL script generated by the Mysqlslap tool to test concurrency pressure

--auto-generate-sql-add-auto-increment represents the automatic addition of the Auto_increment column to the generated table, starting with version 5.1.18,

--auto-generate-sql-load-type represents whether the environment to be tested is read or write or mixed (read,write,update,mixed)

--number-of-queries represents how many queries to run in total

--debug-info represents additional output of CPU and memory related information

There are several properties of the integer type in the--number-int-cols representation example table

There are several properties of the Vachar type in the--number-char-cols representation example table

--create-schema represents the custom test library name

--query represents a custom test SQL script


1.5 examples

Single thread testing. What did the test do?

Mysqlslap-a-uroot-p110120

Multithreaded testing. Using--concurrency to simulate concurrent connections

Mysqlslap-a-C 100-uroot-p110120

Iterative testing. Used to perform the test multiple times to get an average

Mysqlslap-a-I. 10-uroot-p110120

Custom Tests

Mysqlslap--create-schema=test-q "SELECT * from User"

Centos7 MySQL self-contained pressure measurement tool Mysqlslap use

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.