Types and practical applications of MySQL stress testing tools

Source: Internet
Author: User

The following articles mainly introduce MySQL stress testing tools. We all know that the application rate of MySQL databases is not low in practice, and MySQL databases are generally used in small and medium-sized enterprises, the following articles mainly introduce the MySQL database stress testing tool.

MySQLslap

July 4th, 2009 Leave a comment Go to comments

MySQLslap is a stress testing tool officially provided by MySQL. The following are important parameters:

-Defaults-file: configuration file storage location

-Concurrency: concurrency

-Engines, Engine

-Iterations: number of iterations

-Socket: socket File Location

Automatic Test:

-Auto-generate-SQL: automatically generates test SQL

-Auto-generate-SQL-load-type: test the SQL type. Types include mixed, update, write, key, and read.

-Number-of-queries: Total number of executed SQL statements

-Number-int-cols: number of int columns in the table

-Number-char-cols: number of char columns in the table

For example:

Shell> MySQLslap-defaults-file =/u01/MySQL1/MySQL/my. cnf-concurrency = 50,100-iterations = 1-number-int-cols = 4-auto-generate-SQL-load-type = write-engine = myisam- number of-queries = 200-S/tmp/MySQL1.sock

Benchmark

Running for engine myisam

Average number of seconds to run all queries: 0.016 seconds

Minimum number of seconds to run all queries: 0.016 seconds

Maximum number of seconds to run all queries: 0.016 seconds

Number of clients running queries: 50

Average number of queries per client: 4

Benchmark

Running for engine myisam

Average number of seconds to run all queries: 0.265 seconds

Minimum number of seconds to run all queries: 0.265 seconds

Maximum number of seconds to run all queries: 0.265 seconds

Number of clients running queries: 100

Average number of queries per client: 2

Test of the specified database in MySQL stress testing tool:

-Create-schema: Specifies the database name.

-Query: Specifies an SQL statement to locate a file containing SQL.

For example:

Shell> MySQLslap-defaults-file =/u01/MySQL1/MySQL/my. cnf-concurrency = 25, 50-iterations = 1-create-schema = test-query =/u01/test. SQL-S/tmp/MySQL1.sock

Benchmark

Average number of seconds to run all queries: 0.018 seconds

Minimum number of seconds to run all queries: 0.018 seconds

Maximum number of seconds to run all queries: 0.018 seconds

Number of clients running queries: 25

Average number of queries per client: 1

Benchmark

Average number of seconds to run all queries: 0.011 seconds

Minimum number of seconds to run all queries: 0.011 seconds

Maximum number of seconds to run all queries: 0.011 seconds

Number of clients running queries: 50

Average number of queries per client: 1

The above content is an introduction to the MySQL stress testing tool. I hope you will get something better.

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.