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. MySQLslapJuly4th, 2009 LeaveacommentGotocom
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 com
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.