Preface mysqlslap is a diagnostic program designed to simulate client load to a MySQL server and report the times for each stage. It works just like multiple clients are accessing the server. 1. Syntax used: mysqlslap [options] --auto-generate-sql, -a: Automatically generate test tables and data, indicating that the SQL script generated by mysqlslap itself is used to test concurrent pressure. 2. Case Test 100 concurrent queries, automatically generate SQL test scripts, and execute 1000 total queries: root# mysqlslap -uroot -p123456 -a --concurrency=100 --number-of-queries 1000 Benchmark Average number of seconds to run all queries: 0.725 seconds Minimum number of seconds to run all queries: 0.725 seconds Maximum number of seconds to run all queries: 0.725 seconds Number of clients running queries: 100 Average number of queries per client: 10 Test 100 concurrent threads, 5 tests, automatically generate SQL test scripts, read, write, and update mixed tests, auto-increment fields, test engine is innodb, execute 5000 total queries root# mysqlslap -uroot -p123456--concurrency=100 --iterations=5 --auto-generate-sql --auto-generate-sql-load-type=mixed --auto-generate-sql-add-autoincrement --engine=innodb --number-of-queries=5000 Benchmark Running for engine innodb Average number of seconds to run all queries: 1.264 seconds Minimum number of seconds to run all queries: 1.161 seconds Maximum number of seconds to run all queries: 1.404 seconds Number of clients running queries: 100 Average number of queries per client: 50 Summarize The above is the stress test command mysqlslap and usage syntax of MySQL 5.7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How to clear the cache after using keep-alive in vue
>>: PyTorch development environment installation tutorial under Windows
Xiaobai learned about Vue, then learned about web...
Table of contents 1. Background 2. Operation step...
The detailed process of using MySQL database with...
Sometimes, in order to facilitate the export and ...
Some projects have relatively simple business, bu...
Table of contents Prerequisites RN passes value t...
Table of contents 1. Basic Concepts of GTID 2. GT...
1. Composite primary key The so-called composite ...
This article uses examples to illustrate the use ...
Table of contents Preface Prepare Implementation ...
Table of contents question background Idea & ...
Table of contents Preface What is a filter How to...
type is the control used for input and output in t...
The effect is very simple, just copy the following...
The installation process is basically the same as...