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
As shown below: update table1 as z left join tabl...
Searching online for methods to deploy Angular pr...
Database MySQL version 8.0.18 Download a DBeaver....
In this article, we would like to share with you ...
This article example shares the specific code of ...
I worked in operations and maintenance for two ye...
Table of contents Overall Effect Listen for conta...
Table of contents 1. Run workflow 2. Basic comman...
1. First, let’s have a general introduction to th...
Table of contents Problem description: Installati...
When newbies develop div+css, they need to name t...
This article shares the simple process of install...
There is an interview question that requires: a th...
Front-end test page code: <template> <di...
1. Docker startup problem: Problem Solved: You ne...