Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the common benchmarking tools for Mysql

Shulou Source: shulou.com Published: 2022-05-31 23:50:36 09月30日 Update

Editor to share with you what are the common benchmarking tools for Mysql. I hope you will get something after reading this article. Let's discuss it together.

Description of common parameters of mysqlslap

-auto-generate-sql sql script is automatically generated by the system for testing

-auto-generate-sql-add-autoincrement adds self-incrementing ID to the generated table

-auto-generate-sql-load-type specifies the type of query to be used in the test

-auto-generate-sql-write-number determines the amount of data generated when initializing data

-concurrency specifies the number of concurrent threads

-engine specifies the storage engine for the table to be tested, separated by commas

-no-drop does not clean up test data (usually not set)

-iterations specifies the number of times the test is run

-number-of-queries specifies the number of queries executed by each thread

-debug-info specifies to output additional memory and cpu statistics

-number-int-cols specifies the number of int type columns contained in the test table

-number-char-cols specifies the number of varchar types contained in the test table

-create-schema specifies the name of the database used to execute the test

-script used by query to specify custom sql

-only-print does not run test scripts, but prints out production scripts

Mysqlslap-concurrency=1,50100200-iterations=3-number-int-cols=5-number-char-cols=5-auto-generate-sql--auto-generate-sql-add-autoincrement-engine=myisam Innodb-- number-of-queries=10-- create-schema=sbtestsysbench installation instructions # download https://gihub.com/akopytov/sysbench/archive/0.5.zip# decompress unzip sysbench-0.5zipcd sysbench./autogen.sh# configuration's own mysql include and lib directories. / configure-- with-mysql-includes=/usr/local/mysql/include/-- with-mysql-libs=/usr/local/mysql/lib/make & & make install Common parameters

-test is used to specify the type of test to be executed. Support the following parameters

Performance Test of Fileio File system iDUBO

Cpu cpu performance test

Memory memory performance test

-mysql-db is used to specify the name of the database in which the benchmark is performed

-mysql-table-engine is used to specify the storage engine used

-number of tables tested by oltp-tables-count

-oltp-table-size specifies the number of rows of data in each table

-num-threads determines the number of concurrent threads for testing

-max-time specifies the maximum test time s

-report-interval specifies how often statistics are output

-mysql-user specifies the mysql user to perform the test

-mysql-password password

Prepare is used to prepare test data

Run runs the test

Cleanup clears test data

# Test cpu sysbench-- test=cpu-- cpu-max-prime=10000 run# disk I / O test first prepare data larger than memory sysbench-- test=Fileio-- file-total-size=1Gpreparesysbench-- test=Fileio-- num--threads=8-- init-rgn=on-file-total-size=1G-- file-test-mode=rndrw-- report-interval=1# database performance test to establish benchmark user password data, and then enter the test directory of sysbench Use lua script to test sysbench-- test=./oltp.lua-- mysql-table-engine=innodb-- oltp-table-size=10000-- mysql-db=db_name-- mysql-user=user_name-- mysql-password=password-- oltp-tables-count=10-- mysql-socket=/usr/local/mysql/data/mysql.sock prepare# to start the test. Change the prepare of the above command to the description of common parameters of runmysqlslap.

-auto-generate-sql sql script is automatically generated by the system for testing

-auto-generate-sql-add-autoincrement adds self-incrementing ID to the generated table

-auto-generate-sql-load-type specifies the type of query to be used in the test

-auto-generate-sql-write-number determines the amount of data generated when initializing data

-concurrency specifies the number of concurrent threads

-engine specifies the storage engine for the table to be tested, separated by commas

-no-drop does not clean up test data (usually not set)

-iterations specifies the number of times the test is run

-number-of-queries specifies the number of queries executed by each thread

-debug-info specifies to output additional memory and cpu statistics

-number-int-cols specifies the number of int type columns contained in the test table

-number-char-cols specifies the number of varchar types contained in the test table

-create-schema specifies the name of the database used to execute the test

-script used by query to specify custom sql

-only-print does not run test scripts, but prints out production scripts

Mysqlslap-concurrency=1,50100200-iterations=3-number-int-cols=5-number-char-cols=5-auto-generate-sql--auto-generate-sql-add-autoincrement-engine=myisam Innodb-- number-of-queries=10-- create-schema=sbtestsysbench installation instructions # download https://gihub.com/akopytov/sysbench/archive/0.5.zip# decompress unzip sysbench-0.5zipcd sysbench./autogen.sh# configuration's own mysql include and lib directories. / configure-- with-mysql-includes=/usr/local/mysql/include/-- with-mysql-libs=/usr/local/mysql/lib/make & & make install Common parameters

-test is used to specify the type of test to be executed. Support the following parameters

Performance Test of Fileio File system iDUBO

Cpu cpu performance test

Memory memory performance test

-mysql-db is used to specify the name of the database in which the benchmark is performed

-mysql-table-engine is used to specify the storage engine used

-number of tables tested by oltp-tables-count

-oltp-table-size specifies the number of rows of data in each table

-num-threads determines the number of concurrent threads for testing

-max-time specifies the maximum test time s

-report-interval specifies how often statistics are output

-mysql-user specifies the mysql user to perform the test

-mysql-password password

Prepare is used to prepare test data

Run runs the test

Cleanup clears test data

# Test cpu sysbench-- test=cpu-- cpu-max-prime=10000 run# disk I / O test first prepare data larger than memory sysbench-- test=Fileio-- file-total-size=1Gpreparesysbench-- test=Fileio-- num--threads=8-- init-rgn=on-file-total-size=1G-- file-test-mode=rndrw-- report-interval=1# database performance test to establish benchmark user password data, and then enter the test directory of sysbench Use lua script to test sysbench-- test=./oltp.lua-- mysql-table-engine=innodb-- oltp-table-size=10000-- mysql-db=db_name-- mysql-user=user_name-- mysql-password=password-- oltp-tables-count=10-- mysql-socket=/usr/local/mysql/data/mysql.sock prepare# to start the test. Change the prepare of the above command to run. After reading this article, I believe you have a certain understanding of "what are the common Mysql benchmarking tools?" If you want to know more related knowledge, welcome to follow the industry information channel, thank you for reading!

Tags: Test data quantity script performance type benchmark common memory parameter database thread build run message password engine time user directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Docker vpn Linux OPPO Reno